SteamWar/BauSystem2.0
Archiviert
12
0

Fix TNTSimulator still shown after removing from inventory

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-08-27 13:02:30 +02:00
Ursprung 56f7fddb0e
Commit ecc24470f6

Datei anzeigen

@ -54,6 +54,8 @@ public class TNTSimulatorListener implements Listener {
public void onPlayerMove(PlayerMoveEvent e) { public void onPlayerMove(PlayerMoveEvent e) {
if (ItemUtils.isItem(e.getPlayer().getInventory().getItemInMainHand(), "simulator")) { if (ItemUtils.isItem(e.getPlayer().getInventory().getItemInMainHand(), "simulator")) {
simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInMainHand, e.getTo()); simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInMainHand, e.getTo());
} else {
simulatorShowHide(e.getPlayer(), i -> null, i -> null, e.getTo());
} }
} }