Skip to content

Commit

Permalink
Update MobSpawn.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Noogear authored Nov 13, 2024
1 parent c0bac93 commit d8c31e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/dev/aurelium/auramobs/listeners/MobSpawn.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ private boolean passWorld(World world) {
if (plugin.isWorldWhitelist()) {
if (plugin.getEnabledWorlds().contains("*")) return true;
for (String enabledworld : plugin.getEnabledWorlds()) {
if (world.getName().equalsIgnoreCase(enabledworld) || world.getName().startsWith(enabledworld.replace("*", "")))
if (world.getName().equalsIgnoreCase(enabledworld) || world.getName().startsWith(enabledworld.replace("*", ""))) {
return true;
}
}
return false;
} else {
if (plugin.getEnabledWorlds().contains("*")) return false;
for (String enabledworld : plugin.getEnabledWorlds()) {
if (world.getName().equalsIgnoreCase(enabledworld) || world.getName().startsWith(enabledworld.replace("*", "")))
if (world.getName().equalsIgnoreCase(enabledworld) || world.getName().startsWith(enabledworld.replace("*", ""))) {
return false;
}
}
return true;
}
Expand Down

0 comments on commit d8c31e8

Please sign in to comment.