[MECH] IOBookcase v1.32 - Allowing users to read/write to bookcases [766]

Discussion in 'Inactive/Unsupported Plugins' started by lonelydime, Feb 24, 2011.

  1. Offline

    lonelydime

    IOBookcase - Lets users read and write to bookcases.

    Version: v1.32

    This plugin makes normally useless bookcases somewhat useful! You can write up to 5 lines per bookcase to display to users who walk by and right click them.

    Commands:
    • No commands, it's all done in game!
    Requirements:
    • The sqlitejdbc-v056.jar file needs to go where craftbukkit is (one directory above plugins).
    • Permissions 2.0 or GroupManager are optional, but it's a good idea to have one.
    Quick Links:
    Install:
    • Upload the directory structure into your root minecraft directory (where craftbukkit is).
    Use:
    • Place a bookcase where ever you'd like to put it.
    • Grab a sign and place it on the bookcase.
    • In the top line, write @line # [color].
      • # is the line number, 1-10
      • [color] is optional, it can be black, navy, green, blue, red, purple, gold, gray, rose, yellow, white or the corresponding color number (dark and light color strings are too long).
    • Finish writing your text in the last 3 lines and hit enter.
    • Right click your bookcase and see your text!
    Importing from file:
    If you choose to import from a file, you can create or edit the file plugins/IOBookcase/import.txt (The file will be created when you restart your server). The formatting of this file is very important, it's not fully functional XML, but it mirrors it. Keep that in mind. Here is an example of this file properly formatted:
    Show Spoiler

    <case name="case1">
    <line num="1" color="red">
    this is text for line 1
    </line>
    <line num="2" color="green">
    this is text for line 2
    </line>
    <line num="3">
    this is text for line 3
    </line>
    <line num="4">
    this is text for line 4
    </line>
    </case>
    <case name="case2">
    <line num="1">
    this is text for line 5
    </line>
    <line num="2">
    this is text for line 6
    </line>
    <line num="3">
    this is text for line 7
    </line>
    <line num="4">
    this is text for line 8
    </line>
    </case>

    Please note in the example, the line breaks. In real XML you can do <line num="1">text</line> all on one line, here you can't. Keep the line breaks. The tabbing is just for readability, it's not required.

    The num parameter for <line> is required, color is optional. If your color is coming out white if you specified a color, it doesn't understand your color choice. Please use black, navy, green, blue, red, purple, gold, lightgray, gray, darkpurple, lightgreen, lightblue, rose, lightpurple, yellow or white.

    Finally, to import in game place a sign on the bookcase. Line 1 needs to be @import. Line 2 needs to be the case's name specified in the import.txt file (in the above example of import.txt, case1 and case2 are valid names). Lines 1-10 are accepted, any more then you will get an error.

    Permissions or GroupManager:

    Code:
    iobookcase.canread - for groups that can read bookcases
    iobookcase.canwrite - for groups that can write to bookcases
    
    Todo:
    • Experimenting with opening the sign dialog without having to place a sign.
    • If a bookcase is destroyed, drop a bookcase.
    • Add noteblock triggering lines.
    • Make 'bookcase is empty' message configurable.
    Changelog:
    Version 1.32
    • Fixed the player interact bug causing errors on left click.
    Version 1.31
    • Replaced depreciated methods to work with CB602.
    Version 1.3
    • Added option to import cases from a text file
    Version 1.2
    • Increased bookcase lines to 10
    • Fixed color being mandatory, it's now optional as designed.
    • Removed spaces between lines.
    Version 1.1
    • Added optional GroupManager support.
    • Added colored text.
    Version 1.0
    • Public Release
     
  2. Offline

    EcoMaster21

    Fantastic plugin! It's starting to be used quite actively on my server. However, in the latest Craftbukkit builds (I am aware no recommended builds are out), it seems that while users can read the books, they cannot write to them. The signs simply stick to the bookshelf, and nothing gets edited.

    Just a heads up for your next release :)

    It seems this behavior no longer occurs in CB705.
     
  3. Offline

    lonelydime

    I read something about them doing things with the sign change logic, guess they fixed what they were doing haha.
     
  4. Offline

    EcoMaster21

    Yep. Looking into the releases myself, something did change with signs, but as we can see, that was fixed.

    Just wanna remind you that you still have the array index issue when ten lines exist in a bookshelf. Sounds like a classic issue of calling array element 10, when only 0 through 9 exist. Everything displays correctly, but a bug is a bug.
     
  5. Offline

    tha d0ctor

    figured a screenshot might help with potential downloaders
     

    Attached Files:

  6. Offline

    mjhasbach

    There seems to be a conflict between this plugin and MinecartManiaAdminControls, which causes the server to forcefully reload after accepting the text written to the sign on the bookcase. (CB733)

    Code:
    2011-04-28 17:47:08 [SEVERE] Could not pass event SIGN_CHANGE to MinecartManiaAdminControls
    java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
        at com.afforess.minecartmanaiaadmincontrols.permissions.PermissionBlockListener.onSignChange(PermissionBlockListener.java:28)
        at org.bukkit.plugin.java.JavaPluginLoader$29.execute(JavaPluginLoader.java:376)
        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:900)
        at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
        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)
    2011-04-28 17:47:08 [INFO] [CONSOLE] Server is restarting. World is being saved.
    2011-04-28 17:47:08 [INFO] Enabling level saving..
    2011-04-28 17:47:08 [INFO] CONSOLE: Enabling level saving..
    2011-04-28 17:47:08 [INFO] Forcing save..
    2011-04-28 17:47:08 [INFO] CONSOLE: Forcing save..
    2011-04-28 17:47:08 [INFO] Saving chunks
    2011-04-28 17:47:08 [INFO] Save complete.
    2011-04-28 17:47:08 [INFO] CONSOLE: Save complete.
    2011-04-28 17:47:08 [INFO] Stopping the server..
    2011-04-28 17:47:08 [INFO] CONSOLE: Stopping the server..
    2011-04-28 17:47:08 [INFO] Stopping server
    I checked the bookcase after the server rebooted, and the text was successfully written to it.


    With MinecartManiaAdminControls disabled, this plugin appears to work fine.

    EDIT: The latest MinecartManiaAdminControls fixes this...
     
  7. Offline

    Epolixa

    Is there a way to remove text from a bookcase?
     
  8. Offline

    tha d0ctor

    make a blank line?
     
  9. Offline

    EduardBaer

    Destroy the bookcase and place it again. The text should be gone.
     
  10. Offline

    lonelydime

    Either of those two suggestions will work :)
     
  11. Offline

    EcoMaster21

    I think a setting to enable the dropping of bookcases would be nice, so administrators don't have to rely on other plugins to create this effect as an option.

    Two more things:
    One, there's the array index out of bounds error for 10-line bookcases in the console.
    Two, there should be a line delete command to actually remove lines (or an entire text) from bookshelves, so we don't have to either destroy the bookshelf or deal with 10-line blank statements on right-click.
     
  12. Offline

    lonelydime

    I'll be adding the drop a bookcase eventually, right now I'm not adding features to any of my plugins because I've gotten too busy to, I just make sure they work.
     
  13. Offline

    p.ndsl

    Nice plugin.
     
  14. Offline

    lonelydime

    Thanks :)
     
  15. Offline

    Shanev

    does it work with cb766? Has s.o. tried?
     
  16. Offline

    strupan

    mm doesnt seem to work,

    can plugin author update this?

    this would be a great addition to a RP server
     
  17. Offline

    EduardBaer

    yes, works great
     
  18. Offline

    Nazerb

    Well i could have an out dated version, but if you hole down right click it will spam up the chat with the messages.
     
  19. Offline

    Bashoogers

    Oh dear, its so fun!
    I got an idea for it, write books and papers :)
     
  20. Offline

    ledhead900

    When using import.txt should add a way to list possible names to use on bookcase sign, and possibly a preivew mode before assign it to a bookcase.
     
  21. Offline

    lonelydime

    I've been getting busier and busier with my life as of late and no longer have the free time I need to develop or maintain this plugin. Anyone that wants to take it over is more than welcome to, the latest source can be found here. It's been fun!
     
  22. Offline

    ledhead900

    Somone is going to need to fork this for 1.6 any takers ?
     
  23. Offline

    kaasinees

    Does it require sql? I don't use sql..
     
  24. Offline

    ledhead900

    Yes it requires sqlite but the export.txt that lets u write your own pre made bookcase text is in flat file. In this case you will never actually need to do any work with sqlite to use this tho.

    Sqlite is not like Mysql do not get them confused MySQL requires server instence SQlite does not require any setup of any kind just pop the SQlite file into bukkits Lib folder you may already have this folder if not simply create it here is an example of were this folder has to be.

    D:\Dedicated Server Files\MindCraft Server\bukkit\lib

    you place any libary dependant files such the sqlite and mysql connectors in there :)
     
  25. Offline

    kaasinees

    I am not going to use it ... sadly, cause i do not want sql

    and i am not using windows, i use gentoo
     
  26. Offline

    antonysze

    NICE! but i don't know how to use and get sqlite. also it not update.
    if i know that, i hope someone can update
    sorry about my english
     
  27. Offline

    SkyteamZ

    Hi, thanks for that great plugin...
    Are you going to update it to 860CB ? (dosn't work with last recommended build)

    Thx for answer

    Sky
     
  28. Offline

    CombatWiZ

    I made a tutorial using this plugin.

     
  29. Offline

    jtlcr777

    Update please? I really like this plugin.
     
  30. Offline

    samp20

  31. Offline

    godsyn

    Anyone want to fork?
     

Share This Page