mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-09 20:21:07 +00:00
Fix another creative mode exploit
This commit is contained in:
parent
b090751d89
commit
2e31bbc2b5
@ -274,8 +274,11 @@ class ShopCommandExecutor implements CommandExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClickType.setPlayerClickType(p, new SelectClickType(p.getGameMode(), amount, buyPrice, sellPrice, shopType));
|
if (!(ClickType.getPlayerClickType(p) instanceof SelectClickType)) {
|
||||||
p.setGameMode(GameMode.CREATIVE);
|
// 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));
|
p.sendMessage(LanguageUtils.getMessage(Message.SELECT_ITEM));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user