From 4ec46d3d9b559465b9eabb3d990ca789c349610a Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 4 Sep 2021 01:25:52 +0200 Subject: [PATCH] Adds some missing comments --- .../BooksWithoutBorders.java | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/knarcraft/bookswithoutborders/BooksWithoutBorders.java b/src/main/java/net/knarcraft/bookswithoutborders/BooksWithoutBorders.java index 4fbc4a2..150d24f 100644 --- a/src/main/java/net/knarcraft/bookswithoutborders/BooksWithoutBorders.java +++ b/src/main/java/net/knarcraft/bookswithoutborders/BooksWithoutBorders.java @@ -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 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

Whether only the book author can copy it

+ */ public static boolean getAuthorOnlyCopy() { return authorOnlyCopy; } + /** + * Gets whether to use YML, not TXT, for saving books + * @return

Whether to use YML for saving books

+ */ 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

Whether admins can bypass the encryption password

+ */ public static boolean getAdminDecrypt() { return adminDecrypt; } + /** + * Sets the quantity of items/currency necessary for copying books + * @param newQuantity

The new quantity necessary for payment

+ */ public static void setBookPriceQuantity(double newQuantity) { bookPriceQuantity = newQuantity; } + /** + * Gets the quantity of items/currency necessary for copying books + * @return

The quantity necessary for payment

+ */ public static double getBookPriceQuantity() { return bookPriceQuantity; } + /** + * Sets the item type used for book pricing + * + *

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.

+ * + * @param newType

The new item type to use for book pricing

+ */ public static void setBookPriceType(Material newType) { bookPriceType = newType; } + /** + * Gets the item type used for book pricing + * + *

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.

+ * + * @return

The item type used for book pricing

+ */ public static Material getBookPriceType() { return bookPriceType; }