[GEN] SignReadMore v3.3 - Sign/Bookshelf linked to read more text (PERMISSIONS) [740]

Discussion in 'Inactive/Unsupported Plugins' started by Milton, Feb 21, 2011.

  1. Offline

    Milton

    SignReadMore - Allow read more on Signs/Bookshelfs
    Version: v3.3

    Now with *COLOR* support and *PERMISSIONS*!

    Allows an users to associate a text file to a Sign post/Bookshelf in Minecraft. When a user right-clicks the Sign-Post/Bookshelf, a message contained in the associated text file will be displayed to the user.

    FEATURES:
    • Allows users to read more info about a Sign/Sign Post/Bookshelf
    INSTALLATION
    • Unzip to your plugins folder
    • Permissions: add the following node to your permissions: signreadmore.srm
    Download Sign Read More Plugin
    Source Code
    Feel free to make any DONATIONS
    Usage (open)

    USERS
    1. Create a Sign Post/Bookshelf and place it anywhere

    2. Open chat and type /srm line[1 - 8] Some text for line[1 - 8]
    e.g /srm line1 Some text for line1

    Use "#[0-9a-f]" to specify color.
    eg /srm line1 This is #0black text

    Repeat step 2 to enter different lines (max 8 lines)

    3. Right-click Sign Post/Bookshelf to associate sign post with file

    NOTE: Calling /srm for a sign already has a file associated allows you to EDIT the different lines.

    e.g
    If a sign alread has line1 to line5 entered. If a user then types "/srm line3 new line 3 details"
    Then the sign will be updated as follows:

    1. Some text for line 1
    2. Some text for line 2
    3. new line 3 details
    4. Some text for line 3
    5. Some text for line 4

    ADMIN
    1. Create a Sign Post/Bookshelf and place it anywhere

    2. Open chat and type /srm file filename.txt
    The filename specified should be located in [/plugins/SignReadMore] folder
    e.g /plugins/SignReadMore/filename.txt

    3. Right-click Sign Post/Bookshelf to associate with file

    Upon right-clicking sign post, the contents of the text file will be read and shown to the user.
    Change Log (open)

    Version 3.3
    • Removed OnBlockBreak (Deleting of file)
    Version 3.2
    • You can now assign a blank line (used for deleting)
    Version 3.1
    • Integrates with Permissions 2.5.5
    Version 3.0
    • Updated to craftbukkit #602 (dev-bukkit #486)
    Version 2.9.1
    • fixed minor bug with "/srm file" command
    Version 2.9
    • Using onCommand
    Version 2.8
    • Removed diamond sword for file-base association
    • Minor enhancements to the way messages are displayed
    Version 2.7
    • *Major* Added color support. Use "#[0-9a-f]" to specify color. eg. /srm line1 This is #0black text
    Version 2.6
    • Allow more than 1 user to edit a sign
    Version 2.5
    • No longer uses diamond sword as wand
    Version 2.4
    • Updated to dev-bukkit #461 (compatible with craftbukkit #556)
    Version 2.3
    • Updated to dev-bukkit #432 (compatible with craftbukkit #440)
    Version 2.2
    • Increased line limit (max 10) :: NOTE :: The max limit of the chat window is 10 (for the in-game chat window)
    • Added support for Wall Sign
    Version 2.1
    • Fixed bug for Admin usage. Should be: /srm file filename.txt
    Version 2.0
    • Now works with bukkit 1.3 (#412) - Uses OnBlockBreak instead of OnBlockDamaged
    • *Major* Users can now add read more text (YAY!!)
    Version 1.1
    • Fix "stupidly long constructor" warning
    • Added support for Bookshelf
    Version 1.0
    • Initial Commit.
     
    ImNotOkay, m5k and Phaedrus like this.
  2. Offline

    gothroach

    So set file permissions so that the Minecraft server can read but not write the file. Problem solved.

    (Yes, it is silly that this has to be done.)
     
  3. Offline

    habbah

    smart!
     
  4. Offline

    inviktus

    Would have been nice if the OP had included the permission node in the first post.. :p

    Thank you Fluff.

    @Harushimo, you're hardly an idiot for not putting the node in when it's undocumented :s
     
  5. Offline

    Milton

    I've added it to the installation section.
     
  6. Offline

    game_stailer94

    can you add the ability to remove text??
     
  7. Offline

    Milton

    Done. v3.2
     
  8. Offline

    T.Hartman

    I'd like to second the request to not delete the text file when you remove an object linked to a text file. This makes moving a sign from one position to another a real pain (plus, having to make backups of every text file in case you might later move the sign...) It would be very nice if it would simply disassociate without removing the file from the disk. Otherwise, I love the text file feature, since I can very quickly edit the text, fix spelling issues and the like.
     
    Digi likes this.
  9. Offline

    Infectedd

    *facepalm*
    i'm dumb.
     
  10. Yes, THAT !
     
  11. do you have a link or so where we could find the different collors because it is alot of work to find them mannualy.
     
  12. See attachment.
     
  13. Offline

    Phaedrus

    OMG some griefer just went through my server and broke every sign with SRM text files attached!!

    @Milton
    Please make it so that breaking a sign does not delete the text file!! why would that even seem like a good idea?

    Love the plugin, hate the griefers.
     
  14. Offline

    game_stailer94


    Protect you signs with LWC!!!
     
  15. Offline

    Phaedrus

    Thats the thing. they are protected. When an unauthorized user breaks the sign, the sign disappears temporarilily and then comes back. On the client end of the person who broke the sign, the sign looks blank, once they re-log the text returns. The text never goes away for other users that look at the sign.

    BUT when the sign gets broken, it seems to trigger SRM to delete the text file associated with that sign, even though the sign hasn't actually been broken. Or rather, it was broken, and the event canceled, and sign reinstated.

    anyway, i've changed the write permissions on the text files now, but it's a problem that needs to be addressed to stop griefers from deleting your text files.
     
  16. Offline

    G1R Productions

    15:43:25 [INFO] Starting minecraft server version Beta 1.5_02
    15:43:25 [INFO] Loading properties
    15:43:25 [INFO] Starting Minecraft server on *:25565
    15:43:25 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-683-g068ca13-b711jnks (MC: 1.5_02)


    17:38:52 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'srm' in plugin SignReadMore v3.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:650)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:613)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:607)
    at net.minecraft.server.Packet3Chat.a(SourceFile:36)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:73)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at com.bukkit.Milton.SignReadMore.SignReadMoreCommand.onCommand(SignReadMoreCommand.java:34)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    >
     
  17. Offline

    MacVaultDweller

    I hope this works with cb 733
     
  18. Offline

    game_stailer94

    yes it work
     
  19. Offline

    MacVaultDweller

    Thanks for the word
     
  20. Offline

    mjhasbach

    Works great with CB733. The option to output text in game from a .txt file is freaking brilliant.
     
  21. Offline

    Fluff

    Milton, in case you didn't notice, this plugin has been shuffled off to the inactive list. Do you plan on continuing to maintain this plugin?

    I've already forked and added the fix to not delete files if the sign is broken. I've also started the beginnings of a developer API so other developers can integrate the use of SignReadMore text into their plugins. If you do plan on continuing, I'd like to talk to you at some point to see if these changes can be pulled into your plugin.
     
    jasonznack likes this.
  22. Offline

    Milton

    Things have been a bit crazy on my side.

    And yes, I did notice it was moved to inactive. I'll be updating the plugin very soon.
     
    jasonznack likes this.
  23. Offline

    hofec

    Yes brilliant ! I love this one Milton[diamond]

    This sh*t need to be fix ;) (conflict with CommandSigns)
    Code:
    2011-05-09 01:05:52 [SEVERE] null loading CommandSigns v0.4.5 (Is it up to date?)
    java.lang.NullPointerException
        at com.bukkit.Milton.SignReadMore.SignReadMore.onEnable(SignReadMore.java:49)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at com.edwardhand.commandsigns.CommandSigns.onEnable(CommandSigns.java:136)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  24. Offline

    Milton

    I can't see anything wrong on my side. I suspect CommandSigns is trying to do something funky.
     
  25. Offline

    Fluff

    Indeed. Means someone needs the latest version of CommandSigns.
     
  26. Offline

    m5k

    Updated my server to 740, updated srm and permissions and it broke. Tested it on my test server with only those two addons and when I write /srm I get an error. I am able to read signs though. And I was in the middle of making a tutorial zone based on your plugin. :/
    Here's the log:
    Code:
    2011-05-10 10:48:56 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'srm' in plugin SignReadMore v3.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
        at com.bukkit.Milton.SignReadMore.SignReadMoreCommand.onCommand(SignReadMoreCommand.java:30)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    Caused by: java.lang.ClassNotFoundException: com.nijiko.permissions.PermissionHandler
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 14 more
     
  27. Offline

    Milton

    It looks like you're missing a permissions node... "signreadmore.srm"

    PS: SRM is now on v3.3
     
  28. Offline

    m5k

    Download link is still 3.2 and I both have the node, as well as - '*'

    Updated to 3.3 Still getting
    Code:
    2011-05-10 11:57:58 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'srm' in plugin SignReadMore v3.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at com.bukkit.Milton.SignReadMore.SignReadMoreCommand.onCommand(SignReadMoreCommand.java:34)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
     
  29. Offline

    Milton

    I found the bug, but that just means you're not using the command correctly.
    e.g Usage: /srm line1 A string representing the line number
    See Usage section for details
     
  30. Offline

    m5k

    >.< my bad. First time I used it correctly but I got the error due to the permissions node, then I thought that writing /srm would just give the correct usage, checking if the plugin was working. Sorry to waste your time.
     
  31. Offline

    Milton

    No worries. I'll fix the code so it can give a proper error message e.g Usage
     

Share This Page