Adds some missing comments
This commit is contained in:
parent
0ca4b9817e
commit
4ec46d3d9b
@ -55,25 +55,15 @@ import static net.knarcraft.bookswithoutborders.utility.InputCleaningHelper.clea
|
|||||||
|
|
||||||
public class BooksWithoutBorders extends JavaPlugin {
|
public class BooksWithoutBorders extends JavaPlugin {
|
||||||
|
|
||||||
//Limit for duplicates of a book
|
|
||||||
private static int bookDuplicateLimit;
|
private static int bookDuplicateLimit;
|
||||||
//The separating string between the book title and the book author
|
|
||||||
private static String titleAuthorSeparator;
|
private static String titleAuthorSeparator;
|
||||||
//Separator to force Lore newline
|
|
||||||
private static String loreSeparator;
|
private static String loreSeparator;
|
||||||
//Books to give players on first login
|
|
||||||
private static List<String> firstBooks;
|
private static List<String> firstBooks;
|
||||||
//Message to display to new players
|
|
||||||
private static String welcomeMessage;
|
private static String welcomeMessage;
|
||||||
//The material used for payment
|
|
||||||
private static Material bookPriceType = null;
|
private static Material bookPriceType = null;
|
||||||
//The number of items/currency to pay for each transaction
|
|
||||||
private static double bookPriceQuantity;
|
private static double bookPriceQuantity;
|
||||||
//Whether only the author of a book should be allowed to copy the book
|
|
||||||
private static boolean authorOnlyCopy;
|
private static boolean authorOnlyCopy;
|
||||||
//Whether to use YML files instead of TXT files for saving books
|
|
||||||
private static boolean useYml;
|
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 boolean adminDecrypt;
|
||||||
|
|
||||||
private static ItemFactory itemFactory;
|
private static ItemFactory itemFactory;
|
||||||
@ -101,30 +91,66 @@ public class BooksWithoutBorders extends JavaPlugin {
|
|||||||
registerCommands();
|
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() {
|
public static boolean getAuthorOnlyCopy() {
|
||||||
return authorOnlyCopy;
|
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() {
|
public static boolean getUseYml() {
|
||||||
return useYml;
|
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() {
|
public static boolean getAdminDecrypt() {
|
||||||
return adminDecrypt;
|
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) {
|
public static void setBookPriceQuantity(double newQuantity) {
|
||||||
bookPriceQuantity = 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() {
|
public static double getBookPriceQuantity() {
|
||||||
return bookPriceQuantity;
|
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) {
|
public static void setBookPriceType(Material newType) {
|
||||||
bookPriceType = 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() {
|
public static Material getBookPriceType() {
|
||||||
return bookPriceType;
|
return bookPriceType;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user