Class ExprSecCreateWorldBorder

java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<org.bukkit.WorldBorder>
ch.njol.skript.expressions.base.SectionExpression<org.bukkit.WorldBorder>
org.skriptlang.skript.bukkit.worldborder.elements.expressions.ExprSecCreateWorldBorder
All Implemented Interfaces:
Debuggable, Expression<org.bukkit.WorldBorder>, Loopable<org.bukkit.WorldBorder>, Simplifiable<Expression<? extends org.bukkit.WorldBorder>>, SyntaxElement, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Create WorldBorder") @Description({"Creates a new, unused world border. World borders can be assigned to either worlds or specific players.","Borders assigned to worlds apply to all players in that world.","Borders assigned to players apply only to those players, and different players can have different borders."}) @Example("on join:\n\tset {_location} to location of player\n\tset worldborder of player to a virtual worldborder:\n\t\tset worldborder radius to 25\n\t\tset world border center of event-worldborder to {_location}\n") @Example("on load:\n\tset worldborder of world \"world\" to a worldborder:\n\t\tset worldborder radius of event-worldborder to 200\n\t\tset worldborder center of event-worldborder to location(0, 64, 0)\n\t\tset worldborder warning distance of event-worldborder to 5\n") @Since("2.11") public class ExprSecCreateWorldBorder extends ch.njol.skript.expressions.base.SectionExpression<org.bukkit.WorldBorder>
  • Constructor Details

    • ExprSecCreateWorldBorder

      public ExprSecCreateWorldBorder()
  • Method Details

    • register

      public static void register(SyntaxRegistry syntaxRegistry, EventValueRegistry eventValueRegistry)
    • init

      public boolean init(Expression<?>[] expressions, int pattern, Kleenean delayed, SkriptParser.ParseResult result, @Nullable @Nullable SectionNode node, @Nullable @Nullable List<TriggerItem> triggerItems)
      Specified by:
      init in class ch.njol.skript.expressions.base.SectionExpression<org.bukkit.WorldBorder>
    • get

      protected org.bukkit.WorldBorder @Nullable [] get(org.bukkit.event.Event event)
      Description copied from class: SimpleExpression
      This is the internal method to get an expression's values.
      To get the expression's value from the outside use SimpleExpression.getSingle(Event) or SimpleExpression.getArray(Event).
      Specified by:
      get in class SimpleExpression<org.bukkit.WorldBorder>
      Parameters:
      event - The event with which this expression is evaluated.
      Returns:
      An array of values for this event. May not contain nulls.
    • isSingle

      public boolean isSingle()
      Returns:
      true if this expression will ever only return one value at most, false if it can return multiple values.
    • getReturnType

      public Class<org.bukkit.WorldBorder> 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)
    • toString

      public String toString(@Nullable @Nullable org.bukkit.event.Event event, boolean debug)
      Parameters:
      event - The event to get information from. This is always null if debug == false.
      debug - If true this should print more information, if false this should print what is shown to the end user
      Returns:
      String representation of this object