Package org.bukkit.block.spawner
Class SpawnRule
java.lang.Object
org.bukkit.block.spawner.SpawnRule
- All Implemented Interfaces:
- Cloneable,- ConfigurationSerializable
Represents a spawn rule that controls what conditions an entity from a
 monster spawner can spawn.
- 
Constructor SummaryConstructorsConstructorDescriptionSpawnRule(int minBlockLight, int maxBlockLight, int minSkyLight, int maxSkyLight) Constructs a new SpawnRule.
- 
Method SummaryModifier and TypeMethodDescriptionclone()static SpawnRuledeserialize(Map<String, Object> args) booleanintGets the maximum (inclusive) block light required for spawning to succeed.intGets the maximum (inclusive) sky light required for spawning to succeed.intGets the minimum (inclusive) block light required for spawning to succeed.intGets the minimum (inclusive) sky light required for spawning to succeed.inthashCode()Creates a Map representation of this class.voidsetMaxBlockLight(int maxBlockLight) Sets the maximum (inclusive) block light required for spawning to succeed.voidsetMaxSkyLight(int maxSkyLight) Sets the maximum (inclusive) sky light required for spawning to succeed.voidsetMinBlockLight(int minBlockLight) Sets the minimum (inclusive) block light required for spawning to succeed.voidsetMinSkyLight(int minSkyLight) Sets the minimum (inclusive) sky light required for spawning to succeed.
- 
Constructor Details- 
SpawnRulepublic SpawnRule(int minBlockLight, int maxBlockLight, int minSkyLight, int maxSkyLight) Constructs a new SpawnRule.- Parameters:
- minBlockLight- The minimum (inclusive) block light required for spawning to succeed.
- maxBlockLight- The maximum (inclusive) block light required for spawning to succeed.
- minSkyLight- The minimum (inclusive) sky light required for spawning to succeed.
- maxSkyLight- The maximum (inclusive) sky light required for spawning to succeed.
 
 
- 
- 
Method Details- 
getMinBlockLightpublic int getMinBlockLight()Gets the minimum (inclusive) block light required for spawning to succeed.- Returns:
- minimum block light
 
- 
setMinBlockLightpublic void setMinBlockLight(int minBlockLight) Sets the minimum (inclusive) block light required for spawning to succeed.- Parameters:
- minBlockLight- minimum block light
 
- 
getMaxBlockLightpublic int getMaxBlockLight()Gets the maximum (inclusive) block light required for spawning to succeed.- Returns:
- maximum block light
 
- 
setMaxBlockLightpublic void setMaxBlockLight(int maxBlockLight) Sets the maximum (inclusive) block light required for spawning to succeed.- Parameters:
- maxBlockLight- maximum block light
 
- 
getMinSkyLightpublic int getMinSkyLight()Gets the minimum (inclusive) sky light required for spawning to succeed.- Returns:
- minimum sky light
 
- 
setMinSkyLightpublic void setMinSkyLight(int minSkyLight) Sets the minimum (inclusive) sky light required for spawning to succeed.- Parameters:
- minSkyLight- minimum sky light
 
- 
getMaxSkyLightpublic int getMaxSkyLight()Gets the maximum (inclusive) sky light required for spawning to succeed.- Returns:
- maximum sky light
 
- 
setMaxSkyLightpublic void setMaxSkyLight(int maxSkyLight) Sets the maximum (inclusive) sky light required for spawning to succeed.- Parameters:
- maxSkyLight- maximum sky light
 
- 
equals
- 
hashCodepublic int hashCode()
- 
clone
- 
serializeDescription copied from interface:ConfigurationSerializableCreates a Map representation of this class.This class must provide a method to restore this class, as defined in the ConfigurationSerializableinterface javadocs.- Specified by:
- serializein interface- ConfigurationSerializable
- Returns:
- Map containing the current state of this class
 
- 
deserialize
 
-