Package org.bukkit.block.spawner
Class SpawnerEntry
java.lang.Object
org.bukkit.block.spawner.SpawnerEntry
Represents a weighted spawn potential that can be added to a monster spawner.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classRepresents the equipment loot table applied to a spawned entity.
- 
Constructor SummaryConstructorsConstructorDescriptionSpawnerEntry(EntitySnapshot snapshot, int spawnWeight, SpawnRule spawnRule) SpawnerEntry(EntitySnapshot snapshot, int spawnWeight, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the equipment which will be applied to the spawned entity.Gets theEntitySnapshotfor this SpawnerEntry.Gets a copy of theSpawnRulefor this SpawnerEntry, or null if none has been set.intGets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.voidsetEquipment(SpawnerEntry.Equipment equipment) Sets the equipment which will be applied to the spawned entity.voidsetSnapshot(EntitySnapshot snapshot) Sets theEntitySnapshotfor this SpawnerEntry.voidsetSpawnRule(SpawnRule spawnRule) Sets theSpawnRulefor this SpawnerEntry, null may be used to clear the current spawn rule.voidsetSpawnWeight(int spawnWeight) Sets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
- 
Constructor Details- 
SpawnerEntrypublic SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule) 
- 
SpawnerEntrypublic SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule, @Nullable SpawnerEntry.Equipment equipment) 
 
- 
- 
Method Details- 
getSnapshotGets theEntitySnapshotfor this SpawnerEntry.- Returns:
- the snapshot
 
- 
setSnapshotSets theEntitySnapshotfor this SpawnerEntry.- Parameters:
- snapshot- the snapshot
 
- 
getSpawnWeightpublic int getSpawnWeight()Gets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.- Returns:
- the weight
 
- 
setSpawnWeightpublic 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
 
- 
getSpawnRuleGets a copy of theSpawnRulefor this SpawnerEntry, or null if none has been set.- Returns:
- a copy of the spawn rule or null
 
- 
setSpawnRuleSets theSpawnRulefor this SpawnerEntry, null may be used to clear the current spawn rule.- Parameters:
- spawnRule- the new spawn rule to use or null
 
- 
getEquipmentGets the equipment which will be applied to the spawned entity.- Returns:
- the equipment, or null
 
- 
setEquipmentSets the equipment which will be applied to the spawned entity.- Parameters:
- equipment- new equipment, or null
 
 
-