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.
what? i didn't poste it twice :/ what ever, can't you get over it?? here, to help you hers some cake!!
Here, found it: http://forums.bukkit.org/threads/books-duplicating-kits.91496/#post-1265170 And there's nothing to "get over"...
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.
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
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.
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
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.
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
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
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.
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.
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!