SteamWar/BauSystem2.0
Archiviert
12
0

Fix offhand simulator
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-07-18 16:15:53 +02:00
Ursprung 58a6a855a8
Commit f1f783f0ec

Datei anzeigen

@ -32,7 +32,6 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemHeldEvent;
@ -96,7 +95,11 @@ public class TNTSimulatorListener implements Listener {
@EventHandler
public void onPlayerMove(PlayerMoveEvent e) {
simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInMainHand, e.getTo());
if (!ItemUtils.isItem(e.getPlayer().getInventory().getItemInMainHand(), "simulator")) {
simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInMainHand, e.getTo());
} else {
simulatorShowHide(e.getPlayer(), i -> null, PlayerInventory::getItemInOffHand, e.getTo());
}
}
@EventHandler