[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

    Phaedrus

    Getting an error with 1.3.

    Code:
    16:37:01 [SEVERE] Could not pass event SIGN_CHANGE to SimpleSignEdit
    java.lang.NoSuchFieldError: netServerHandler
            at ca.celticminstrel.signedit.SignEdit.sendSignUpdate(SignEdit.java:299)
            at ca.celticminstrel.signedit.SignEdit.access$100(SignEdit.java:43)
            at ca.celticminstrel.signedit.SignEdit$SignUpdater.run(SignEdit.java:77)
            at ca.celticminstrel.signedit.SignEdit$1.onSignChange(SignEdit.java:97)
            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)[/code
    
    It now shows the previous text, which is cool, but the text I change doesn't stick. It just reverts when I click done. and then that error shows up in the console. Sometimes when I go back in to edit the sign again the lines change to !?
    
    Any known conflicts with other sign plugins?
     
  3. Offline

    Celtic Minstrel

    1.3 is not compatible with Minecraft 1.4 builds of Bukkit. Sorry. As for !?, I'm not sure what causes that. If you were using Bukkit 704 or higher I would ask you for a way to reproduce it.
     
  4. Offline

    McAndze

    For those of you having the problem where a new sign would appear, and not disappear again, you have to have Permissions installed :)

    Thanks for the plugin!

    EDIT: The "!?" is caused by editing a signs with colours on it. The coloured lines will turn into "!?". Probably because it does not read the "&". The only way to work around this is by deleting the whole line, until the flashy "> <" is not coloured anymore. After that, delete one more character.
     
  5. Offline

    Celtic Minstrel

    No you don't, but if Permissions is not installed you need to be an op to edit signs. Actually, I suspect that makes it useless without Permissions... I'll have to fix that.

    That's odd, because I edited a coloured line and it worked just fine. I'll do some investigation though.
     
  6. Offline

    McAndze

    It threw an exception because Permissions was not installed. And yes, I was OP :)

    I'll pastie.org the exception when I can log on to my private server again. It is down for some reason.
     
  7. Offline

    Celtic Minstrel

    I'll try disabling Permissions and testing it that way.

    Uploaded version 1.3.1, which fixes the issue of not working without Permissions.

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

    Phaedrus

    So if 1.3 is for bukkit 704+ can you put up a download link for the previous version?
     
  9. Offline

    Celtic Minstrel

    Just copy the link and edit it to change the version number to 1.1.
     
  10. Offline

    MineralMC

    Been using this since yesterday, now getting a hell of a lot of error spam from this plugin on start/reload:
    http://pastebin.com/UrrD6m2M
     
  11. Offline

    Celtic Minstrel

    Hm, that's odd... I got something like that early on in the addition of ownership, and I never figured out why because it didn't recur after I deleted the keys from the config.yml. As a patchwork fix you could go in and delete any keys that don't conform to the format world(x,y,z), but I'm not sure if that will preserve all the ownership info.

    If you can figure out how to reproduce the problem, that would be great! I'll take a quick look right now, but I don't expect I'll be able to solve it just by examining the code.
     
  12. Offline

    MineralMC

    Cloned my main server to try and figure it out - first I thought it was a problem with Lockette, so I tested it alongside Lockette signs, and it did it. So I removed Lockette, cleared the configuration file for SimpleSignEdit and tried again, with the same loading spam.

    Reloading twice in a row seems to fix it, so I'm assuming the plugin is correcting the problem when it is unloading.

    To recreate it, drop a sign, reload, check to make sure the warning message has appeared, then reload again. The warning should be gone.

    Tested on a server with these plugins: http://plugs.failhouse.net
     
  13. Offline

    Thumm

    Having the same issue as stated above by McAndze. When editing a sign with color codes if the line is not rewritten it returns !? all lines without color work fine.
     
  14. Offline

    iffa

    Right click to edit... hmm. Mine does nothing. :/
     
  15. Offline

    Phaedrus

    I'm on bukkit 735 now and I'm still getting "!?" when I edit a line. The problem still happened on the old version too. I also get the invalid keys spam on both the old and new versions.

    Let me know if there is anything you'd like me to test. You can see a list of plugins from my sig.
     
  16. Offline

    leslieliang

    Can you make ownerships of signs to be toggled off?
     
  17. Offline

    Celtic Minstrel

    The plugin blanks the "signs" section of the yml before writing out the data from its internal storage structure, yes. However, having invalid keys could still point to some subtle problem somewhere.

    I am unable to reproduce the warning by doing this... that said, I may have misunderstood what you mean by "drop a sign".

    You need to hold a sign before right-clicking.

    Ah, I guess the client just gets confused if it sees a colour-code in the text it's going to send. I've made a change to decode the colour-codes when editing which should fix it (at the expense of not seeing the colour while editing, but that's not really a problem right?). This'll be in 1.3.3. (The link in the first post is currently 1.3.2 despite what the topic says; it fixed an issue of simplesign.edit.all not working if you didn't have Permissions installed.)

    Can you be more specific? What exactly do you want to do? Do you want anyone to be able to edit any sign by default?
     
  18. Offline

    MineralMC

    Drop, place, deploy; bring a sign into the big wide world and put some text on it.

    I can zip up the entire server and throw it on drop box if you like, it's my test server and has a few various bits and bobs on it.
     
  19. Offline

    Celtic Minstrel

    Yeah, I placed a sign, put some text on it, and reloaded, and didn't get the warning.

    ...though, I didn't try putting colour on the sign. Did you put colour on the sign?
     
  20. Offline

    MineralMC

    Nope! Just a blank one.
     
  21. Offline

    Celtic Minstrel

    Hm. Didn't try a blank one. I'll go do that now.
     
  22. Offline

    leslieliang

    Like I want to be able to turn ownership of signs off. I don't want anyone to own signs. Like before v1.1. Is it possible to have like a enable-ownership = false/true line in the config file?
     
  23. Offline

    Celtic Minstrel

    Still not getting the warning.

    Anyway, here's the official announcement. Version 1.3.1 was supposed to fix the issue of not working without Permissions, but it only partially fixed it; version 1.3.2 fixed it fully. Then in version 1.3.3 I eliminated the !? issue at the cost of not seeing the colour while editing (which is probably not important anyway, right?).

    Would it be sufficient to just make all signs default to being owned by everyone? Then you could have anyone be able to edit any sign, except you'd also be able to restrict specific signs if you chose to.

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

    leslieliang

    Well it's because I run LWC and that already protects my signs. :/
     
  25. Offline

    Celtic Minstrel

    I see... so would what I said satisfy your request?
     
  26. Offline

    leslieliang

    Not really. I don't want 2 different plugins protecting signs.
     
  27. Offline

    Celtic Minstrel

    How is it protecting them if it lets everyone edit them? :p
     
  28. Offline

    Jessicadawn

    When I right click to edit hit enter 3x to edit last line it replaces everything with !?
     
  29. Offline

    Celtic Minstrel

    Did the lines have colour and are you using the latest 1.3.3? I fixed something related to !? in 1.3.3.
     
  30. Offline

    Jessicadawn

    I will try thanks.
     
  31. Offline

    MineralMC

    Any chance we can have the option to stop signs from being used by SimpleSignEdit if placed from above? I'm trying to create signposts to help people get around my town, and have to disable SSE every time I want to place one.
     

Share This Page