[FUN/MECH] BookWorm v1.14 - Read and write books[BukkitDev]

Discussion in 'Plugin Releases' started by nisovin, Jun 19, 2011.

  1. Offline

    Zenox

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi, I'll bet this question is answered somewhere, and I'm just overlooking something, but I'll ask because I haven't found it.

    I've added the permissions to the groups, so users should be able to write books. However, I'm an OP, so shouldn't even need permission to write books, yet I cannot. I do the /w command, and it tells me to fill in the title. I do /w Test and it says that I don't have permission to write in the book.

    I have no idea what that problem would be, to be honest. How do I fix it, if you know what's wrong?
  2. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It sounds like your permissions aren't set up correctly. If you have Permissions, being an op won't give you everything, you'll need the permission node.
  3. Offline

    chubbz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i hate this plugin now ever since i updated the books stack and i just writ a huge book and then it got droped and when i picked it u it turn into the other book and stacked. plz fix this
  4. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You might be able to get it back with a /give command if you know the book's ID. I know it won't work with General until I update to 3.5, though, so no guarantees.
  5. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    One thing goes wrong and you suddenly hate the plugin? How about you just read the first post and notice that there's a new 1.7 version? Or read the thread and notice that people have already posted this problem, and I've responded. Before asking for fixes, maybe you should check if there's already a fix first.
  6. Offline

    chubbz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  7. Offline

    undeadmach1ne

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    have you considered looking in the \plugins\bookworm folder to see if there is a .txt file containing your writing so you can recover it?
  8. Offline

    Taemera

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I can't stack written books in 1.7, but I can stack unwritten books. However, BookWorm does not see stacked books as write-able books, I have to unstack the books first.
    It is working fine, but like someone said in posts above, perhaps use BukkitContrib to solve the client side issue?
  9. Offline

    mikedjose

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I was doing some testing and noticed that the replace function of the Book class doesn't do any handling for multiple matches, as in it will replace any and ALL matches of <old text> with <new text>. I thought it would be nice to alert users if multiple matches are found, tell them what those matches are (framed by additional context drawn from around the match), and where the matches were found (page). In numbering the matches, they could repeat the same command but then give them an optional additional argument (/bookworm -replace -# <text>) for choosing which match they wish to replace or use "*" for all matches.

    I'm working on modifying your code. Feel free to take up the idea, but I'll also try to give you a hand and send you a message as soon as I can work anything up. I haven't ever touched the bukket API, but I'm alright with java. I'll send you a message when I have something.
  10. Offline

    Blackswordsman

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Whenever I am holding a book I just created and I want to cancel it by typing /bw -cancel it just tells me invalid command. Also, while holding a book and just typing in chat, should that add lines to the book? Because whenever I am holding a book, it adds lines even if I don't have the /write before the text.

    I just would like to know how you delete a book :D
  11. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    New version! I've added a chat write mode, which allows you to write in a book without needing to use the command. I've also added support for BukkitContrib, which makes the stack prevention much better.
    This is done intentionally. I don't want to have to shift inventory contents around, and I assume you don't want to write to an entire stack of books, so I require that you have just a single book to write in it.
    Feel free to change the code, and you can send it to me if you want. If it works well and isn't too confusing, I may add it. I don't want to make it too confusing though. That was actually the main point of this plugin. Before I came up with the idea to actually write to book items, this was just a generic bookshelf writing plugin. I didn't like how other ones worked, so I set out to make something extremely simple, without needing to know a hundred complex commands.
    The cancel command is a remnant of an old unreleased version of the plugin, it no longer exists. The fact that it's still in the help list is an accident. If you want to delete a book, just throw it away. Or, if you don't want to do that, just erase the contents, change the title, and make a new book.
  12. Offline

    Chasingu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm using this for lore in my server, and it has given me the ability to make a public library on the server so others can make their own stories for everyone to see. Great job.
  13. Offline

    Blackswordsman

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah that makes sense... Thanks for clearing that up for me relatively quickly nisovin. :D
  14. Offline

    chubbz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have checked but i cant make a book woth all the writin enless i type it again
  15. Offline

    Blacky

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi

    thanks for the great plugin but I have a little request.

    Can you make a command for adding because i don't want to spam a page full
    And a command for a new line?
  16. Offline

    Quedef

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello.

    Sorry if my English is bad (i don't know my level) but I'm Belgian and I don't practice since some years.

    Is there a way to hide the name of the author of the book?
    If not, can you add this option? Or can you tell me what I must change in the source code to hide it?

    Thanks for this plugin.
  17. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm not sure what you mean by a "command for adding". You can start a new paragraph with a double colon :):).
    You can delete the author from the book file if you wish. You'll still need to leave a blank line.
  18. Offline

    Blacky

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sorry was my fault i was to fast and i didn't see this.

    Hi

    thanks for the great plugin but I have a little request.

    Can you make a command for adding a new page because i don't want to spam a page full
    And a command for a new line?

    i added the missing words
  19. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    As I said, you can create new paragraphs with a double colon. I don't plan on adding a new page or a new line option. The idea is the plugin divides your text into pages for you, so you don't have to. It makes it simple and easy to use. You can always use blank paragraphs if you want to force text onto a new page.

    If you're wanting to reduce the number of lines per page, you can do this in the config file.
  20. Offline

    Lunarius Haberdash

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Suggestion:
    1. Convert bookcases to chest style containers, that can only hold Books, Maps, and Paper to allow stylish storage.
    1a. (No: Skinning chests as bookcases is in no way the same thing).

    BookcaseStorage is supposed to do this, but it crashes every time you take a book out. (Even without BookWorm installed). It'd be the next logical extension to this plug-in. It's also no longer supported by the coder.

    2. Configurable requirements for writing (must have ink sack and feather, for instance).

    3. Consumable requirements.
    3a. An ink sack will be consumed with every /write command, up to x# of words.
    3b. White wool must be in hand to 'erase' (think blotter)
    3c. Colored writing requires having the appropriate dye in your inventory.
    3d. Books will keep track of material cost to create, and this will be what you must have in your inventory to copy a book. (/copycost "This book requires 7 ink sacks, 3 cactus green, 2 rose red, 4 dandelion, 10 paper (per page).
    3e. Every new page you wish to add to a book will require a new sheet of paper.


  21. Offline

    Skirmisher

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Epic plugin! My users are already loving it!
    Just one request. Can you add an option to drop the bookshelf as well as the book when a bookshelf is broken? I had set this up with OtherBlocks, but I have to disable that because otherwise, if a book is stored in the bookshelf, it's destroyed. I still want it to drop a bookshelf though. Adding this feature would be great! :D
  22. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Alternative version: Store the ID of the book as the block's data value rather than in a hashmap somwhere. That way, OtherBlocks will be able to detect it.

    Better still, do both.

    Though, if BookWorm drops the book when the bookshelf is destroyed, it should be possible to use OtherBlocks somehow so that both drops end up happening... not sure though.
  23. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Data values only go up to 16, so that wouldn't work. It seems OtherBlocks is registered at lowest priority and cancels the event, which is why both don't happen. I'll just add the feature to this plugin, it's easiest and isn't hard.
  24. Offline

    AllenMarx

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    :)
    Great plugin!
    :D
  25. Offline

    xwyz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    HEY YO!

    How can i go a previous page? (with mouse)
  26. Offline

    Lunarius Haberdash

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So no "Bookcases as Chestlike Storage where you can put your bookworm books support" huh?
  27. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Great plugin again!

    However I can still stack books, just, weird things happen...they stack, but then they drop or so..is that intended behaviour? I guess it is not possible to prevent stacking natively as it's part of MC client...
  28. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Installing the BukkitContrib plugin makes this work quite a bit better.
  29. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Just got massive error spam shortly after enabling this:

    Code:
    12:43:39 [SEVERE] Could not pass event PLAYER_INTERACT to BookWorm
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at java.lang.String.substring(String.java:1958)
            at com.nisovin.bookworm.Book.generateContents(Book.java:53)
            at com.nisovin.bookworm.Book.save(Book.java:194)
            at com.nisovin.bookworm.BookWormPlayerListener.onPlayerInteract(BookWormPlayerListener.java:120)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:458)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
  30. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Not really a fan of using that anymore while he uses that broken feature Bukkit just removed in CB 993 and up...

Share This Page