Instruction Books

Discussion in 'Archived: Plugin Requests' started by Zach Mendell, Aug 7, 2012.

  1. Offline

    Zach Mendell

    A plugin that when users spawn, they spawn with a book in their inventory detailing our rules or plugin descriptions. I would like a plugin that if a user needed an explanation on something, they could just type a command that would give them a book (with server defined text) detailing the plugin commands and how to use them or our server rules on them.
     
  2. Offline

    fredghostkyle1

    um a plugin like this is in devilment! [LINK]
     
  3. Offline

    np98765

    Devilment? :confused:
     
  4. Offline

    hawkfalcon

    Wtf he said exactly the same thing on another thread. 0.o
     
    Nathan C and kittenchunks like this.
  5. Offline

    np98765

    dev·il·ment/ˈdevəlmənt/


    Noun:
    Reckless mischief; wild spirits.

    Synonyms: devilry - mischief

    ??
     
    Nathan C, kittenchunks, gorbb and 2 others like this.
  6. Offline

    hawkfalcon

    So he really said
    :confused:
     
    Pew446 likes this.
  7. Offline

    fredghostkyle1

    ok, i get it i can't spell. here, have some diamonds and gold!! [diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold][diamond] [gold]
     
  8. Offline

    np98765

    We were just curious since apparently you posted devilment twice. :3
     
  9. Offline

    fredghostkyle1

    what? i didn't poste it twice :/ what ever, can't you get over it?? here, to help you hers some cake!! [cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake]
     
  10. Offline

    np98765

  11. Offline

    fredghostkyle1

  12. Offline

    Deathmarine Retired Staff

    You can thank codename_B for this one as well.
    (Speaking of which I improved a few things on the fork and added you to it.)
    Description:
    Give a book to all new players and those who have yet to receive it.
    Source:
    https://github.com/deathmarine/RuleBook
    Download:
    https://github.com/downloads/deathmarine/RuleBook/RuleBook.jar
    Config:
    Code:
    #Max Characters 16#
    Title: '&lRules!'
    Author: '&oAdministration'
    #Each Line is a page. Max Characters 256 Max pages 50#
    Pages:
    - '&bCongradulations on joining one of the most awesome servers in existence.'
    - '&3Upon Joining you should of received this book. That contains a load of rules and crap.'
    
    Permissions: None
    Everything is pretty much automatic. Just fill out the config. Trying to keep this simple.

    Edit: I know I didn't replace the section character for &. But they work.

    There was cake? Man I missed the party.

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

    fredghostkyle1

    you did, nut here, for coding this plugin have the last bit of cake [cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake][cake]
     
  14. Offline

    Deathmarine Retired Staff

    Thats what I'm talkin bout.
     
  15. Offline

    izak12345678910

    Hey, um do the colors work cause when i tried with both signs § and & and a color code nothing would change and for some reason it skips pages or puts 2 pages in 1 like
    - rule 1 blablablabla
    - rule 2 lalalalala
    In Book
    rule 1 blablah
    blah-rule 2 lala
    lalala
    Or also i do
    - welcome please read here are rules rule 1 random
    - rule 2 more random
    - rule 3 even more random
    but in book the first page shows up and the 3rd does but the second disappears any ideas? And Sometimes books from other players are getting cleared i dont know why or if this is our plugin but it started today when i got this plugin. Thanks in advance
     
  16. Offline

    Deathmarine Retired Staff

    Each tac "-" is a page max 256 characters.

    EDIT.. Alright I'll change the section characters. (I feel like the internet is yelling at me).
    EDITTUMOR:
    Code:
    Title: '&lRules!'
    Author: '&oAdministration'
    Pages:
    - '&bCongradulations on joining one of the most awesome servers in existence.'
    - '&3Upon Joining you should of received this book. That contains a load of rules and crap.'
    
    Quote your strings/pages.
    EditTRI: Download link updated for Ampersand Formatting.
     
  17. Offline

    izak12345678910

    I know each - is a page sometime the books skip a page or combine a page even though theres a -
    EDIT: Also when people read the books it doesn't go into the has read.txt and they keep getting a book everytime they join
     
  18. Offline

    Deathmarine Retired Staff

    Got it. Forgot to close the writer. Links Updates.... again..... like seconds... ago
    https://github.com/deathmarine/RuleBook/commit/17847d471ba72c76bad43f485f1bd74000fd2624
    This is fun. forum refreshing ninja'd edit coding.

    Edit. I'm unsure why the pages were skipping I tried 5 and then 7 pages... no prob.
     
  19. Offline

    izak12345678910

    Do the colors work? And do i need to re write it all?
    EDIT. Colors work and he has read works! Thanks! PS Why dont you release it on bukkit dev its an amazing plugin
     
  20. Offline

    Deathmarine Retired Staff

    Probably will.
     
  21. Offline

    izak12345678910

    You should! :p If you want i can create the page like in Drop Party
     
  22. Offline

    Reptar_

    It works, but when I try to edit the pages, I get this:
    Code:
    21:07:30 [SEVERE] Cannot load plugins/RuleBook/config.yml
    org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
     in "<string>", line 1, column 1:
        Title: '&lRules!'
        ^
    expected <block end>, but found Scalar
     in "<string>", line 6, column 17:
        - '&cIf you don't see this I fail as a developer.'
                        ^
     
    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55)
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:138)
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:105)
    at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:175)
    at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:117)
    at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111)
    at com.modcrafting.rulebook.RuleBook.onPlayerJoin(RuleBook.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
    at net.minecraft.server.ServerConfigurationManagerAbstract.c(ServerConfigurationManagerAbstract.java:161)
    at net.minecraft.server.ServerConfigurationManagerAbstract.a(ServerConfigurationManagerAbstract.java:92)
    at net.minecraft.server.NetLoginHandler.d(NetLoginHandler.java:121)
    at net.minecraft.server.NetLoginHandler.c(NetLoginHandler.java:41)
    at net.minecraft.server.DedicatedServerConnectionThread.a(DedicatedServerConnectionThread.java:44)
    at net.minecraft.server.DedicatedServerConnection.b(SourceFile:29)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:583)
    at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
    at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    Caused by: while parsing a block mapping
     in "<string>", line 1, column 1:
        Title: '&lRules!'
        ^
    expected <block end>, but found Scalar
     in "<string>", line 6, column 17:
        - '&cIf you don't see this I fail as a developer.'
                        ^
     
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:575)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121)
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:399)
    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:53)
    ... 25 more
    
     
  23. Offline

    Deathmarine Retired Staff

    lol... sometimes I fail at Yaml.

    Sorry better example config.
    Code:
    Title: '&lRules!'
    Author: '&oAdministration'
    Pages:
    - '&bCongradulations on joining one of the most awesome servers in existence.'
    - '&3Upon Joining you should of received this book. That contains a load of rules and crap.'
    
    Updated download link. Tested and found that the 50 page limit can be overriden with the bookApi. 129 pages ftw. Fixed issue with item in hand being overridden.

    BukkitDev Page coming soon.

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

    izak12345678910

    Hey now it stores players in the hasread but they still get books?
     
  25. Offline

    Deathmarine Retired Staff

    I'm running it right now. And I'm trying to get it to give me another book. The plugin preforms two checks if they've played before and if there name is in that file. I haven't been able to reproduce this.
     
  26. You can use a starterkit plugin and you can write in books so make a book and make it so new players get it when they log in. :) Hope I helped you! :)
     
  27. Offline

    blackbinary

Share This Page