block place deny

jokillerpt

Supporter
Supporter
Member
Joined
Jan 8, 2017
Messages
9
can some one help me do a plugin that deny place a sponge when its other sponge near
 

drose

Supporter
Supporter
Member
Joined
Dec 11, 2017
Messages
7
Leaked Spigot Plugins & More
5
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 :D
ps: dont forget to make a plugin.yml
 
BlackSpigot General Chat
Rules Help Users
    WASTEDYEARS @ WASTEDYEARS: could i put my discord here
    Top