SteamWar/FightSystem
Archiviert
13
1
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-05-08 14:56:29 +02:00
Ursprung ab24b5bc24
Commit 7ddd8052c8

Datei anzeigen

@ -29,6 +29,7 @@ import org.bukkit.Material;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.inventory.InventoryDragEvent;
@ -123,4 +124,10 @@ public class InFightInventory implements Listener {
e.setCancelled(true); e.setCancelled(true);
} }
} }
@EventHandler
public void onBlockDispense(BlockDispenseEvent e) {
if(e.getItem().getType() == Material.TNT)
e.setCancelled(true);
}
} }