diff --git a/src/main/java/dev/plex/admin/Admin.java b/src/main/java/dev/plex/admin/Admin.java index ffa5e6f..a3d0c16 100644 --- a/src/main/java/dev/plex/admin/Admin.java +++ b/src/main/java/dev/plex/admin/Admin.java @@ -42,6 +42,7 @@ public class Admin /** * Creates an admin with the startig ADMIN rank + * * @param uuid * @see UUID * @see Rank diff --git a/src/main/java/dev/plex/admin/AdminList.java b/src/main/java/dev/plex/admin/AdminList.java index 6de674c..b954716 100644 --- a/src/main/java/dev/plex/admin/AdminList.java +++ b/src/main/java/dev/plex/admin/AdminList.java @@ -19,6 +19,7 @@ import java.util.stream.Collectors; /** * Cached storage for Admin objects + * * @see Admin */ @@ -31,6 +32,7 @@ public class AdminList /** * Adds the admin to cache + * * @param admin The admin object */ public void addToCache(Admin admin) @@ -40,6 +42,7 @@ public class AdminList /** * Removes an admin from the cache + * * @param uuid The unique ID of the admin * @see UUID */ @@ -50,6 +53,7 @@ public class AdminList /** * Gathers every admin's username (cached and databsed) + * * @return An array list of the names of every admin */ public List getAllAdmins() diff --git a/src/main/java/dev/plex/banning/Ban.java b/src/main/java/dev/plex/banning/Ban.java index 40be005..4b5da9e 100644 --- a/src/main/java/dev/plex/banning/Ban.java +++ b/src/main/java/dev/plex/banning/Ban.java @@ -13,6 +13,7 @@ import org.apache.commons.lang.RandomStringUtils; /** * The ban object + * * @see BanManager */ @Getter @@ -69,10 +70,11 @@ public class Ban /** * Creates a ban object - * @param uuid The unique ID of the player being banned - * @param banner The unique ID of the sender banning the player - * @param ip The IP of the player being banned - * @param reason The reason for the ban + * + * @param uuid The unique ID of the player being banned + * @param banner The unique ID of the sender banning the player + * @param ip The IP of the player being banned + * @param reason The reason for the ban * @param endDate When the ban will expire */ public Ban(UUID uuid, UUID banner, String ip, String reason, LocalDateTime endDate) @@ -87,11 +89,12 @@ public class Ban /** * Creates a ban object - * @param id The custom ID of the ban - * @param uuid The unique ID of the player being banned - * @param banner The unique ID of the sender banning the player - * @param ip The IP of the player being banned - * @param reason The reason for the ban + * + * @param id The custom ID of the ban + * @param uuid The unique ID of the player being banned + * @param banner The unique ID of the sender banning the player + * @param ip The IP of the player being banned + * @param reason The reason for the ban * @param endDate When the ban will expire */ public Ban(String id, UUID uuid, UUID banner, String ip, String reason, LocalDateTime endDate) diff --git a/src/main/java/dev/plex/banning/BanManager.java b/src/main/java/dev/plex/banning/BanManager.java index b9e967f..3a7cb9f 100644 --- a/src/main/java/dev/plex/banning/BanManager.java +++ b/src/main/java/dev/plex/banning/BanManager.java @@ -23,6 +23,7 @@ public class BanManager /** * Adds the ban to the database + * * @param ban The ban object */ public void executeBan(Ban ban) @@ -55,6 +56,7 @@ public class BanManager /** * Checks if the unique ID has an active ban in the database + * * @param uuid The unique ID of the player * @return true if the unique ID is banned */ @@ -94,6 +96,7 @@ public class BanManager /** * Unbans a player if they have an active ban on record + * * @param uuid The unique ID of the player */ public void unban(UUID uuid) @@ -125,6 +128,7 @@ public class BanManager /** * Unbans a player if they have an active ban on record + * * @param id Custom ID of the ban */ public void unban(String id) @@ -155,6 +159,7 @@ public class BanManager /** * Gets a list of all the current bans active + * * @return An arraylist of bans */ public List getActiveBans() diff --git a/src/main/java/dev/plex/cache/DataUtils.java b/src/main/java/dev/plex/cache/DataUtils.java index fab0319..ad47056 100644 --- a/src/main/java/dev/plex/cache/DataUtils.java +++ b/src/main/java/dev/plex/cache/DataUtils.java @@ -13,6 +13,7 @@ public class DataUtils { /** * Checks if the player has been on the server before + * * @param uuid The unique ID of the player * @return true if the player is registered in the database */ @@ -30,6 +31,7 @@ public class DataUtils /** * Gets a player from cache or from the database + * * @param uuid The unique ID of the player * @return a PlexPlayer object * @see PlexPlayer @@ -53,6 +55,7 @@ public class DataUtils /** * Gets a player from cache or from the database + * * @param name Username of the player * @return a PlexPlayer object * @see PlexPlayer @@ -64,6 +67,7 @@ public class DataUtils /** * Updates a player's information in the database + * * @param plexPlayer The PlexPlayer to update * @see PlexPlayer */ @@ -81,6 +85,7 @@ public class DataUtils /** * Inserts a player's information in the database + * * @param plexPlayer The PlexPlayer to insert * @see PlexPlayer */ diff --git a/src/main/java/dev/plex/cache/MongoPlayerData.java b/src/main/java/dev/plex/cache/MongoPlayerData.java index 611675e..f85eaa3 100644 --- a/src/main/java/dev/plex/cache/MongoPlayerData.java +++ b/src/main/java/dev/plex/cache/MongoPlayerData.java @@ -29,6 +29,7 @@ public class MongoPlayerData /** * Checks whether the player exists in mongo's database + * * @param uuid The unique ID of the player * @return true if the player was found */ @@ -42,6 +43,7 @@ public class MongoPlayerData /** * Gets the player from cache or from mongo's database + * * @param uuid The unique ID of the player * @return a PlexPlayer object * @see PlexPlayer @@ -59,6 +61,7 @@ public class MongoPlayerData /** * Updates a player's information in the mongo database + * * @param player The PlexPlayer object * @see PlexPlayer */ @@ -84,6 +87,7 @@ public class MongoPlayerData /** * Saves the player's information in the database + * * @param plexPlayer The PlexPlayer object * @see PlexPlayer */ diff --git a/src/main/java/dev/plex/cache/SQLPlayerData.java b/src/main/java/dev/plex/cache/SQLPlayerData.java index c97ad8c..cfd70b0 100644 --- a/src/main/java/dev/plex/cache/SQLPlayerData.java +++ b/src/main/java/dev/plex/cache/SQLPlayerData.java @@ -22,6 +22,7 @@ public class SQLPlayerData /** * Checks if a player exists in the SQL database + * * @param uuid The unique ID of the player * @return true if the player was found in the database */ @@ -43,6 +44,7 @@ public class SQLPlayerData /** * Gets the player from cache or from the SQL database + * * @param uuid The unique ID of the player * @return a PlexPlayer object * @see PlexPlayer @@ -92,6 +94,7 @@ public class SQLPlayerData /** * Updates a player's information in the SQL database + * * @param player The PlexPlayer object * @see PlexPlayer */ @@ -119,6 +122,7 @@ public class SQLPlayerData /** * Inserts the player's information in the database + * * @param player The PlexPlayer object * @see PlexPlayer */ diff --git a/src/main/java/dev/plex/command/annotation/CommandParameters.java b/src/main/java/dev/plex/command/annotation/CommandParameters.java index e9318d5..fa5d6a2 100644 --- a/src/main/java/dev/plex/command/annotation/CommandParameters.java +++ b/src/main/java/dev/plex/command/annotation/CommandParameters.java @@ -11,24 +11,28 @@ public @interface CommandParameters { /** * The name + * * @return Name of the command */ String name(); /** * The description + * * @return Description of the command */ String description() default ""; /** * The usage (optional) + * * @return The usage of the command */ String usage() default "/"; /** * The aliases (optional) + * * @return The aliases of the command */ String aliases() default ""; diff --git a/src/main/java/dev/plex/command/annotation/CommandPermissions.java b/src/main/java/dev/plex/command/annotation/CommandPermissions.java index 523bb43..2b25c5c 100644 --- a/src/main/java/dev/plex/command/annotation/CommandPermissions.java +++ b/src/main/java/dev/plex/command/annotation/CommandPermissions.java @@ -13,6 +13,7 @@ public @interface CommandPermissions { /** * Minimum rank required + * * @return Minimum rank required for the command * @see Rank */ @@ -20,6 +21,7 @@ public @interface CommandPermissions /** * Required command source + * * @return The required command source of the command * @see RequiredCommandSource */ @@ -27,6 +29,7 @@ public @interface CommandPermissions /** * The permission + * * @return Permission of the command */ String permission() default ""; // No idea what to put here diff --git a/src/main/java/dev/plex/listener/impl/BanListener.java b/src/main/java/dev/plex/listener/impl/BanListener.java index c1bda86..7e4ead8 100644 --- a/src/main/java/dev/plex/listener/impl/BanListener.java +++ b/src/main/java/dev/plex/listener/impl/BanListener.java @@ -1,9 +1,7 @@ package dev.plex.listener.impl; import dev.plex.banning.Ban; -import dev.plex.cache.DataUtils; import dev.plex.listener.PlexListener; -import dev.plex.player.PlexPlayer; import dev.plex.util.PlexUtils; import java.time.format.DateTimeFormatter; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; diff --git a/src/main/java/dev/plex/util/MojangUtils.java b/src/main/java/dev/plex/util/MojangUtils.java index 68425f7..633924d 100644 --- a/src/main/java/dev/plex/util/MojangUtils.java +++ b/src/main/java/dev/plex/util/MojangUtils.java @@ -37,10 +37,11 @@ public class MojangUtils return null; } client.close(); - AshconInfo ashconInfo = new GsonBuilder().registerTypeAdapter(LocalDateTime.class, (JsonDeserializer) (json1, typeOfT, context) -> + AshconInfo ashconInfo = new GsonBuilder().registerTypeAdapter(LocalDateTime.class, (JsonDeserializer)(json1, typeOfT, context) -> LocalDateTime.ofInstant(Instant.from(DateTimeFormatter.ISO_INSTANT.parse(json1.getAsJsonPrimitive().getAsString())), ZoneId.systemDefault())).create().fromJson(json, AshconInfo.class); - Arrays.sort(ashconInfo.getUsernameHistories(), (o1, o2) -> { + Arrays.sort(ashconInfo.getUsernameHistories(), (o1, o2) -> + { if (o1.getLocalDateTime() == null || o2.getLocalDateTime() == null) { return 1;