[INACTIVE][MISC] SignColours v0.3 - for allowing coloured text on signs [672]

Discussion in 'Inactive/Unsupported Plugins' started by Edward Hand, Feb 12, 2011.

  1. Offline

    Edward Hand

    SignColours v0.3

    This plugin allows all players on the server to add coloured text to signs. Simply use the # character followed by a hexidecimal digit (0-f) to give the rest of that line a colour.

    Instructions

    Colour codes are the same as chat message colours:
    [​IMG]
    using a # in a sign in any other circumstances will keep the # symbol

    As an example, adding the text to a sign:

    #4###WARNING###
    #6Land Mines
    so be #Ecareful
    (or #fdie#0)

    results in:

    [​IMG]

    (and as you can see it shows up quite well at night)

    Permissions

    To customise permissions, you can add any of the following to your permissions plugin config.yml (permissions subsection):

    #Allow user to use the colour yellow (e):
    - 'signColours.e'
    #Allow user to use all colours:
    - 'signColours.*'
    #To avoid offending anyone's sensibilities, American spelling works too (here for allowing red):
    - 'signColors.4'

    Permission Notes:
    • As many or as few colours can be added as desired
    • If someone without permission uses a hash-code, the hash-code will remain there unchanged
    • Anyone who can use any colour will automatically be allowed to use black too
    • In permission definitions, the hex digits must be lower case (a,b,c rather than A,B,C). Signs are not case sensitive, however
    • If the permissions plugin is not installed, colours are enabled for everyone
    Feature Summary
    • Allows players to easily add a variety of colours to their signs
    • Compatible with the Permissions plugin
    DOWNLOAD LINK:
    http://www.srcf.ucam.org/~eh392/minecraft/SignColours/SignColours0.3.zip
    (source code is included)

    Change log:
    version 0.1
    • Plugin Released
    version 0.2
    • Added Permissions plugin compatibility
    version 0.25
    • Compatibility bug-fix
    version 0.3
    • Major Bugfix (eliminating possibility of sign corruption)
     
  2. Offline

    NikkyyyHD

    What about Permissions? I Want to choose who can use this or not?
     
  3. Offline

    Sir Savary

    You sir, deserve an internet.
     
    Aleyasu and PierreW like this.
  4. Offline

    riuthamus

    you should make permissions per color!!! that would be epic, this way i can let certain people use certain colors, but very fucking cool
     
  5. Offline

    Creekrat

    im with the guys who love this and want permissions :p
     
  6. Offline

    Edward Hand

    Thanks for your feedback! As requested, I have updated the plugin to be Permissions-capable. (See first post for instructions).

    Let me know if you have any issues!
     
  7. Offline

    riuthamus

    this plugin just got fucking cooler than cool! we are using this in our dungeon for hidden signs and for arrows. We have a room totally black with only these signs hidden some place, SO COOL!!
     
  8. Offline

    Creekrat

    Great! [​IMG]
     
  9. Offline

    fffizzz

    awesome plugin, thanks!
     
  10. Offline

    Kane

    Seams like there is an issue posting a new sign using the lift plugin: http://forums.bukkit.org/threads/mech-signlift-v0-5-elevators-with-signs-164.2900/

    When you place a [Lift Up] Second line and or [Lift Down] Second line it seams to cause the text to shift slightly without 0 color codes and such.
     
  11. Offline

    Edward Hand

    Yeah. It was adding a space to the end of lines. I've fixed that now.
     
  12. Offline

    skawke

    My god, you are amazing.
     
  13. Offline

    McLrn227

  14. Offline

    Edward Hand

  15. Offline

    Kane

    thanks will give it a try in the morning!
     
  16. Offline

    deltr

    Bug Report: Players placing "%" on signs with this mod enabled causes the chunk to disconnect players upon load.
     
  17. Offline

    Edward Hand

    I can't replicate that. When was the last time you updated bukkit? There was a problem with bukkit itself a few versions back that caused clients to get 'internal server error' when using percent in chat (now fixed) which could be related. Have you tried using % in signs without the plugin installed?
     
  18. Offline

    Brandonz

    i got the up to date error and i have mine up to date ??? help please
     
  19. Offline

    Edward Hand

  20. Offline

    Snowl

    I frequent this server - There were signs taht would give an array out of bounds: 13 exception when someone placed a malformed sign (something like #L or %13 or something) and it would actually cause the client to crash.
     
  21. Offline

    Edward Hand

    That's very strange. If it definitely is my plugin (ie you've tried it both with and without the plugin installed), could you post some more details, such as exact strings that cause crashes, and details of other plugins installed. That would be great.
    --- merged: Feb 19, 2011 5:35 AM ---
    I keep forgetting I need to reply to people's threads to alert them :cool:
     
  22. Offline

    Jdbye

    Great... Now no one can play on my server because someone thought it was a good idea to place a corrupted sign at the spawn. How do I get rid of it?
     
  23. Offline

    Edward Hand

    Again, I need to know exactly what you did and what other plugins you're using since I have been unable to replicate this. I really cannot see how my plugin could cause these errors.
    --- merged: Feb 19, 2011 3:13 PM ---
    Ok. I think I've worked out the issue. It has nothing to do with percent signs though!

    The error occurs when you add a colour without any text after it. (Worked it out after seeing this: http://forums.bukkit.org/threads/chat-ichat-v1-4-permissions-addon.1729/page-10#post-67280)

    I can have this fixed in no time at all. As for repairing your map, I can whip up a quick client mod to make you immune to the crashes allowing you to remove the sign. Alternatively, give me an IP and I'll do it myself.
    --- merged: Feb 19, 2011 3:14 PM ---
    Really sorry about this guys :oops:
     
  24. Offline

    Jdbye

    Yeah, I had the same issue with iChat, but at least solving that was as easy as disabling iChat.
    Actually I could give a client mod a go myself since I have MCP, just not sure where to look.
    Edit:
    The culprit seems to be the FontRenderer.renderString (nh.a) function, inside the for loop, at this part:

    int j1 = "0123456789abcdef".indexOf(s.toLowerCase().charAt(i1 + 1));
    if(j1 < 0 || j1 > 15)
    {
    j1 = 15;
    }
    I need to add an error check there somehow but I'm no good at Java. Some assistance?
     
  25. Offline

    Edward Hand

    Ok. The luckily I've been able to knock up a mod that will make you immune to the crashes.

    http://www.srcf.ucam.org/~eh392/minecraft/SignColours/oz.tar.gz

    Copy the eclosed class file into your minecraft.jar in the usual fashion (remembering to delete the META_INF folder in there too)

    A fix to the server plugin will be along in a few minutes.
    --- merged: Feb 19, 2011 3:31 PM ---
    (see above)
     
  26. Offline

    Jdbye

    I use my own modded client so I'd much rather know what you changed, but I'll figure it out myself.
     
  27. Offline

    Juze

    ...yes, I placed one of those "corrupted signs" at spawn too. Damn it.
     
  28. Offline

    Edward Hand

    Its the class
    Its what bukkit calls the Packet130 class. Its adds text to signs when the server tells it to. Chances are you're not using any mod that will have changed that. I just made it append a space onto the end of all signs (on the client only that is)
     
  29. Offline

    Jdbye

    Oh. In that case, changing FontRenderer.renderString would be a better fix since it would actually fix the bug itself rather than just working around it. (and, would solve the bug with iChat as well). However your fix should work equally well to get rid of corrupted signs :)
     
  30. Offline

    Edward Hand

    All fixed ^_^
     

Share This Page