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

@Name("Is Lootable") @Description("Checks whether an entity or block is lootable. Lootables are entities or blocks that can have a loot table.") @Example("spawn a pig at event-location\nset {_pig} to last spawned entity\nif {_pig} is lootable:\n\tset loot table of {_pig} to \"minecraft:entities/cow\"\n\t# the pig will now drop the loot of a cow when killed, because it is indeed a lootable entity.\n") @Example("set block at event-location to chest\nif block at event-location is lootable:\n\tset loot table of block at event-location to \"minecraft:chests/simple_dungeon\"\n\t# the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.\n") @Example("set block at event-location to white wool\nif block at event-location is lootable:\n\t# uh oh, nothing will happen because a wool is not a lootable block.\n") @Since("2.10") public class CondIsLootable extends ch.njol.skript.conditions.base.PropertyCondition<Object>
  • Constructor Details

    • CondIsLootable

      public CondIsLootable()
  • Method Details

    • check

      public boolean check(Object object)
      Specified by:
      check in class ch.njol.skript.conditions.base.PropertyCondition<Object>
    • getPropertyName

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