Fix another creative mode exploit

This commit is contained in:
Eric 2019-06-14 21:16:06 +02:00
parent b090751d89
commit 2e31bbc2b5

View File

@ -274,8 +274,11 @@ class ShopCommandExecutor implements CommandExecutor {
return;
}
if (!(ClickType.getPlayerClickType(p) instanceof SelectClickType)) {
// Don't set previous game mode to creative if player already has select click type
ClickType.setPlayerClickType(p, new SelectClickType(p.getGameMode(), amount, buyPrice, sellPrice, shopType));
p.setGameMode(GameMode.CREATIVE);
}
p.sendMessage(LanguageUtils.getMessage(Message.SELECT_ITEM));
} else {