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

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

  1. Offline

    Celtic Minstrel

    ...you sure the client mod is needed for this? It sounds like something that would work without it.
     
  2. Offline

    nisovin

    It uses the "achievement get" window. It's really something I was just goofing off with, but I left it in for fun. Definitely requires the client mod.
     
  3. Offline

    Celtic Minstrel

    Ah, I didn't realize the achievement window part and was commenting solely based on the detecting right-clicks part. It makes sense now.
     
  4. Offline

    kahlilnc

    Dupe Bug:
    Put a book in a shelf then right/left (i forgot) then it spawns a new book, you can do this as many times as you want. Can you make it so you just get your book back. I always see floods of duped books everywhere.

    Realized its all in permissions...
     
  5. Offline

    Blacky

    I use it.

    But I have another request, cann you add this function to paper?
    Like sticky's but with only one page?
     
  6. Offline

    Garninc580

    Does this work with bukkit 1000
     
  7. Offline

    y1985

    Hmmm.... Is the permission node for "copy others" and "copy own" are correct? I cant find it's working

    Ok, now bug report.
    You can't "copy Others' book" without having a "copy Own book" set in Permission

    Step:
    1. Set permission only "copy Others' book" then try to copy someone. ==> fail
    2. Add "Copy Own book" then
    -try to copy Own ==> success
    -try to copy Others ==> success

    Is there a way to make a public library that everyone can copy books there but they can't copy any other books or even their book?
     
  8. Offline

    Tichondrian

    Just a minor suggestion.
    Is it possible to get the plugin to sort books by usernames in folders? so they are still numbered but create a folder to the player that his/hers books goes into.
    It is easier for reconstructing when people lose their books.
    If there is somehow to get books back after they are destroyed then please inform me :)
     
    Blacky likes this.
  9. Offline

    Joy

    Does "bookworm.remove.others" respect WG?

    So, if I get a book from some player and place it in my own bookcase, I can remove it.

    But I can't just go to someone elses WG region and remove books from their shelves, correct?

    And now this exception is back:

    Code:
    08:42:31 [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.Book.read(Book.java:173)
            at com.nisovin.bookworm.Bookmark.readBook(Bookmark.java:22)
            at com.nisovin.bookworm.BookWormPlayerListener.onPlayerInteract(BookWormPlayerListener.java:160)
            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:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            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)
    
    On server stop this results in:

    Code:
    08:45:14 [SEVERE] Error occurred while disabling BookWorm v1.4 (Is it up to date?): String index out of range: -1
    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.BookWorm.onDisable(BookWorm.java:551)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:128)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:899)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:294)
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:287)
            at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:157)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:312)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:391)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:45:14 [INFO] [BaseBukkitPlugin 1.3] un-loaded
    08:45:14 [INFO] [LogBlock] Waiting for consumer ...
    08:45:14 [INFO] [LogBlock] Remaining queue size: 6
    08:45:14 [INFO] LogBlock disabled.
    08:45:14 [INFO] Saving chunks
    08:45:16 [SEVERE] Could not pass event WORLD_SAVE 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.BookWormWorldListener.onWorldSave(BookWormWorldListener.java:20)
            at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:598)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.MinecraftServer.saveChunks(MinecraftServer.java:298)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:324)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:391)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:45:17 [INFO] Stopping server
    08:45:17 [INFO] Saving chunks
    08:45:17 [SEVERE] Could not pass event WORLD_SAVE 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.BookWormWorldListener.onWorldSave(BookWormWorldListener.java:20)
            at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:598)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.MinecraftServer.saveChunks(MinecraftServer.java:298)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:324)
            at org.bukkit.craftbukkit.util.ServerShutdownThread.run(ServerShutdownThread.java:15)
    >
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  10. Offline

    zenyl

    Why not enable us to use some sort of plugin-reload-command, like "/bookworm reload"? :)
     
  11. Offline

    nisovin

    Try /bookworm -reload.
     
  12. Offline

    L3nnyBoss

    This Plugin is so great! It works fine on 953, I wrote many books. All my user like it!
     
  13. Offline

    Celtic Minstrel

    In principle, yes. All you need is WorldGuard and a way to give permissions only in specific WorldGuard regions, and then make the public library a region and give them the "copy others' books" permission in that region.

    I'm not sure if the ability to give regional permissions exists in any plugin, though... but if it doesn't, I suspect it will soon.
     
  14. Offline

    y1985

    Ah, I get the picture.
    Thanks.
     
  15. Offline

    sfxworks

    Update for build 1k?
     
  16. Offline

    T4L_Goose

    It works fine for 1k
     
  17. Offline

    nisovin

    New version released! I added an undo option for small mistakes. It only has one undo level. I also added support for the new permissions system.
     
    undeadmach1ne and LlmDl like this.
  18. Offline

    Juze

    Nice plugin @nisovin ! Although, your changelog is missing spoilers. Two most recent changes should be visible, rest in spoilers, such as this:

    v1.5 - Something.
    v1.4 - Something.
    Show Changelog
    v1.3 - Something again.
    v1.2 - Spoilered.
    v1.1 - I changed something.
    v1.0 - First release, hooray!
     
  19. Offline

    JoshP95

    Hi, is there a way of reloading the plugin without restarting the server?
    I've tried /bookworm -reload but it doesn't actually reload anything for me.
    Cheers.

    [EDIT]: Actually, it seems to be working now. Don't worry.
     
  20. Offline

    Phant0mX

    Great plugin, this will make adventure maps out of this word! Anyway you could add in a command to load a text file into a book? That would really simplify converting adventure map notes to books.
     
  21. Offline

    Joy

    Saw this come by:

    Code:
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    12:31:01 [INFO] Failed to load book (file not found): -1
    
     
  22. Offline

    narrowtux

    For the custom book titles on hover:
    That's now possible with BukkitContrib!
    Users have to have the client mod installed, though.
    PHP:
    BukkitContrib.getItemManager().setCustomName(Material.BOOKbookidthetitle);
    It's as easy as that.
    Maybe I missed that this is implemented, otherwise, I'm glad to help out!
     
  23. Offline

    Celtic Minstrel

    It's not needed. Just do this:
    1. Go into you BookWorm data folder. You'll see a file called bookid.txt.
    2. In that file is a number. Add one to it, replace it, and save. For example, if it was 5, replace it with 6 and then save it.
    3. Create a text file whose name is the number. In the above example, the filename would be 6.txt.
    4. On the first line of the new file, put the same number again.
    5. On the second line, put the title of the book.
    6. On the third line, put the author of the book.
    7. On the fourth line, put the contents of the book. Don't use the enter key; write :: instead just like you would in-game.
    8. Go into Minecraft, and give yourself the book. For example, if you use General and your book is ID 6, use the command "/give book/6".

    You don't even need to reload the server, since BookWorm loads books as they're needed. Note that while I know General supports giving books like that, I don't know if other plugins that have /give support it. If you want to make sure they do before doing all that work, just try it with the ID of an existing book.

    Having a BookWorm command to obtain a copy of a book by ID might be helpful though.
     
  24. Offline

    nisovin

    That function still only accepts a byte, rather than a short. So I could do that for the first 127 books, but none after that.
     
  25. Offline

    narrowtux

    That's right. I don't know why @Afforess used a byte...
     
  26. Offline

    Afforess

    Easy to fix. Wish someone had told me sooner. ;)
     
  27. Offline

    narrowtux

    It's now in shorts in the latest dev release ;)
     
  28. Offline

    Phealoon

    Bookcase Doesn't Work!

    For some reason I have given the permission node for players to remove books from the bookcase, but ONLY ops can do this. Is there a way to allow everyone the ability to take a book off the bookcase. Yes they have all the permissions nodes available. I also have the Resident Plugin which is a type of world guard if that helps.
     
  29. Offline

    Zykana

    So I have one problem with the plugin. When the server is reloaded rather than stopped and started, from our control panel with our rental server, our books stop displaying. I can place books on shelves I have previously put books. They will be there only when the server is restarted. It's like it's using two different states or something.
     
  30. Offline

    JoshP95

    Hey! It may have already been explained and sorry if it has but, is it possible to obtain a copy of a book that you may have lost ingame? I saw the post above about "/give book/6" but I don't think it worked for me.
    Cheers!
     

Share This Page