mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2025-02-16 12:21:21 +01:00
Flip bool expression (#114)
This commit is contained in:
parent
2be57a66d2
commit
7a26acefd9
@ -252,8 +252,11 @@ public class Warp extends Addon {
|
||||
String name = this.getPlugin().getIWM().getAddon(world).map(g -> g.getDescription().getName()).orElse("");
|
||||
return this.getPlugin().getAddonsManager().getAddonByName(LEVEL_ADDON_NAME)
|
||||
.map(l -> {
|
||||
if (!name.isEmpty() && ((Level) l).getSettings().getGameModes().contains(name)) {
|
||||
return ((Level) l).getIslandLevel(world, uniqueId);
|
||||
final Level addon = (Level) l;
|
||||
//getGameModes is a list of gamemodes that Level is DISABLED in,
|
||||
//so we need the opposite of the contains.
|
||||
if (!name.isEmpty() && !addon.getSettings().getGameModes().contains(name)) {
|
||||
return addon.getIslandLevel(world, uniqueId);
|
||||
}
|
||||
return null;
|
||||
}).orElse(null);
|
||||
|
Loading…
Reference in New Issue
Block a user