Class CondItemEnchantmentGlint

java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.Statement
ch.njol.skript.lang.Condition
ch.njol.skript.conditions.base.PropertyCondition<ItemType>
org.skriptlang.skript.bukkit.enchantments.elements.conditions.CondItemEnchantmentGlint
All Implemented Interfaces:
Debuggable, Simplifiable<Condition>, SyntaxElement, Predicate<ItemType>, Conditional<org.bukkit.event.Event>, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Item Has Enchantment Glint Override") @Description("Checks whether an item has the enchantment glint overridden, or is forced to glint or not.") @Example("if the player's tool has the enchantment glint override\n\tsend \"Your tool has the enchantment glint override.\" to player\n") @Example("if {_item} is forced to glint:\n\tsend \"This item is forced to glint.\" to player\nelse if {_item} is forced to not glint:\n\tsend \"This item is forced to not glint.\" to player\nelse:\n\tsend \"This item does not have any glint override.\" to player\n") @Since("2.10") public class CondItemEnchantmentGlint extends ch.njol.skript.conditions.base.PropertyCondition<ItemType>
  • Constructor Details

    • CondItemEnchantmentGlint

      public CondItemEnchantmentGlint()
  • Method Details

    • register

      public static void register(SyntaxRegistry registry)
    • init

      public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult)
      Description copied from interface: SyntaxElement
      Called just after the constructor and SyntaxElement.preInit().
      Specified by:
      init in interface SyntaxElement
      Overrides:
      init in class ch.njol.skript.conditions.base.PropertyCondition<ItemType>
      Parameters:
      expressions - all %expr%s included in the matching pattern in the order they appear in the pattern. If an optional value was left out, it will still be included in this list holding the default value of the desired type, which usually depends on the event.
      matchedPattern - The index of the pattern which matched
      isDelayed - Whether this expression is used after a delay or not (i.e. if the event has already passed when this expression will be called)
      parseResult - Additional information about the match.
      Returns:
      Whether this expression was initialised successfully. An error should be printed prior to returning false to specify the cause.
      See Also:
    • check

      public boolean check(ItemType itemType)
      Specified by:
      check in class ch.njol.skript.conditions.base.PropertyCondition<ItemType>
    • getPropertyType

      protected ch.njol.skript.conditions.base.PropertyCondition.PropertyType getPropertyType()
      Overrides:
      getPropertyType in class ch.njol.skript.conditions.base.PropertyCondition<ItemType>
    • getPropertyName

      protected String getPropertyName()
      Specified by:
      getPropertyName in class ch.njol.skript.conditions.base.PropertyCondition<ItemType>