This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I user Craftbukkit 1.6.2-R0.1-SNAPSHOT
I have made an BlockPlaceEvent, and i tried to change the block when a player placed it.I used e.getBlock().setType()When i debug the plugin, and place the block i wanted to be changed. I was kicked from server for Internal Server Error
@EventHandler public void PlaceBlockEvent(final BlockPlaceEvent e) { Block g = e.getBlock(); if (g.getType() == Material.TNT) {
e.setCancelled(true); g.getLocation().getBlock().setType(Material.CAKE); } }
I have tried all different ways. Either i get kicked, or it will not work
To post a comment, please login or register a new account.