Solved fixed

Discussion in 'Spigot Plugin Development' started by TwerkRekt, Feb 2, 2020.

Thread Status:
Not open for further replies.
  1. hello, anyone have code for block mine "XX" block mine with silk touch?
     
  2. Please try writing this code yourself. If it doesn't work, then come here for help.
     
  3. Psuedocode:
    Code (Text):
    bannedblocks = [Material.STONE, ...]
    on block break:
        hasSilkTouch = p.getItemInMainHand().hasEnchant(silktouch)
        isBanned = bannedblocks.contains(e.block.type)
        if hasSilkTouch && isBanned:
            cancel
       
     
    • Winner Winner x 3
  4. 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.
     
  5. Strahan

    Benefactor

    That's good, but you forgot he wanted small code. Here:
    [​IMG]
    lol
     
Thread Status:
Not open for further replies.