Cancelling a sign break, the missing text bug.

Discussion in 'Plugin Development' started by daemitus, Dec 10, 2011.

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

    daemitus

    This concerns the bleeding edge bukkit releases.

    As some may know, cancelling an event related to breaking a sign causes a clientside bug where the text disappears. Since moving to the 1337+ builds, the usual method of fixing this has ceased to exist.

    Some of the things ive tried.
    Code:
    //FAILED - sets to air, replaces after 1 tick, works occasionally.
    plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new ProtectionRegenTask(block), 1);
    
    //FAILED
    block.setTypeIdAndData(block.getTypeId(), block.getData(), false);
    
    //FAILED
    ((Sign)block.getState()).update(true);
    
    //FAILED
    Sign sign = (Sign)block.getState();
    for(int i = 0; i < 4; i++)
        sign.setLine(i, sign.getLine(i));
    sign.update();
    
    //FAILED
    block.setTypeIdAndData(block.getTypeId(), (byte) (block.getData() + 1), false);
    block.setTypeIdAndData(block.getTypeId(), block.getData() , false);
    Ideas?
     
  2. Offline

    Fixatec

    Very strange that this fails:

    Sign sign = (Sign)block.getState();
    for(int i = 0; i < 4; i++)
    sign.setLine(i, sign.getLine(i));
    sign.update();


    I'll see if i can reproduce this bug and try some things myself. I'll keep you notified.

    EDIT:
    1 More thing, does this bug occurs when the sign is protected or without any protection?

    EDIT 2:
    Tried this with LWC and breaking it with another player. Seems to be fixed in the latest build [1572] Upon breaking the sign gets refreshed and shows the text.
     
Thread Status:
Not open for further replies.

Share This Page