1.12.2 How to player stop breaking block without blockBreakEvent

Discussion in 'Spigot Plugin Development' started by KimSeonWoo, Jul 30, 2021.

  1. Hello, I'm junior developer

    I'm going to prevent left-click interact specific block( like door ) without blockBreakEvent
    so, I want to set block durability but block hasn't that method

    -- info --
    1. using LocketteProAPI => checking block locking
    2. using PlayerInteractEvent
    -----------

    Tried:
    1. In playerInteractEvent, event.setCanceled(true) => isn't work still attacking block and then block's durability has decrease
    2. In playerInteractEvent, event.setUseInteractedBlock(Event.Result.DENY) => same result at tried one
    3. in ~~, for first interact block setType bedRock & player set gamemode=Adventure and then setType Door after 1ticks => door was half figure

    I need your idea for this problem

    thanks for reading about bad english
     
  2. Thanks but isn't interchange about locketteAPI and canceled event at specific block
     
  3. Use packets such as Block destroy start packet