mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-10-01 08:07:34 +02:00
Fixed code smells
This commit is contained in:
parent
5cbbbabcbf
commit
113335e60a
@ -58,12 +58,10 @@ public class CleanSuperFlatListener extends FlagListener {
|
|||||||
task = Bukkit.getScheduler().runTaskTimer(plugin, () -> {
|
task = Bukkit.getScheduler().runTaskTimer(plugin, () -> {
|
||||||
if (!chunkQ.isEmpty()) {
|
if (!chunkQ.isEmpty()) {
|
||||||
Pair<Integer, Integer> chunkXZ = chunkQ.poll();
|
Pair<Integer, Integer> chunkXZ = chunkQ.poll();
|
||||||
world.regenerateChunk(chunkXZ.x, chunkXZ.z);
|
world.regenerateChunk(chunkXZ.x, chunkXZ.z); // NOSONAR - the deprecation doesn't the cause any issues to us
|
||||||
plugin.logWarning(chunkQ.size() + " Regenerating superflat chunk " + world.getName() + " " + chunkXZ.x + ", " + chunkXZ.z);
|
plugin.logWarning(chunkQ.size() + " Regenerating superflat chunk " + world.getName() + " " + chunkXZ.x + ", " + chunkXZ.z);
|
||||||
}
|
}
|
||||||
}, 0L, 1L);
|
}, 0L, 1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -206,8 +206,7 @@ public class IslandWorldManager {
|
|||||||
/**
|
/**
|
||||||
* Get the overworld based on friendly name.
|
* Get the overworld based on friendly name.
|
||||||
*
|
*
|
||||||
* @param friendlyName
|
* @param friendlyName friendly name of world
|
||||||
* - friendly name of world
|
|
||||||
* @return overworld, or null if it does not exist
|
* @return overworld, or null if it does not exist
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
@ -215,7 +214,7 @@ public class IslandWorldManager {
|
|||||||
public World getOverWorld(@NonNull String friendlyName) {
|
public World getOverWorld(@NonNull String friendlyName) {
|
||||||
return gameModes.values().stream().distinct()
|
return gameModes.values().stream().distinct()
|
||||||
.filter(gm -> gm.getWorldSettings().getFriendlyName().equalsIgnoreCase(friendlyName))
|
.filter(gm -> gm.getWorldSettings().getFriendlyName().equalsIgnoreCase(friendlyName))
|
||||||
.map(gm -> gm.getOverWorld()).findFirst().orElse(null);
|
.map(GameModeAddon::getOverWorld).findFirst().orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user