mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-01-10 08:57:17 +00:00
Fix guest gamemode flag.
This commit is contained in:
parent
8cd54929e7
commit
3c64376abe
1 changed files with 4 additions and 4 deletions
|
@ -100,15 +100,15 @@ public class PlotListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Optional<PlotGameMode> guestGamemodeFlag = plot.getFlag(Flags.GUEST_GAMEMODE);
|
Optional<PlotGameMode> guestGamemodeFlag = plot.getFlag(Flags.GUEST_GAMEMODE);
|
||||||
if (gamemodeFlag.isPresent()) {
|
if (guestGamemodeFlag.isPresent()) {
|
||||||
if (player.getGameMode() != gamemodeFlag.get() && !plot
|
if (player.getGameMode() != guestGamemodeFlag.get() && !plot
|
||||||
.isAdded(player.getUUID())) {
|
.isAdded(player.getUUID())) {
|
||||||
if (!Permissions.hasPermission(player, "plots.gamemode.bypass")) {
|
if (!Permissions.hasPermission(player, "plots.gamemode.bypass")) {
|
||||||
player.setGameMode(gamemodeFlag.get());
|
player.setGameMode(guestGamemodeFlag.get());
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, StringMan
|
MainUtil.sendMessage(player, StringMan
|
||||||
.replaceAll(C.GAMEMODE_WAS_BYPASSED.s(), "{plot}", plot.getId(),
|
.replaceAll(C.GAMEMODE_WAS_BYPASSED.s(), "{plot}", plot.getId(),
|
||||||
"{gamemode}", gamemodeFlag.get()));
|
"{gamemode}", guestGamemodeFlag.get()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue