Package noppes.npcs.api.handler
Interface INaturalSpawnsHandler
-
public interface INaturalSpawnsHandlerHandles natural spawn configurations for custom NPCs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSpawn(INaturalSpawn spawn)Registers a new natural spawn configuration.INaturalSpawncreateSpawn()Creates a new empty natural spawn configuration.INaturalSpawn[]getSpawns()Returns all registered natural spawn configurations.INaturalSpawn[]getSpawns(String biome)Returns spawn configurations that include the specified biome.voidremoveSpawn(INaturalSpawn spawn)Removes a natural spawn configuration.voidsave()Saves all spawn configurations to disk.
-
-
-
Method Detail
-
save
void save()
Saves all spawn configurations to disk.
-
getSpawns
INaturalSpawn[] getSpawns()
Returns all registered natural spawn configurations.- Returns:
- an array of spawn configurations.
-
getSpawns
INaturalSpawn[] getSpawns(String biome)
Returns spawn configurations that include the specified biome.- Parameters:
biome- the biome name.- Returns:
- an array of matching spawn configurations.
-
addSpawn
void addSpawn(INaturalSpawn spawn)
Registers a new natural spawn configuration.- Parameters:
spawn- the spawn to add.
-
removeSpawn
void removeSpawn(INaturalSpawn spawn)
Removes a natural spawn configuration.- Parameters:
spawn- the spawn to remove.
-
createSpawn
INaturalSpawn createSpawn()
Creates a new empty natural spawn configuration.- Returns:
- the created spawn.
-
-