[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

    If it ever becomes possible to remove the requirement of holding a sign, I will do so, and let you choose whatever item you want instead.
     
  3. Offline

    ACStache

    has anyone tested this against RB 928 or 935? just curious :)
     
  4. Offline

    ArmEagle

    I didn't, though I should have. But there is no reason it won't work. Why don't you see and let us know? :)
     
  5. Offline

    dragonhib

    Works properly with rb928 on my server
     
  6. Offline

    ACStache

    it's working for the most part. I'm able to change owner, get who the owner is, and edit them. One issue I've found crop up is not all signs are working this way. I have a 2x2 hallway and have 2 signs facing each other. when I try to edit it, nothing happens. I'm standing there looking at it with a sign in hand. To edit it, I have to go to the side and look at the thin side of the sign in order for it to pop up and give me the sign edit stuff.
     
  7. Offline

    ArmEagle

    That is because it works on you placing another sign, in that case in front of the other sign. But as you said you have two signs opposite of each other. So there's no place to put that sign (the opposing sign is a full block after all).

    Good thing you can put signs on the side and top/bottom.
     
  8. Offline

    Celtic Minstrel

    @ACStache – Sorry, there's nothing I can do about that. You can also in theory look at the thin top or bottom of the sign, but if you have a 2x2 hallway filled with signs there's no way you'll be able to edit any of them.
     
  9. Offline

    ACStache

    oooooo I get it. it's alright though, it was a short hallway and just those 2 signs were doing that. That makes a ton of sense now though, since I briefly see them in the wrong spot, and then they go to where they should be. Thanks for the info :)
     
  10. Offline

    ThorSve33

    ...I'm unable to edit signs with b935...when I right-click a sign to edit it (and I am a '*'), I just get a "Created a Private Sign successfully" message. This is lolwut.
     
  11. Offline

    Celtic Minstrel

    That message is from LWC, I believe. I don't see why it would block you from editing a sign though.
     
  12. Offline

    Algester

    hmm I need to confirm on this what are the chances this mod will make a conflict with Falsebook sign commands?
     
  13. Offline

    Celtic Minstrel

    I can't find Falsebook in the plugin forum, so I'm not certain, but generally speaking it will conflict with plugins that do something when you right-click on a sign. This won't be universally true, but definitely if the right-click shows an inventory window and likely if the right-click causes a teleport. It shouldn't conflict with magic signs that have a passive effect, and I'd expect it not to conflict with signs that act as switches.

    If you decide to use this plugin along with something like Falsebook, I recommend setting the owner of Falsebook signs (at least the ones that trigger the infinite sign bug) to no owner, or poke the Falsebook developer to use my plugin's setSignOwner method to do it automatically.
     
  14. Offline

    Algester

    then off to download I go ahh the peace i can finally get to tinker with signs
     
  15. Offline

    ArmEagle

    For the break-protect option. Do you have any permission node that allows destroying of 'unowned' signs?

    Edit:
    Also, how did those permissions actually change? Did you just insert ".node" after "simplesignedit"?
     
  16. Offline

    Celtic Minstrel

    No, I don't, but having such a thing makes sense. I'll add it in.

    If you mean the note I made in the changelog about permissions nodes changing, I was using simplesign.* but am now using simplesignedit.*. Though the old ones will continue to work until a hypothetical version 1.5.
     
  17. Offline

    ArmEagle

    Ah, doh. I never noticed the difference of "edit", was too focused on the ".node" part. This makes sense now :).
     
  18. Offline

    LucidLethargy

    While I get errors on startup, the plugin performs perfectly on CB: 935 as far as I can tell. Colors, Text, Editing, everything.
     
  19. Offline

    Celtic Minstrel

  20. Offline

    y1985

    Use with Lockette plugin causes to duplicated sign.
    Step:
    1. craft a chest, put it snap to wall
    2. lock a chest with [private]
    3. then try to edit the sign causes a sign to duplicated.

    If there anyway to fix this?

    MC 1.6.6 bukkit 860
    Thanks.

    Oops! If this report already, then sorry bro.
     
  21. Offline

    Celtic Minstrel

    There's a known bug related to sign duplication. What happens if you right-click the sign without holding a sign? The bug is usually related to plugins assigning a right-click action to signs.

    My suggestion is to set the owner of the sign to no-one so it cannot be edited (except by those with override access). If you haven't changed the config, this is done by right-clicking it with a feather.
     
  22. Offline

    jasonsj10

    Great Plugin, Thanks!
     
  23. Offline

    ThorSve33

    Can you resolve this Private Sign issue please? I can't even place a sign.

    [EDIT] I'm RETARDED. I had spawn protection on unknowingly.
     
  24. Offline

    Celtic Minstrel

    I think the Private Sign notices come from LWC... not sure though. In any case, they're nothing to do with this plugin.
     
  25. Offline

    ThorSve33

    Ya, I edited my last post, I'm retarded.
     
  26. Offline

    Celtic Minstrel

    Don't worry, that's an easy mistake. :)
     
  27. Offline

    Nick Fiering

    i get an error when shutting down my server :
    Code:
     22:37:41 [SEVERE] Error occurred while disabling SimpleSignEdit v1.4 (Is it up t
    o date?): null
    java.lang.NullPointerException
            at ca.celticminstrel.signedit.SignEdit.onDisable(SignEdit.java:285)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:128)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade
    r.java:878)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag
    er.java:280)
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginMana
    ger.java:273)
            at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:14
    6)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:312)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:391)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  28. Offline

    Celtic Minstrel

    I have no clue what could possibly cause that, sorry.
     
  29. Offline

    Celtic Minstrel

    Version 1.5

    • Add a getOwner function to the public API
    • Updated for Bukkit superperms, and other little things
    • No longer uses Permissions, even if present
    • The simplesign.x nodes are no longer checked; use simplesignedit.x instead
    • Doesn't send sign updates once per player (which doesn't imply not sending to all players, hopefully)
    • Fixed colour permissions to work as advertised

    If you're still using something like PermissionsEx or Permissions, you should probably wait awhile before updating since they will no longer be supported. If you're not using any kind of permissions at all, or you've already made the switch to Bukker superperms, or you're satisfied with the default permissions (everyone can edit their own signs, ops can use colours, set owner, and edit anyone's signs), then go ahead and update.
     
  30. Offline

    Niaghaman

    If i want to give a permission for one group to use blue on sign, how should permission code look like? like this: simplesignedit.colour.9 ? Code for blue is &9
     
  31. Offline

    Cenarius

    :'(
     
    Mr_Fj likes this.

Share This Page