jokillerpt Supporter Supporter Member Jun 10, 2018 #1 can some one help me do a plugin that deny place a sponge when its other sponge near
drose Supporter Supporter Member Jul 23, 2018 #2 Simple. make a normal plugin with onEnable void and make it extend JavaPlugin and implements Listener then go on the onEnable void and type Bukkit.getPluginManager().registerEvents(this, this); and then put this under the onEnable void. Code: @EventHandler public void onBlockPlace(BlockPlaceEvent e) { if(e.getBlockPlaced.getType() == Material.SPONGE) { e.setCancelled(true) } Sorry if there's something wrong on it. have fun ps: dont forget to make a plugin.yml
Simple. make a normal plugin with onEnable void and make it extend JavaPlugin and implements Listener then go on the onEnable void and type Bukkit.getPluginManager().registerEvents(this, this); and then put this under the onEnable void. Code: @EventHandler public void onBlockPlace(BlockPlaceEvent e) { if(e.getBlockPlaced.getType() == Material.SPONGE) { e.setCancelled(true) } Sorry if there's something wrong on it. have fun ps: dont forget to make a plugin.yml