SPIGOT-5484: Add more spawn tick settings

By: Phoenix616 <mail@moep.tv>
This commit is contained in:
CraftBukkit/Spigot
2020-03-07 18:30:21 +01:00
parent 5ca0965ff4
commit e6566a0503
5 changed files with 79 additions and 20 deletions

View File

@@ -639,6 +639,16 @@ public final class CraftServer implements Server {
return this.configuration.getInt("ticks-per.monster-spawns");
}
@Override
public int getTicksPerWaterSpawns() {
return this.configuration.getInt("ticks-per.water-spawns");
}
@Override
public int getTicksPerAmbientSpawns() {
return this.configuration.getInt("ticks-per.ambient-spawns");
}
@Override
public PluginManager getPluginManager() {
return pluginManager;
@@ -751,6 +761,18 @@ public final class CraftServer implements Server {
} else {
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
}
if (this.getTicksPerWaterSpawns() < 0) {
world.ticksPerWaterSpawns = 1;
} else {
world.ticksPerWaterSpawns = this.getTicksPerWaterSpawns();
}
if (this.getTicksPerAmbientSpawns() < 0) {
world.ticksPerAmbientSpawns = 1;
} else {
world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns();
}
}
pluginManager.clearPlugins();