Remove Sign Programmatically

Discussion in 'Plugin Development' started by hskrasek, Dec 26, 2012.

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

    hskrasek

    So a part of my plugin involves removing a plot, and the identifying signs on it. Right now I am simply just setting the block's material type to AIR but when I do this the game says " Unable to locate sign at X, Y, Z". Anyone know why this would happen? Or how to keep that message from being sent to the player?
     
  2. Offline

    CubieX

    Looks like your sign object is not properly set to the actual sign block.
    Having a bit of code would be helpful.
     
  3. Offline

    hskrasek

    Sorry been busy today, here is a pastebin link: http://pastebin.com/TBR4EPFD

    The regeneratePlot doesnt do anything to the signs, and the removeSign method is just a simple, get the block at the location and then set it to AIR. It removes the sign alright but then it still sends the unable to locate message.

    I just saw you edited the post, the email message was different :p and well when I was checking to make sure I had the right block, I was printing the block material to console and was getting SIGN_POST. Does that mean I need to go one block up to get the actual SIGN? I am not to sure, didn't know Bukkit differentiated between the post and sign
     
  4. Offline

    nisovin

    If a message is being sent to a player, then it's probably a plugin doing it. I don't believe the server itself will send that kind of message to a player.
     
  5. Offline

    hskrasek

    Would it matter if I had myself OP'ed? The only plugins on the server are Multiverse-Core, Multiverse-Inventories, Multiverse-NetherPortals, Multiverse-Portals, InfinitePlots, InfiniteClaims (my plugin), WorldGuard, and WorldEdit.

    WorldGuard and WorldEdit are both required by my plugin and InfinitePlots is the plugin mine works with in tandem.

    Sorry to be bothersome, just don't want the server admins coming back upset because the Unable to locate signs messages are driving them crazy.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  6. Offline

    hskrasek

    So for now I have decided to instead of remove the sign block, just remove all the text. In the event that the plot gets reclaimed the sign would be placed there again and updated so it is just down to aesthetics. I do know that if I use the breakNaturally method the sign breaks just fine, but I don't like the idea of signs just laying on the ground and randomly being picked up. So unless anyone has a suggestion to like break the sign and clear the drop without writing a con-deluded blockBreak event to block it from dropping, this will work for now.

    Thanks for all the help and suggestions guys.
     
  7. Offline

    fireblast709

    sign.setType(Material.AIR)
     
  8. Offline

    Comphenix

  9. Offline

    hskrasek

    This is what I was originally doing.

    Thank you! I would have never thought it was a client side bug. Now I can cite this as my reason for not removing the signs for now, and then once this is solved, I can remove the signs.

    Thanks for all the help guys!
     
Thread Status:
Not open for further replies.

Share This Page