[INACTIVE][GEN] ShelfSpeak v0.7 - Dynamic Bookshelf Messages [860]

Discussion in 'Inactive/Unsupported Plugins' started by pyromanic, Apr 11, 2011.

  1. Offline


    ShelfSpeak - Dynamic Bookshelf messages [860]
    Version 0.7
    Tested on Permissions 3.1.5b, Older versions are no longer supported

    This plugin allows players to assign and manage messages using bookshelves. Players can right-click bookshelves to view existing messages and use 'write mode' to make any desired changes.

    Instructional Video
    Explains commands and proves this plugin is functional

    • Store an unlimited amount of text! (Configurable through Permissions)
    • Import text files into Bookshelves
    • COLORS!
    • Interactive edit mode (No need to go edit text files)
    • Adjustable write radius
    • Lock individual Bookshelf read/write
    • Bookshelves drop when destroyed!
    • Multiworld capabilities
    • SQLite storage
    • Permissions support! (Not required)
    Show Commands (open)
    ***Normal Mode***
    <Required> {Optional} [Choice]
    • /shelf - View Commands
    • /shelf <page> - View shelf page
    • /shelfcolors - List color codes
    • /shelflock [read:write] {player} - Toggle locks
    • /shelflock [read:write] list - List Privileges
    • /shelfcancel - Cancel Active Command
    • /shelfwrite - Enter write mode
    NOTE: All of the above commands are usable in write mode if the player has sufficient permissions. Additionally, a right click after commands is unnecessary in write mode.

    ***Write Mode***
    • /shelfline {page:}<line> {text} - Set line text
    • /shelfclear {page} - Clear shelf or page text
    • /shelfremove {page:}<line> - Remove line
    • /shelfimport [{normal}:strict] <file> - Import text file
    • /shelfsave - Save Edit, End Write Mode
    NOTE: There MUST be a colon when using a page argument.
    Ex. '/shelfline 2:5 hello' will write 'hello' to page 2, line 5 of the Bookshelf.
    Show How To (open)
    Use a preexisting Bookshelf:
    1. Using '/shelfwrite' on an unowned Bookshelf sets you as the new owner. (You are automatically set as the owner of any new Bookshelf you place.)
    Edit a Bookshelf:
    1. Use '/shelfwrite' to start interactive edit mode
    2. Right click the Bookshelf you wish to edit
    3. Use the edit commands you wish to perform (i.e. '/shelfline', '/shelfclear', '/shelfremove') EXAMPLE. '/shelfline 2:5 hello' will write 'hello' to page 2, line 5 of the Bookshelf
    4. Use '/shelfcancel' to exit without saving, or '/shelfsave' to save and exit.
    NOTE: Using '/shelfline' without a text argument will set a blank line. Additionally, using '/shelfclear' without a page argument will clear the entire Bookshelf.

    Use Colors:
    1. Use '/shelfcolors' to view the list of color codes.
    2. Use '#<colorcode>' in the line of text you wish to add color to!
    NOTE: Color codes do not count towards the 50 character line limit.

    Set/View Locks:
    1. In order to set locks for a Bookshelf, you must be the owner.
    2. Use '/shelflock [read:write] {player}' without a player argument to prevent everyone from performing the chosen action (read/write).
    3. If you wish to allow only a few players to perform the chosen action, use the same command with a player argument to add the player to the exception list.
    4. To remove locks, simply type the same command you used to add them.
    5. Use '/shelflock [read:write] list' to view existing exceptions for locks (if any)
    NOTE: Removing locks without using a player argument will delete all preexisting player exceptions for that lock. Be sure to check existing locks before making alterations. Player names are also case-sensitive.

    Import Files:
    1. Place the desired text file in the ShelfSpeak directory.
    2. Use '/shelfwrite' to enter write mode on a Bookshelf.
    3. Use '/shelfimport [{normal}:strict] <file>' to import the file.
    NOTE: The {} around the normal keyword indicates that keyword is not required.
    Ex. '/shelfimport test.txt' would default to 'normal'.
    Normal Import Ex (open)

    Normal importing trims the edges off lines to make them fit.
    Strict Import Ex (open)
    Strict importing wraps words to fit as compact as possible into the Bookshelf.

    Show Permissions (open)
    shelfspeak.read			- Reading Bookshelves
    shelfspeak.write 		- Writing to Bookshelves
    shelfspeak.colors 		- Viewing color code list
    shelfspeak.lock.read		- Individual read locking *
    shelfspeak.lock.write		- Individual write locking
    shelfspeak.admin.readall	- Read override for admins *
    shelfspeak.admin.writeall	- Write override for admins *
    shelfspeak.admin.lockall	- Lock override for admins *
    shelfspeak.admin.import         - File import for admins *
    shelfspeakmaxradius: <radius>	- Max radius for write mode (DEFAULT:5)
    shelfspeakmaxpages: <pages>    - Max page write count (DEFAULT:5, 0=infinite)
    shelfspeakmaxlines: <lines>    - Max line write count (DEFAULT:8)
    * Require OP without Permissions (Default values are as shown)
    NOTE: The max number of lines visible when a player right clicks a Bookshelf is 8. Setting this any higher will force the reader to press the chat key to view all Bookshelf data.
    Example nodes:
            default: false
                prefix: 'mod'
                suffix: ''
                build: true
                shelfspeakmaxradius: 5
                shelfspeakmaxlines: 10
                shelfspeakmaxpages: 10
                - Default
                - 'shelfspeak.read'
                - 'shelfspeak.write'
                - 'shelfspeak.colors'
                - 'shelfspeak.lock.*'
                - 'shelfspeak.admin.*'

    v 0.7
    • Added 2 file importing features
    v 0.6
    • Removed displayed line numbers
    • Configurable max page/line count
    • Bookshelves now drop when destroyed
    • Removed BLOCK_PLACE cancellation
    Show Changelog (open)
    v 0.5
    • Fixed BLOCK_PLACE error caused by null modifier
    v 0.4
    • Fixed single quote problem
    • Fixed admin permissions (added lockall)
    • Added max radius for write mode
    • Cleaned code
    • Changed '/shelfcancel' to cancel any interactive mode
    v 0.3
    • Added Permissions Support
    • Added Lock commands (with capability to grant specific players access)
    • Command reformatting
    v 0.2
    • Added SQLite storage
    • Added Multi-page support
    • Added Color support
    • Display tweaks
    v 0.1
    • Initial release
    Known Issues:
    • Color codes may count towards the line character limit while importing files
    • Text file association
    • Custom Bookshelf titles
    • Default message config
    • Page increment timer
    • Text export
    • Movable Bookshelves (Retaining text)
    • Copy text
    • Redstone/Radius triggers
    • Clean code
    Feel free to donate! I am a busy software developer.
    Donations would most certainly show you appreciate my hard work. :D
    WooJoo, kahlilnc and XDTobi like this.
  2. Offline


    maybe u could make it so that the bookshelves have a list of people (per bookshelf) who can edit the specific shelf. and maybe that could include any ops, admins, and mods as default. idk how hard that would be so...ya
  3. Offline


    I plan on adding a command that allows the owner to 'lock' a Bookshelf in order to prevent anyone from changing it (unlocked would be accessible for everyone). I might add another option for the owner to give specific players write privileges while in locked mode. Whenever I add Permissions you'll be able to allow ops, admins, and/or mods to edit any Bookshelf. Thanks for the suggestion!
  4. Dude... THIS IS AWESOME! The way everything looks is very nice, the only improvement I might even suggest would be to put the "Owner:" and "Last Edited By:" at the end, but it's looking great!
  5. Offline


    Sweet once you get the permissions, and the ability to lock them it will be even better.

    Hey do you think you can make a way to have multiple pages per book shelf, like one you right click a book self you could type /next or something to see next page, /back [2] to go pages back etc... ? i dont know just an idea
  6. Offline


    Thank you very much!
    I was actually thinking the same thing when I was starting development, but I didn't want that line to push any more text off the initial visible message. I have an idea though! This will be coming in the next update.

    A great idea! I'll be implementing this in a future update.
  7. Offline


    some sort of option for offline editing would be cool
    something where you can identify the line and maximum lenght of the line

    + a way to make the tomes portable like you can take a tome out of a shelf with you and later place this tome into a new shelf

    would be something like storeing the text against a player and let him save this to a new location etc

    this would ultimatly ROCK ME SERVER :p
  8. Offline


    Are you talking about editing the files that store the bookshelf data? I prefer not to allow users to directly edit any sort of data as it leaves too much room for data transfer errors. If you must, you can go into ShelfSpeak->Shelves-><world> and open the file pertaining to the location of the Bookshelf you wish to edit in Notepad. However, I do not recommend this method. The lines are going to have the max length of the chat when I get around to it.

    The concept sounds cool, but keep in mind that activating this feature would use quite a bit of RAM on larger servers seeing as how Bookshelves will be able to store multiple pages. A single player holding a message isn't bad, but imagine a server with 100 players. I'll think about it after I implement permissions.
  9. Offline


    Ok, well what if you allow the option to pick up your book self and lay it back down. Or just when you go into edit mode, if you drop a bookshelf it will ask if you want to copy prev book [number] then you could make a copy of one you already have down, i know i did this in the server files manually by renaming the new shelf what the old one was. i dont know what do you think? i know it could be useful for spreading the same info.

    which if you did do said above and added Titles to the Bookshelfs, then what if you also add the permissions ability that if you add someone the can copy your books.. kinda like a Book Club :D ... and when you make a book you have the open to open it for some to edit, and other option to add to book club. Then you can add ppl to your book club or ppl can join yours with a / command or some way of interacting with the shelf itself. Then only the books you mark as Book Club are able to be copied by a person.
    That would mean that you could set up a book self in a room, and then say you get tired of digging, you come up stairs right click the book self in edit mode (or interact mode) you then have the option to /bookclub list.
    It would show you all the ones you are a member of, you then can /bookclub list 5, where that would show you all the books that are in Number 5. You Could see if something is new. if so then type /Bookclub 5 5, That would load up bookclub 5 book 5. then type /end
    now your bookshelf acts just like if the original creator was there :D


    ****Book Club List ****
    1: Willobe
    2: Pyromanic
    3: JoeMomma
    /Bookclub 2 list

    ****Book Club - 2: Pyromanic List ****
    1. Sweet New Plugin Date 4-12-11
    2. I dont think its supposed to burn when... Date 1-10-11
    /Bookclub 2 2

    :D Yeah!!

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


    Just to mention it even if your not that advanced at java there is the option of databases which would in general be a good idea for this kind of data plugin [ like sql etc or using flatfile]
  11. Offline


    I'm not new to Java, but I haven't had any other experience developing plugins or using databases with Java (Although, I do know SQL). I was originally going to implement a database but couldn't get the connections worked out before I wanted to release. There will probably be database access in the near future.

    I don't know why I said the RAM thing. Even if I'm using file access I could reference the filename in memory rather than the entire message, lol. Oh well.
  12. Offline


    Implement colors code's and this will be best "Shelfs" plugin which we ever had .. :D :cool:
  13. Offline


    a permissions plugin support?
  14. Offline


    I have that listed in the ToDo list. The basic coding for permissions is done, but I'm currently working on converting data to a database and implementing multiple line Bookshelves for v0.2. Permissions probably won't come until v0.3.

    Permissions isn't really necessary at this point anyway seeing as how there are a limited amount of commands. Locking will likely be implemented in v0.3 as well.
  15. Offline


    its only for controlling player to adding so much entries.. if everyone can add whatever they want it is a little bit diffcult for admin resolve a possible bug or change! np i'll wait v0.3 for sure
  16. Offline


    Colors will be coming sooner than I expected... in v0.2! :D

    What exactly are you referring to? A page limit or shelf limit per player? Or just controlling write privileges in general?
  17. Offline


    "Or just controlling write privileges in general" this is good idea for every admin that have a Guest and Register permissions plugin
  18. Offline


    Updated to v0.2! Check the changelog to see what was added.

    This will definitely be included when permissions are added. You will be able to control access to the edit command.
  19. Offline


    the clear command is also inside bukkit for admins to clear inventorys
    so if you want to clear a whole shelf you get your inventory also cleared
    maybe a other command would work better like
    /shelfclear or something would be better ^^
  20. Offline


    Hmm, thank you for bringing this to my attention. I was not aware. That's unfortunate because I was trying to keep the interactive commands short. Although, I'm sure it makes for some hilarious results. :D

    I suppose I will be overhauling the commands for v0.3. I'm thinking the spaces will be removed so '/shelf colors' would become '/shelfcolors' and so forth. Interactive commands will also be prefixed with 'shelf' in order to prevent any further conficts with server commands or other plugins.
  21. Offline


    There is a problem with the download link. (SQLite) The end of the url is .zipp, when it should be .zip.
    Also, this is great. Is there anyway to copy texts to a lot of bookshelves?
    I was going to just use the files in my plugins folder, but there is so many I can't find the right one.

    Also, can someone tell me how to write on a new page and how to write in color?
    I need the EXACT command.
  22. Offline


    Thanks for the heads up! I must have typed an extra p by accident. It's fixed now.

    There isn't a way to do that currently, but there also shouldn't be any files in plugins->ShelfSpeak except ShelfSpeak.db if you've upgraded to v0.2. When you started the server, did it tell you bookshelves were imported?

    There is a how to in the main thread on how to use colors, but here is an example.
    '/line 1 #1This line will be colored.'

    All you need to do to use another page is use the line command with a page argument.
    Ex. '/line 2:1 Hello!' will print 'Hello!' on line 1 of page 2.
  23. Offline


    id like o make another feature request
    would it be possible to import (after the permissions update) text files from the plugins/shelfspeak/ directory
    like editing the normal text there would be an option to import from textfile which you then could place into a bookshelf
    with a right click? that would be very helpful for creating larger librarys.
  24. Offline


    That kind of feature would really only be useful for server admins, but I can see why you suggested it. I'll consider it in a future update!
  25. Offline


    When I /end a shelf, it delete line 6-10.
    CB677, ShelfSpeak v.2
  26. Offline


    I am unable to replicate this error. Does this occur for all pages? Walk me through the commands you are performing to reach this conclusion.
  27. Offline


    Updated to v0.3 for CB 733.

    Make sure to view the new commands! See the changelog for more change details.

    GitHub wouldn't update my jar so the first people to download v0.3 just got version v0.2 again. I fixed the link and am using DropBox for the jar now. If your server still shows v0.2 then you can re-download the update.

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


    This error on CB 733 and no text saves to shelf

    00:25:04 [INFO] shelfsave
    00:25:04 [SEVERE] [ShelfSpeak] Error performing insertMessage
    java.sql.SQLException: near "s": syntax error
            at org.sqlite.NativeDB.throwex(NativeDB.java:210)
            at org.sqlite.NativeDB._exec(Native Method)
            at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
            at pyromanic.ShelfSpeak.ssDBAccess.insertMessage(ssDBAccess.java:295)
            at pyromanic.ShelfSpeak.ssDBAccess.updateShelf(ssDBAccess.java:218)
            at pyromanic.ShelfSpeak.ssDBAccess.writeShelf(ssDBAccess.java:152)
            at pyromanic.ShelfSpeak.AdvShelf.save(AdvShelf.java:233)
            at pyromanic.ShelfSpeak.Commands.SaveCommand.onCommand(SaveCommand.java:
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:638)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:632)
            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)
  29. Offline


    Did you use single quotes? I have a feeling this is the case. I will need to add a check for single quotes and escape them since they tend to interfere with SQL queries.
  30. Offline


    Did not use any quotes

Share This Page