[MECH/EDIT] SimpleSignEdit v1.7.1 - Edit signs with right-click, now on BukkitDev [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Celtic Minstrel, Mar 22, 2011.

  1. Offline

    Celtic Minstrel

    Not satisfied with the mechanics of other sign edit tools, such as requiring the use of commands, I went and threw together a plugin that lets you edit signs simply by right-clicking them with another sign in hand.
    Download from the BukkitDev page. (Older versions available here.)

    When you right-click to edit a sign, you can then view and edit the text of the sign just as you would when creating it. You can only edit signs if you are the owner or if they are owned by everyone. To include colours on the sign, use the & character followed by a digit or a letter from A to F. This works both when placing and when editing. If you want to include an & character on the sign, and the plugin interprets it as a colour code, simply double it and the plugin will realize that you don't want it to be converted.

    To see who owns a sign, hold a stick in your hand (you can change this to any item in the config file), and right-click the sign. To change who owns a sign if you have permission, hold a feather in your hand (you can change this to any item in the config file), and right-click the sign. Then either type the new owner name into chat, or walk over and punch them. You can also enter the symbols @, #, and * into chat to set the owner to yourself, no-one, or everyone, respectively. You could also edit ownership by editing the config file, but since signs are stored by their location that would not be an easy task.

    To configure the items used for setting/viewing the owner of the sign, simply set the "view-owner" or "set-owner" values in the config file to the ID of the item you want to use. You can also change the "allow-stacking" and "break-protect" values if you wish. It's probably a good idea to leave the "signs" section alone since that keeps track of who owns which sign. You can also configure it so that you need to be sneaking (or not sneaking) to edit signs.

    Permissions nodes:
    • simplesignedit.edit - Allows players to edit the signs they have placed as well as public signs (owned by everyone). If Permissions is not installed, everyone gets this.
    • simplesignedit.edit.all - Allows players to edit any sign, including those with no owner and those placed by others. If Permissions is not installed, only ops get this
    • simplesignedit.colour.<code> - Allows players to use the specified colour on signs. Available colours are listed here, but leave out the underscores and use all lowercase. Or you can just give simplesignedit.colour.*; also, the U in colour is optional. Currently this is restricted to ops if Permissions is not installed
    • simplesignedit.setowner - Allows players to change the owner of a sign. If Permissions is not installed, only ops get this.

    Config options:
    • allow-stacking - Allows sign posts to be built on top of sign posts; if false, an attempt to stack sign posts will result in the edit window appearing.
    • break-protect - Protect signs from being broken by people other than their owner. Obviously signs owned by everyone can then be broken by everyone.
    • orphaned-breakable - If the above is set to true, this controls whether signs owned by no-one can be broken by anyone.
    • sneaking - One of "true", "false", or "both"; if true, you must be sneaking to edit signs, and if false, you must not be sneaking to edit signs. The default, "both", means that your sneaking status is not checked when determining if you should edit the sign.
    • view-owner - The ID of the item used to see the owner of a sign by right-clicking. Defaults to stick.
    • set-owner - The ID of the item used to set the owner of a sign by right-clicking. Defaults to feather

    Video by Warby579:


    List of things to maybe do:
    • None right now

    Changelog:

    Version 1.7
    • Now uses a database to keep track of sign ownership.
    • Added auto-save option.

    Version 1.6.2
    • Added configuration option to allow anyone to break signs that have no owner even if break protection is enabled; it has no effect if break protection is not enabled
    • Fixed a potential NullPointerException that would sometimes occur when disabling; this bug could in theory haved cause loss of owner data
    • Fixed PermissionsBukkit antibuild interfering with the operation of the plugin; now you should be able to edit signs if you have simplesignedit.edit even if you do not have permissions.build
    • Fixed duplication issue that resulted from a conflict with plugins that display an inventory window when right-clicking a sign; any other, similar duplication issues that I'm unaware of should be similarly fixed

    Version 1.6.1
    • Editing signs despite anti-build should now work with more anti-build plugins. It still might not work with some though.

    Version 1.6
    • Added an option to require that you are sneaking (or not sneaking) in order to edit signs. By default, you can edit signs regardless of whether you are sneaking.
    • Added the simplesignedit.* permission node, which somehow I managed to forget when implementing superperms support.
    • Added more API stuff. I suppose it's unlikely people will use it, but still. Also, the API is now used internally as well.
    • It should now be possible to make signs editable for users who do not have build permission. Whether it actually works may also depend on what plugin you use for anti-build. It still won't affect built-in spawn protection though.
     
    Taranis01, Pompeij and ksevelyar like this.
  2. Offline

    Celtic Minstrel

    That, I can do, but they won't be able to edit signs placed before updating to the version that allows it.

    It won't prevent people from breaking them and putting them back, though.
     
  3. Offline

    M0rti

    Two Problems.
    First: I have a sign with 4 names. If i try to delete one name, it is still there. I have to break the sign. Is theer a way to just delete something from the sign?
    Second: I have signs on a wool block ...if i right click them from the side, i get another sign to my inventory every time i click ...but i can't edit the sign from the side.
     
  4. Offline

    Celtic Minstrel

    Did you put a space on the line you're trying to delete?

    I'll look into this and see if it's fixable.

    EDIT: Just tested and it works for me on CraftBukkit ~621... can I have more detail, and a CraftBukkit version?
     
  5. Offline

    M0rti

    Thanks. I try the space.

    It is CB617 maybe a problem with another plugin.
     
  6. Offline

    Celtic Minstrel

    So, the space works for you?
     
  7. Offline

    M0rti

    Yes ..thanks.
     
  8. Offline

    Gea

    One question. Is there a way we can set it to not require a sign in hand to work?
     
  9. Offline

    Celtic Minstrel

    Not unless Notch adds a way for the server to tell the client to open a sign edit window. Sorry; I'd like that too, but it appears to be impossible at present.
     
  10. Offline

    Gea

    Ah, so that's why it has to specifically be a sign. After watching someone else do this today I totally understand how it works. Hmm. Alright, thank you anyways.
     
  11. Offline

    .$pIrit

    There is a problem with this plugin ;)
    You can cheat signs.

    If you have a wall sign with a blog infront of it and you right-click it you get a sign added to your stack.

    Regards
     
  12. Offline

    Infectedd

    Code:
    23:11:06 [SEVERE] Could not pass event PLAYER_INTERACT to SimpleSignEdit
    java.lang.IllegalAccessError: tried to access class ca.celticminstrel.signedit.S
    ignEdit$SignUpdater from class ca.celticminstrel.signedit.SignEdit$2
            at ca.celticminstrel.signedit.SignEdit$2.onPlayerInteract(SignEdit.java:
    104)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:217)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:207
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    23:11:06 [SEVERE] Could not pass event PLAYER_INTERACT to SimpleSignEdit
    java.lang.IllegalAccessError: ca/celticminstrel/signedit/SignEdit$SignUpdater
            at ca.celticminstrel.signedit.SignEdit$2.onPlayerInteract(SignEdit.java:
    104)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:217)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:207
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    CB612
    what else? I like the idea hell of a lot, it's really cool
     
  13. Offline

    Celtic Minstrel

    It's odd that I didn't get that error when I tested it, but fortunately it looks like it's easy to fix.

    This also looks easy to fix. I suppose I'll release an update sometime this weekend. It'll be built with the latest recommended (670), but I expect it should still work with earlier builds.
     
  14. Offline

    Celtic Minstrel

    This is sadly impossible, since that's entirely client-side.

    Eh, I don't really care too much about that.

    This will be in 1.1, which is almost ready for release.

    I think I figured out the reason for this; if you have a sign beside some other attachable object (such as a torch) and are trying to edit from behind the torch, then you would run into the same bug that Spirit encountered.

    Fixed in 1.1.

    Version 1.1 is now released. Download it from the first post.

    It now keeps track of who owns the sign and only allows the owner to edit a sign. Signs placed before this version is installed will have no owner; you will need to either break the sign and replace it, or get someone to set the owner.

    It also fixes another bug that (apparently) no-one noticed which would allow people to get free signs (and cancel the attempted edit in the process); since editing a sign creates a temporary sign next to the one being edited, it was possible to break that sign. This is no longer the case; the sign will refuse to break. Regular signs are unaffected; only temporary "ghost" signs are unbreakable. (If you want all signs to be unbreakable, there are other plugins that already let you do that.)

    You can set or view the owner of a sign by right-clicking with a configurable item (defaults to feather and stick respectively). Of course, setting the owner requires additional permissions.

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

    LucidLethargy

    Works like a charm, amazing work! :D
    I'm going to keep SignEdit around for times when I need that extra letter or letters for longer words, but that's the only reason - this is great!
     
  16. Offline

    theguruofreason

    Having a problem here: when I r-click a placed sign with a sign in hand, instead of changing the text on the sign I r-clicked it spawns a new sign 1 block in front of the sign I'm trying to edit, often floating in the air. Helps?
     
  17. Offline

    Celtic Minstrel

    That sign is supposed to disappear when you close the sign window. Are you sure you have SimpleSignEdit installed? Are there any error messages in the console? What version of CraftBukkit are you on?
     
  18. Offline

    theguruofreason

    Ah, turns out I'm using Bukkit 674. Any chance for an update?
     
  19. Offline

    Celtic Minstrel

    It should work fine on 674. I don't think there were any breaking changes between 670 and 674.

    Try it and let me know; if it does, I can update the title.
     
  20. Offline

    theguruofreason

    yeah, I'm actually running 677 and the new sign appears floating 1 block in front of the sign I'm trying to edit. It stays there, doesn't replace the text of the other sign.
     
  21. Offline

    Celtic Minstrel

    Do you get an error in the console? What plugins are you using?
     
  22. Offline

    EliteASH_11

    Is it possible to make this and be able to edit a essentials buy/sell/trade sign?
     
  23. Offline

    Celtic Minstrel

    I imagine so. I suspect that it wouldn't affect the actual behaviour of the sign though.
     
  24. Offline

    andreblue

    is this compatable with CraftBukkit Build 677?
     
  25. Offline

    Celtic Minstrel

  26. Offline

    Azxdcvg

    Doesn't work with CB #689.

    Places a sign on top, and neither can be removed. No errors in console.
     
  27. Offline

    Celtic Minstrel

    That's due to a bug in CraftBukkit 689-703. Upgrade to 704 or higher and download v1.2 of the plugin.

    Updated to v1.2 which makes it compatible with Minecraft 1.5 builds of CraftBukkit (704+).
     
  28. Offline

    Shamebot

    SpeedSign does that.
     
  29. Offline

    Phaedrus

    Is the new release incompatible with 684?

    Code:
    13:13:49 [SEVERE] Could not pass event SIGN_CHANGE to SimpleSignEdit
    java.lang.NoSuchFieldError: netServerHandler
            at ca.celticminstrel.signedit.SignEdit.sendSignUpdate(SignEdit.java:283)
            at ca.celticminstrel.signedit.SignEdit.access$100(SignEdit.java:42)
            at ca.celticminstrel.signedit.SignEdit$SignUpdater.run(SignEdit.java:76)
            at ca.celticminstrel.signedit.SignEdit$1.onSignChange(SignEdit.java:96)
            at org.bukkit.plugin.java.JavaPluginLoader$29.execute(JavaPluginLoader.java:374)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:860)
            at net.minecraft.server.Packet130UpdateSign.a(SourceFile:39)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  30. Offline

    Sidi

    I found bug allowing anyone to have unlimited signs in stacks of 100+units. I don't wanna make it public, so please contact me on mail vojta.patek@gmail.com
     
  31. Offline

    Celtic Minstrel

    Thanks for pointing that out to me. Armed with that knowledge, I have created and released v1.3 which lets you do that. (It was actually surprisingly easy to do.)

    Yes, as the thread title clearly states. Old versions are still available from the same place as the main download.

    I'd prefer if you PM it to me.
     

Share This Page