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

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

  1. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.)
  2. Offline

    Beldarak

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  3. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Already exists, read OP.
  4. Offline

    Beldarak

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Youps, sorry :S
  5. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Getting reports that even with:

    require-book-to-copy: true

    People can still dupe books. Not entirely sure how, yet...
  6. Offline

    Lunarius Haberdash

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  7. Offline

    Chasingu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does this work with 1000?
  8. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ...you sure the client mod is needed for this? It sounds like something that would work without it.
  9. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  10. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah, I didn't realize the achievement window part and was commenting solely based on the detecting right-clicks part. It makes sense now.
  11. Offline

    kahlilnc

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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...
  12. Offline

    Blacky

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I use it.

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

    Garninc580

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does this work with bukkit 1000
  14. Offline

    y1985

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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?
  15. Offline

    Tichondrian

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  16. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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?
  17. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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)
    >
    
  18. Offline

    zenyl

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Why not enable us to use some sort of plugin-reload-command, like "/bookworm reload"? :)
  19. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Try /bookworm -reload.
  20. Offline

    L3nnyBoss

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This Plugin is so great! It works fine on 953, I wrote many books. All my user like it!
  21. Offline

    Celtic Minstrel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  22. Offline

    y1985

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah, I get the picture.
    Thanks.
  23. Offline

    sfxworks

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Update for build 1k?
  24. Offline

    T4L_Goose

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It works fine for 1k
  25. Offline

    nisovin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  26. Offline

    Juze

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
    v1.3 - Something again.
    v1.2 - Spoilered.
    v1.1 - I changed something.
    v1.0 - First release, hooray!
  27. Offline

    JoshP95

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  28. Offline

    Phant0mX

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  29. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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
    
  30. Offline

    narrowtux

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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!

Share This Page