Class SpawnerEntry

java.lang.Object
org.bukkit.block.spawner.SpawnerEntry

public class SpawnerEntry extends Object
Represents a weighted spawn potential that can be added to a monster spawner.
  • Constructor Details

  • Method Details

    • getSnapshot

      @NotNull public EntitySnapshot getSnapshot()
      Gets the EntitySnapshot for this SpawnerEntry.
      Returns:
      the snapshot
    • setSnapshot

      public void setSnapshot(@NotNull EntitySnapshot snapshot)
      Sets the EntitySnapshot for this SpawnerEntry.
      Parameters:
      snapshot - the snapshot
    • getSpawnWeight

      public int getSpawnWeight()
      Gets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
      Returns:
      the weight
    • setSpawnWeight

      public void setSpawnWeight(int spawnWeight)
      Sets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
      Parameters:
      spawnWeight - the new spawn weight
    • getSpawnRule

      @Nullable public SpawnRule getSpawnRule()
      Gets a copy of the SpawnRule for this SpawnerEntry, or null if none has been set.
      Returns:
      a copy of the spawn rule or null
    • setSpawnRule

      public void setSpawnRule(@Nullable SpawnRule spawnRule)
      Sets the SpawnRule for this SpawnerEntry, null may be used to clear the current spawn rule.
      Parameters:
      spawnRule - the new spawn rule to use or null
    • getEquipment

      @Nullable public SpawnerEntry.Equipment getEquipment()
      Gets the equipment which will be applied to the spawned entity.
      Returns:
      the equipment, or null
    • setEquipment

      public void setEquipment(@Nullable SpawnerEntry.Equipment equipment)
      Sets the equipment which will be applied to the spawned entity.
      Parameters:
      equipment - new equipment, or null