Class SpawnerEntry.Equipment

java.lang.Object
org.bukkit.block.spawner.SpawnerEntry.Equipment
Enclosing class:
SpawnerEntry

public static class SpawnerEntry.Equipment extends Object
Represents the equipment loot table applied to a spawned entity.
  • Constructor Details

    • Equipment

      public Equipment(LootTable equipmentLootTable, Map<EquipmentSlot, Float> dropChances)
      Creates a new equipment loot table.
      Parameters:
      equipmentLootTable - the loot table for the entity's equipment slots
      dropChances - the drop chances for each slot of the entity
  • Method Details

    • setEquipmentLootTable

      public void setEquipmentLootTable(LootTable table)
      Set the loot table for the spawned entity's equipment slots.
      To remove a loot table use the empty loot table.
      Parameters:
      table - this Mob will have.
    • getEquipmentLootTable

      public LootTable getEquipmentLootTable()
      Gets the loot table for the spawned entity's equipment.

      If an entity does not have a loot table, this will return an empty loot table.

      Returns:
      the loot table for this entity.
    • getDropChances

      public Map<EquipmentSlot, Float> getDropChances()
      Gets a mutable map of the drop chances for each slot of the entity. If non-null, the entity's drop chances will be overridden with the given value.
      Returns:
      mutable map of drop chances