mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-05 07:58:11 +01: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, () -> {
|
||||
if (!chunkQ.isEmpty()) {
|
||||
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);
|
||||
}
|
||||
}, 0L, 1L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -206,8 +206,7 @@ public class IslandWorldManager {
|
||||
/**
|
||||
* Get the overworld based on friendly name.
|
||||
*
|
||||
* @param friendlyName
|
||||
* - friendly name of world
|
||||
* @param friendlyName friendly name of world
|
||||
* @return overworld, or null if it does not exist
|
||||
* @since 1.1
|
||||
*/
|
||||
@ -215,7 +214,7 @@ public class IslandWorldManager {
|
||||
public World getOverWorld(@NonNull String friendlyName) {
|
||||
return gameModes.values().stream().distinct()
|
||||
.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