mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 11:05:13 +01:00
Added API to allow plugins to set the world's spawn flags.
This commit is contained in:
parent
89a524678a
commit
cb7b82d452
1 changed files with 12 additions and 0 deletions
|
@ -765,4 +765,16 @@ public class CraftWorld implements World {
|
||||||
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) {
|
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) {
|
||||||
return CraftChunk.getEmptyChunkSnapshot(x, z, this, includeBiome, includeBiomeTempRain);
|
return CraftChunk.getEmptyChunkSnapshot(x, z, this, includeBiome, includeBiomeTempRain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals) {
|
||||||
|
world.setSpawnFlags(allowMonsters, allowAnimals);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getAllowAnimals() {
|
||||||
|
return world.allowAnimals;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getAllowMonsters() {
|
||||||
|
return world.allowMonsters;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue