Class ExprKeyOfBossBar

java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<String>
ch.njol.skript.expressions.base.PropertyExpression<org.bukkit.boss.BossBar, String>
ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.boss.BossBar, String>
org.skriptlang.skript.bukkit.bossbar.elements.expressions.ExprKeyOfBossBar
All Implemented Interfaces:
Debuggable, Expression<String>, Loopable<String>, Simplifiable<Expression<? extends String>>, SyntaxElement, Converter<org.bukkit.boss.BossBar, String>, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Key Of Boss Bar") @Description("Returns the key of a keyed boss bar.\nDoes not return anything for normal boss bars.\n") @Example("broadcast the boss bar key of {_mybar}\n") @Since("2.16") public class ExprKeyOfBossBar extends ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.boss.BossBar, String>
  • Constructor Details

    • ExprKeyOfBossBar

      public ExprKeyOfBossBar()
  • Method Details

    • register

      public static void register(SyntaxRegistry registry)
    • convert

      @Nullable public @Nullable String convert(org.bukkit.boss.BossBar bar)
      Description copied from interface: Converter
      Converts an object using this Converter.
      Specified by:
      convert in interface Converter<org.bukkit.boss.BossBar, String>
      Specified by:
      convert in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.boss.BossBar, String>
      Parameters:
      bar - The object to convert.
      Returns:
      The converted object.
    • getReturnType

      public Class<? extends String> getReturnType()
      Description copied from interface: Expression
      Gets the return type of this expression.
      Returns:
      A supertype of any objects returned by Expression.getSingle(Event) and the component type of any arrays returned by Expression.getArray(Event)
    • getPropertyName

      protected String getPropertyName()
      Specified by:
      getPropertyName in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.boss.BossBar, String>