Solved Making End Portal Frame break similar to regular blocks

Discussion in 'Spigot Plugin Development' started by Pacintooo, Jun 8, 2021.

  1. Hi guys I made a plugin to make End Portal Frames breakable. All works but:
    I want the block to be broken only after a few seconds of continuous pickaxing not instantly like now. I wanted to solve it by using a counter. Each time player starts pickaxing a block, BlockBreakEvent calls ONCE which is great, but I can't find any Event I can use to know if they still breaking the same block or stopped breaking it by releasing mouse button or just simply turned away from the block?
    As I see the client doesn't send any info to the server about these happenings.
    It that right? Thanks
  2. Yes, the client doesnt tell the server "hey i stopped breaking that block". You need to check when the last break event happened by yourself.
  3. That's the problem. No event calls when someone has broken an End Portal Frame since it is unbreakable.
    The only event that calls is BlockBreakEvent at the first hit on the block :(
  4. Yes the client does send info to the server, its called packets. You can listen for packets using protocol lib. PacketType.Player.Client.Block_Dig specifically.
    • Agree Agree x 1
  5. Thank you, that is what I'm looking for!