Fixing Block Destroy Protection

Discussion in 'Plugin Development' started by Shade, Feb 24, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Shade

    Code:
    // Destroy a block
    [BLOCK_DAMAGED] Block = CraftBlock{chunk=CraftChunk{x=-10z=-16}x=-157y=65z=-250}
    [BLOCK_DAMAGED] Damage Level = STARTED
    [BLOCK_DAMAGED] Block = CraftBlock{chunk=CraftChunk{x=-10z=-16}x=-157y=65z=-250}
    [BLOCK_DAMAGED] Damage Level = STOPPED
    [BLOCK_BREAK] Block = CraftBlock{chunk=CraftChunk{x=-10z=-16}x=-157y=65z=-250}
    [BLOCK_BREAK] Player = CraftPlayer{name=Player}
    
    // Destoy halfway then stop
    [BLOCK_DAMAGED] Block = CraftBlock{chunk=CraftChunk{x=-10z=-16}x=-157y=65z=-251}
    [BLOCK_DAMAGED] Damage Level = STARTED
    
    The old way was to check BROKEN. Instead, check STOPPED.

    My tests show protecting land have a delay in re-showing the block, but can't be walked through.
    However, this will fire off any messages long before finishing the block.
     
Thread Status:
Not open for further replies.

Share This Page