Adds some missing comments

This commit is contained in:
Kristian Knarvik 2021-09-04 01:25:52 +02:00
parent 0ca4b9817e
commit 4ec46d3d9b

View File

@ -55,25 +55,15 @@ import static net.knarcraft.bookswithoutborders.utility.InputCleaningHelper.clea
public class BooksWithoutBorders extends JavaPlugin {
//Limit for duplicates of a book
private static int bookDuplicateLimit;
//The separating string between the book title and the book author
private static String titleAuthorSeparator;
//Separator to force Lore newline
private static String loreSeparator;
//Books to give players on first login
private static List<String> firstBooks;
//Message to display to new players
private static String welcomeMessage;
//The material used for payment
private static Material bookPriceType = null;
//The number of items/currency to pay for each transaction
private static double bookPriceQuantity;
//Whether only the author of a book should be allowed to copy the book
private static boolean authorOnlyCopy;
//Whether to use YML files instead of TXT files for saving books
private static boolean useYml;
//Whether admins should be able to decrypt group encrypted books without belonging to its group
private static boolean adminDecrypt;
private static ItemFactory itemFactory;
@ -101,30 +91,66 @@ public class BooksWithoutBorders extends JavaPlugin {
registerCommands();
}
/**
* Gets whether only the author of a book should be able to copy it
* @return <p>Whether only the book author can copy it</p>
*/
public static boolean getAuthorOnlyCopy() {
return authorOnlyCopy;
}
/**
* Gets whether to use YML, not TXT, for saving books
* @return <p>Whether to use YML for saving books</p>
*/
public static boolean getUseYml() {
return useYml;
}
/**
* Gets whether admins should be able to decrypt books without a password, and decrypt all group encrypted books
* @return <p>Whether admins can bypass the encryption password</p>
*/
public static boolean getAdminDecrypt() {
return adminDecrypt;
}
/**
* Sets the quantity of items/currency necessary for copying books
* @param newQuantity <p>The new quantity necessary for payment</p>
*/
public static void setBookPriceQuantity(double newQuantity) {
bookPriceQuantity = newQuantity;
}
/**
* Gets the quantity of items/currency necessary for copying books
* @return <p>The quantity necessary for payment</p>
*/
public static double getBookPriceQuantity() {
return bookPriceQuantity;
}
/**
* Sets the item type used for book pricing
*
* <p>This item is the one a player has to pay for copying books. AIR is used to denote economy. null is used if
* payment is disabled. Otherwise, any item can be used.</p>
*
* @param newType <p>The new item type to use for book pricing</p>
*/
public static void setBookPriceType(Material newType) {
bookPriceType = newType;
}
/**
* Gets the item type used for book pricing
*
* <p>This item is the one a player has to pay for copying books. AIR is used to denote economy. null is used if
* payment is disabled. Otherwise, any item can be used.</p>
*
* @return <p>The item type used for book pricing</p>
*/
public static Material getBookPriceType() {
return bookPriceType;
}