SPIGOT-5484: Add more spawn tick settings
By: Phoenix616 <mail@moep.tv>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user