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

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

  1. Offline

    undeadmach1ne

    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?
     
  2. Offline

    Taemera

    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?
     
  3. Offline

    mikedjose

    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.
     
  4. Offline

    Blackswordsman

    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
     
  5. Offline

    nisovin

    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.
     
  6. Offline

    Chasingu

    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.
     
  7. Offline

    Blackswordsman

    Ah that makes sense... Thanks for clearing that up for me relatively quickly nisovin. :D
     
  8. Offline

    chubbz

    I have checked but i cant make a book woth all the writin enless i type it again
     
  9. Offline

    Blacky

    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?
     
  10. Offline

    Quedef

    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.
     
  11. Offline

    nisovin

    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.
     
  12. Offline

    Blacky

    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
     
  13. Offline

    nisovin

    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.
     
  14. 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.​


     
  15. Offline

    Skirmisher

    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
     
  16. Offline

    Celtic Minstrel

    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.
     
  17. Offline

    nisovin

    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.
     
  18. Offline

    AllenMarx

    :)
    Great plugin!
    :D
     
  19. Offline

    xwyz

    HEY YO!

    How can i go a previous page? (with mouse)
     
  20. So no "Bookcases as Chestlike Storage where you can put your bookworm books support" huh?
     
  21. 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...
     
  22. Offline

    nisovin

    Installing the BukkitContrib plugin makes this work quite a bit better.
     
  23. 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)
    
    Not really a fan of using that anymore while he uses that broken feature Bukkit just removed in CB 993 and up...

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

    Celtic Minstrel

    If I recall correctly, data values for blocks are a byte, which implies they can go up to 127. I guess that's actually not enough though, since item durability goes up to 32767 if I understand correctly.

    @Joy – BookWorm does prevent books (of different types*) from stacking; however, the client doesn't realize this, and so it'll show they are stack when, according to the server, they actually aren't. So, it works, but it's glitchy.


    (*If possible, which depends on the version of BookWorm matching the version of Minecraft; if it fails to do so, however, it'll prevent books from stacking at all, so there's nothing to worry about either way.)
     
  25. Offline

    Beldarak

    Hello !

    Nice plugin but I have one recommendation. With the possibility of copy a book, we can have books without crafting them. Could you make an option which force the player to carry a blank book to copy the bookshelf in it?

    Thanks.
    And sorry for my english.
     
  26. Already exists, read OP.
     
  27. Offline

    Beldarak

    Youps, sorry :S
     
  28. Getting reports that even with:

    require-book-to-copy: true

    People can still dupe books. Not entirely sure how, yet...
     
  29. Is it at all possible that we could get BookcaseStorage functionality with this? BookcaseStorage is currently non-functional, but allows the use of Bookcases for storage like chests, but it only accepts certain contents. (Books, Maps, Pictures, Paper). It would be the perfect compliment to this, and make bookshelves much more logical.
     
  30. Offline

    Chasingu

    Does this work with 1000?
     

Share This Page