Class VelocityPlaceholder

java.lang.Object
ml.karmaconfigs.api.velocity.VelocityPlaceholder

public class VelocityPlaceholder extends Object
Due velocity does not has support for KarmaPlugin, I will integrate placeholder utilities with a custom placeholder class for Velocity
  • Constructor Details

    • VelocityPlaceholder

      public VelocityPlaceholder()
  • Method Details

    • createTextPlaceholder

      public static Placeholder<String> createTextPlaceholder(String key, BiConsumer<com.velocitypowered.api.proxy.Player,​String> onRequest)
      Create a player placeholder
      Parameters:
      key - the placeholder key
      onRequest - on placeholder request
      Returns:
      the placeholder
    • createIntegerPlaceholder

      public static Placeholder<Integer> createIntegerPlaceholder(String key, BiConsumer<com.velocitypowered.api.proxy.Player,​Integer> onRequest)
      Create a player placeholder
      Parameters:
      key - the placeholder key
      onRequest - on placeholder request
      Returns:
      the placeholder
    • createDoublePlaceholder

      public static Placeholder<Double> createDoublePlaceholder(String key, BiConsumer<com.velocitypowered.api.proxy.Player,​Double> onRequest)
      Create a player placeholder
      Parameters:
      key - the placeholder key
      onRequest - on placeholder request
      Returns:
      the placeholder
    • createFloatPlaceholder

      public static Placeholder<Float> createFloatPlaceholder(String key, BiConsumer<com.velocitypowered.api.proxy.Player,​Float> onRequest)
      Create a player placeholder
      Parameters:
      key - the placeholder key
      onRequest - on placeholder request
      Returns:
      the placeholder
    • createAnyPlaceholder

      public static <T> Placeholder<T> createAnyPlaceholder(String key, BiConsumer<com.velocitypowered.api.proxy.Player,​T> onRequest)
      Create a player placeholder
      Type Parameters:
      T - the placeholder type
      Parameters:
      key - the placeholder key
      onRequest - on placeholder request
      Returns:
      the placeholder
    • registerPlayerPlaceholder

      public static void registerPlayerPlaceholder(Placeholder<?>... placeholders)
      Register globally a player placeholder
      Parameters:
      placeholders - the player placeholder