From 3c64376abe3a428d4cfb16748cde6473cdf41d81 Mon Sep 17 00:00:00 2001 From: sauilitired Date: Wed, 14 Nov 2018 23:40:27 +0100 Subject: [PATCH] Fix guest gamemode flag. --- .../plotsquared/plot/listener/PlotListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java index 7394dbc0a..6d1eb2ba4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java @@ -100,15 +100,15 @@ public class PlotListener { } } Optional guestGamemodeFlag = plot.getFlag(Flags.GUEST_GAMEMODE); - if (gamemodeFlag.isPresent()) { - if (player.getGameMode() != gamemodeFlag.get() && !plot + if (guestGamemodeFlag.isPresent()) { + if (player.getGameMode() != guestGamemodeFlag.get() && !plot .isAdded(player.getUUID())) { if (!Permissions.hasPermission(player, "plots.gamemode.bypass")) { - player.setGameMode(gamemodeFlag.get()); + player.setGameMode(guestGamemodeFlag.get()); } else { MainUtil.sendMessage(player, StringMan .replaceAll(C.GAMEMODE_WAS_BYPASSED.s(), "{plot}", plot.getId(), - "{gamemode}", gamemodeFlag.get())); + "{gamemode}", guestGamemodeFlag.get())); } } }