Removed no longer needed allow-nether and allow-end warnings

Fixed https://github.com/BentoBoxWorld/BentoBox/issues/977
This commit is contained in:
Florian CUNY 2019-10-22 09:44:48 +02:00
parent 6ed1212e47
commit 856572941e

View File

@ -155,38 +155,18 @@ public class IslandWorldManager {
// Call Multiverse // Call Multiverse
registerToMultiverse(world, true); registerToMultiverse(world, true);
if (settings.isNetherGenerate()) { if (settings.isNetherGenerate()) {
if (!Bukkit.getAllowNether()) {
// Warn the users that players might not be able to teleport to these worlds later on
plugin.logWarning("'allow-nether' is set to 'false' in the server.properties file!");
plugin.logWarning("This means that players won't be able to teleport to the Nether through portals.");
plugin.logWarning("Please turn off the server and set 'allow-nether' to 'true' in the server.properties file.");
}
gameModes.put(gameMode.getNetherWorld(), gameMode); gameModes.put(gameMode.getNetherWorld(), gameMode);
if (settings.isNetherIslands()) { if (settings.isNetherIslands()) {
registerToMultiverse(gameMode.getNetherWorld(), true); registerToMultiverse(gameMode.getNetherWorld(), true);
} }
} }
if (settings.isEndGenerate()) { if (settings.isEndGenerate()) {
if (!Bukkit.getAllowEnd()) {
// Warn the users that players might not be able to teleport to these worlds later on
plugin.logWarning("'settings.allow-end' is set to 'false' in the bukkit.yml file!");
plugin.logWarning("This means that players won't be able to teleport to the End through portals.");
plugin.logWarning("Please turn off the server and set 'settings.allow-end' to 'true' in the bukkit.yml file.");
}
gameModes.put(gameMode.getEndWorld(), gameMode); gameModes.put(gameMode.getEndWorld(), gameMode);
if (settings.isEndIslands()) { if (settings.isEndIslands()) {
registerToMultiverse(gameMode.getEndWorld(), true); registerToMultiverse(gameMode.getEndWorld(), true);
} }
} }
// If allow-nether or allow-end is false, then we will send the user some help.
if ((settings.isNetherGenerate() && !Bukkit.getAllowNether()) || (settings.isEndGenerate() && !Bukkit.getAllowEnd())) {
plugin.logWarning("If this is intended in order to prevent the vanilla worlds from being generated, please read the following page:");
plugin.logWarning("https://github.com/BentoBoxWorld/BentoBox/wiki/Set-one-of-BentoBox-worlds-as-the-server-default-world");
}
// Set default island settings // Set default island settings
plugin.getFlagsManager().getFlags().stream().filter(f -> f.getType().equals(Flag.Type.PROTECTION)) plugin.getFlagsManager().getFlags().stream().filter(f -> f.getType().equals(Flag.Type.PROTECTION))
.forEach(f -> settings.getDefaultIslandFlags().putIfAbsent(f, f.getDefaultRank())); .forEach(f -> settings.getDefaultIslandFlags().putIfAbsent(f, f.getDefaultRank()));