Compare commits

...

4 Commits

Author SHA1 Message Date
tastybento 6cbf4eee77 Updated POM version numbers 2023-07-04 17:10:52 -07:00
tastybento 6c91835e8f Fix typo 2023-07-04 17:06:38 -07:00
tastybento ffd5e9fcd5 Fix duplicate permission listing 2023-07-04 17:06:15 -07:00
tastybento 7a67d2b7f6 Fix deprecation code for setting world settings 2023-07-04 17:05:44 -07:00
4 changed files with 12 additions and 27 deletions

View File

@ -227,7 +227,8 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.1.2</version>
<!--suppress MavenModelInspection -->
<configuration>
<argLine>
${argLine}

View File

@ -2,6 +2,7 @@ package world.bentobox.bskyblock;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.entity.SpawnCategory;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
import org.bukkit.event.Listener;
@ -129,24 +130,25 @@ public class BSkyBlock extends GameModeAddon implements Listener {
WorldCreator wc = WorldCreator.name(worldName2).type(WorldType.FLAT).environment(env);
World w = settings.isUseOwnGenerator() ? wc.createWorld() : wc.generator(chunkGenerator2).createWorld();
// Set spawn rates
if (w != null) {
// Set spawn rates
if (w != null && getSettings() != null) {
if (getSettings().getSpawnLimitMonsters() > 0) {
w.setMonsterSpawnLimit(getSettings().getSpawnLimitMonsters());
w.setSpawnLimit(SpawnCategory.MONSTER, getSettings().getSpawnLimitMonsters());
}
if (getSettings().getSpawnLimitAmbient() > 0) {
w.setAmbientSpawnLimit(getSettings().getSpawnLimitAmbient());
w.setSpawnLimit(SpawnCategory.AMBIENT, getSettings().getSpawnLimitAmbient());
}
if (getSettings().getSpawnLimitAnimals() > 0) {
w.setAnimalSpawnLimit(getSettings().getSpawnLimitAnimals());
w.setSpawnLimit(SpawnCategory.ANIMAL, getSettings().getSpawnLimitAnimals());
}
if (getSettings().getSpawnLimitWaterAnimals() > 0) {
w.setWaterAnimalSpawnLimit(getSettings().getSpawnLimitWaterAnimals());
w.setSpawnLimit(SpawnCategory.WATER_ANIMAL, getSettings().getSpawnLimitWaterAnimals());
}
if (getSettings().getTicksPerAnimalSpawns() > 0) {
w.setTicksPerAnimalSpawns(getSettings().getTicksPerAnimalSpawns());
w.setTicksPerSpawns(SpawnCategory.ANIMAL, getSettings().getTicksPerAnimalSpawns());
}
if (getSettings().getTicksPerMonsterSpawns() > 0) {
w.setTicksPerMonsterSpawns(getSettings().getTicksPerMonsterSpawns());
w.setTicksPerSpawns(SpawnCategory.MONSTER, getSettings().getTicksPerMonsterSpawns());
}
}
return w;

View File

@ -122,7 +122,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
}
break;
case 2:
// Stalatite
// Stalactite
for (int i = 0; i < rand.nextInt(10); i++) {
setBlock(x, - 8 - i, z, Material.GLOWSTONE);
}

View File

@ -161,21 +161,6 @@ permissions:
bskyblock.mod.team.setowner:
description: Allow use of '/bsbadmin team setowner' command - transfers island ownership to the player
default: OP
bskyblock.mod.team.add:
description: Allow use of '/bsbadmin add' command - add player to owner's team
default: OP
bskyblock.mod.team.kick:
description: Allow use of '/bsbadmin kick' command - kick a player from a team
default: OP
bskyblock.mod.team.disband:
description: Allow use of '/bsbadmin disband' command - disband owner's team
default: OP
bskyblock.mod.team.setowner:
description: Allow use of '/bsbadmin setowner' command - transfers island ownership to the player
default: OP
bskyblock.mod.team.fix:
description: Allow use of '/bsbadmin fix' command - scans and fixes cross island membership in database
default: OP
bskyblock.admin.blueprint:
description: Allow use of '/bsbadmin blueprint' command - manipulate blueprints
default: OP
@ -239,9 +224,6 @@ permissions:
bskyblock.admin.resets.set:
description: Allow use of '/bsbadmin resets set' command - sets how many times this player has reset his island
default: OP
bskyblock.admin.resets.remove:
description: Allow use of '/bsbadmin resets reset' command - sets the player's island reset count to 0
default: OP
bskyblock.admin.resets.add:
description: Allow use of '/bsbadmin resets add' command - adds this player's island reset count
default: OP