SwissBook is a plugin that will enable you to fix typos in books and maintaining/updating server manuals or other books(signed or unsigned) without the hassle of deleting half your page or copy/pasting. SwissBook offers every function needed to update and maintain your books. the text editing might seem a bit complicated at first, but its simple, really.
text-based:
|" as spaces and "~" as enter/line-break)
|" as spaces and "~" as enter/line-break)
index-based:
|" as spaces and "~" as enter/line-break)
|" as spaces and "~" as enter/line-break)
text-based:
the most notable use for this plugins text-based commands is to easily insert, delete or replace text at a location specified by text. note that you need to be holding the book you want to modify.
try using "/sb get 1 256 1" this will print out the text from location 1 to 256 on page 1, it will also insert a blue number every 10 locations, but thats not really important in default mode this command is still usefull in default mode because it saves you from opening your book and searching the page everytime, it also allows you to type your command while you can still see what is in the book.
now try "/sb insert test 1 TextSomewhereOnPage1OfYourBook preview" the text "TextSomewhereOnPage1OfYourBook" in the line above shuld be replace by any text oon page 1 of the book your modifying, a piece of the text that was retrieved by the "get" command. swissbook now shows you how the text would look if the insert command would be executed. you'll see that the word "test" has been inserted at after the text you specified on the 1st page now retrieve the command from your chat history and remove the word preview. swissbook will now insert the word " test" in the accual book.
try "/sb replace test foo 1 preview" swissbook now shows you how the text would look if the replace command would be executed. you'll see that the word "test" has been replaced with the word "foo" as before you can retrieve the command from your chat history and remove "preview" if you confirmed "test" was indeed replaced with "foo" you can also use "replaceall" to replace all instances of the word test on the page.
try "/sb delete foo 1 preview" swissbook now shows you how the text would look if the delete command would be executed. you'll see that the word "foo" has been deleted. as before you can retrieve the command from your chat history and remove "preview" if you confirmed "foo" was indeed removed.
these commands will always effect the first instance of the text from the top of the page, if you need it to effect another instance, use advanced mode or make your command more specifick
you can use "|" as spaces and "~" as line breaks. this means that if you want to put a complete sentence or even multiple lines in your book, you just replace spaces with | end enters/linebreaks with ~.
i.e: "hello|world,~how|are|you?"
would end up in the book as:
hello world, how are you?
index-based:
the most notable use for this plugins index-based commands is to insert, copy and/or replace text at a specifick location. to do this we must first figure out the index of the characters/location you want to use. you could go about by counting every character on the page, but "/sb get" makes this alot easier. note that you need to be holding the book you want to modify.
try using "/sb get 1 256 1" this will print out the text from location 1 to 256 on page 1, it will also insert a blue number every 10 locations, so you can easily get the index of the location you want to use.
now try "/sb insert 5 1 test preview" swissbook now shows you how the text would look if the insert command would be executed. you'll see that the word "test" has been inserted at the 5th index on the 1st page now retrieve the command from your chat history and remove the word preview. swissbook will now insert the word " test" in the accual book.
try "/sb replace 5 8 1 foo preview" swissbook now shows you how the text would look if the replace command would be executed. you'll see that the word "test" has been replaced with the word "foo" as before you can retrieve the command from your chat history and remove "preview" if you confirmed "test" was indeed replaced with "foo"
try "/sb delete 5 7 1 preview" swissbook now shows you how the text would look if the delete command would be executed. you'll see that the word "foo" has been deleted. as before you can retrieve the command from your chat history and remove "preview" if you confirmed "foo" was indeed removed
after this introduction, feel free to experiment with other commands
text-based:
|" as spaces and "~" as line breaks.|" as spaces and "~" as line breaks.|" as spaces and "~" as line breaks.index-based:
|" as spaces and "~" as line breaks.|" as spaces and "~" as line breaks.commands can only be used on written books if the correlating node is appended with ".signed". i.e.: a player with "swissbook.page.move" can only move pages in unsigned books(book and quill), to move pages in a written book he would need "swissbook,page.move.signed".
unsigning books is similar, a player with "swissbook.unsign" can only unsign books they signed themselves, if you want players to be able to unsign other players books, give them "swissbook.unsign.other".
if you don't want players to be able to change other players books you also can't give them "swissbook.sign" as they would be able to use that command to make the book "their own" after which they would still be able to unsign and modify a book
recommended player nodes:
recommended admin nodes:
drop the jar in your plugins folder and start your server. by default only ops have access to commands, if you want to enable this plugin for normal members you will need a permissions plugin.