Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by TwerkRekt, Feb 2, 2020.
hello, anyone have code for block mine "XX" block mine with silk touch?
Please try writing this code yourself. If it doesn't work, then come here for help.
bannedblocks = [Material.STONE, ...]
on block break:
hasSilkTouch = p.getItemInMainHand().hasEnchant(silktouch)
isBanned = bannedblocks.contains(e.block.type)
if hasSilkTouch && isBanned:
We don't spoonfeed on here, so the psuedocode above should do the trick. Use google to create your code piece-by-piece if you do not fully understand it.
That's good, but you forgot he wanted small code. Here: