From 553e5c63558c83440e6724a16847bc9ee6ad236c Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Tue, 22 Feb 2022 03:30:23 -0600 Subject: [PATCH] Formatting --- src/main/java/dev/plex/Plex.java | 15 +++--- .../java/dev/plex/command/PlexCommand.java | 3 +- .../java/dev/plex/command/impl/DebugCMD.java | 1 - src/main/java/dev/plex/config/Config.java | 3 +- .../dev/plex/event/PunishedPlayerEvent.java | 1 + .../plex/event/PunishedPlayerFreezeEvent.java | 4 +- .../plex/event/PunishedPlayerMuteEvent.java | 4 +- .../dev/plex/listener/impl/BanListener.java | 3 +- .../plex/listener/impl/PlayerListener.java | 21 ++++---- .../plex/listener/impl/ServerListener.java | 8 +-- .../dev/plex/listener/impl/WorldListener.java | 54 +++++++++++++------ .../java/dev/plex/player/PunishedPlayer.java | 46 ++++++++++------ .../plex/punishment/PunishmentManager.java | 34 +++++++----- src/main/java/dev/plex/rank/RankManager.java | 12 ++--- src/main/java/dev/plex/rank/enums/Rank.java | 6 --- .../dev/plex/services/impl/BanService.java | 1 - src/main/java/dev/plex/util/MojangUtils.java | 13 +++-- src/main/resources/config.yml | 2 +- 18 files changed, 138 insertions(+), 93 deletions(-) diff --git a/src/main/java/dev/plex/Plex.java b/src/main/java/dev/plex/Plex.java index 411e3d5..27210a4 100644 --- a/src/main/java/dev/plex/Plex.java +++ b/src/main/java/dev/plex/Plex.java @@ -21,14 +21,13 @@ import dev.plex.storage.StorageType; import dev.plex.util.PlexLog; import dev.plex.util.PlexUtils; import dev.plex.world.CustomWorld; +import java.util.UUID; import lombok.Getter; import lombok.Setter; import org.bstats.bukkit.Metrics; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; -import java.util.UUID; - @Getter @Setter public class Plex extends JavaPlugin @@ -82,7 +81,8 @@ public class Plex extends JavaPlugin { PlexUtils.testConnections(); PlexLog.log("Connected to " + storageType.name().toUpperCase()); - } catch (Exception e) + } + catch (Exception e) { PlexLog.error("Failed to connect to " + storageType.name().toUpperCase()); e.printStackTrace(); @@ -96,7 +96,8 @@ public class Plex extends JavaPlugin { redisConnection.getJedis(); PlexLog.log("Connected to Redis!"); - } else + } + else { PlexLog.log("Redis is disabled in the configuration file, not connecting."); } @@ -104,7 +105,8 @@ public class Plex extends JavaPlugin if (storageType == StorageType.MONGODB) { mongoPlayerData = new MongoPlayerData(); - } else + } + else { sqlPlayerData = new SQLPlayerData(); } @@ -149,7 +151,8 @@ public class Plex extends JavaPlugin if (mongoPlayerData != null) //back to mongo checking { mongoPlayerData.update(plexPlayer); //update the player's document - } else if (sqlPlayerData != null) //sql checking + } + else if (sqlPlayerData != null) //sql checking { sqlPlayerData.update(plexPlayer); } diff --git a/src/main/java/dev/plex/command/PlexCommand.java b/src/main/java/dev/plex/command/PlexCommand.java index 18fb5ad..2dbaac1 100644 --- a/src/main/java/dev/plex/command/PlexCommand.java +++ b/src/main/java/dev/plex/command/PlexCommand.java @@ -436,8 +436,9 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC /** * Converts usage to a component - * + *

* s The usage to convert + * * @return A Kyori component stating the usage */ protected Component usage(String s) diff --git a/src/main/java/dev/plex/command/impl/DebugCMD.java b/src/main/java/dev/plex/command/impl/DebugCMD.java index 17449b5..1da9fcc 100644 --- a/src/main/java/dev/plex/command/impl/DebugCMD.java +++ b/src/main/java/dev/plex/command/impl/DebugCMD.java @@ -1,7 +1,6 @@ package dev.plex.command.impl; import com.google.common.collect.ImmutableList; -import dev.plex.Plex; import dev.plex.command.PlexCommand; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; diff --git a/src/main/java/dev/plex/config/Config.java b/src/main/java/dev/plex/config/Config.java index c37a32e..bd4d185 100644 --- a/src/main/java/dev/plex/config/Config.java +++ b/src/main/java/dev/plex/config/Config.java @@ -25,8 +25,9 @@ public class Config extends YamlConfiguration /** * Creates a config object + * * @param plugin The plugin instance - * @param name The file name + * @param name The file name */ public Config(Plex plugin, String name) { diff --git a/src/main/java/dev/plex/event/PunishedPlayerEvent.java b/src/main/java/dev/plex/event/PunishedPlayerEvent.java index 603b68f..9f724b4 100644 --- a/src/main/java/dev/plex/event/PunishedPlayerEvent.java +++ b/src/main/java/dev/plex/event/PunishedPlayerEvent.java @@ -27,6 +27,7 @@ public abstract class PunishedPlayerEvent extends PlayerEvent implements Cancell /** * Creates an event object + * * @param punishedPlayer The player who was punished * @see PunishedPlayer */ diff --git a/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java b/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java index d165040..a753974 100644 --- a/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java +++ b/src/main/java/dev/plex/event/PunishedPlayerFreezeEvent.java @@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; //TODO: Event doesn't look like it is called + /** * Event that is called when a player is frozen or unfrozen */ @@ -21,8 +22,9 @@ public class PunishedPlayerFreezeEvent extends PunishedPlayerEvent implements Ca /** * Creates a new event instance + * * @param punishedPlayer The player who was punished - * @param frozen The new frozen status + * @param frozen The new frozen status */ public PunishedPlayerFreezeEvent(PunishedPlayer punishedPlayer, boolean frozen) { diff --git a/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java b/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java index 5470b55..6d76cc4 100644 --- a/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java +++ b/src/main/java/dev/plex/event/PunishedPlayerMuteEvent.java @@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; //TODO: Event doesn't look like it is called + /** * Event that is called when a player is frozen or unfrozen */ @@ -21,8 +22,9 @@ public class PunishedPlayerMuteEvent extends PunishedPlayerEvent implements Canc /** * Creates a new event instance + * * @param punishedPlayer The player who was punished - * @param muted The new muted status + * @param muted The new muted status */ public PunishedPlayerMuteEvent(PunishedPlayer punishedPlayer, boolean muted) { diff --git a/src/main/java/dev/plex/listener/impl/BanListener.java b/src/main/java/dev/plex/listener/impl/BanListener.java index 0afb8d3..9014b12 100644 --- a/src/main/java/dev/plex/listener/impl/BanListener.java +++ b/src/main/java/dev/plex/listener/impl/BanListener.java @@ -6,12 +6,11 @@ import dev.plex.player.PunishedPlayer; import dev.plex.punishment.PunishmentType; import dev.plex.util.MojangUtils; import dev.plex.util.PlexUtils; +import java.time.format.DateTimeFormatter; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.event.EventHandler; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; -import java.time.format.DateTimeFormatter; - public class BanListener extends PlexListener { private final String banUrl = plugin.config.getString("banning.ban_url"); diff --git a/src/main/java/dev/plex/listener/impl/PlayerListener.java b/src/main/java/dev/plex/listener/impl/PlayerListener.java index 3b58f3a..935ecdc 100644 --- a/src/main/java/dev/plex/listener/impl/PlayerListener.java +++ b/src/main/java/dev/plex/listener/impl/PlayerListener.java @@ -8,6 +8,8 @@ import dev.plex.listener.PlexListener; import dev.plex.player.PlexPlayer; import dev.plex.player.PunishedPlayer; import dev.plex.util.PlexLog; +import java.util.Collections; +import java.util.UUID; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; @@ -18,9 +20,6 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import java.util.Collections; -import java.util.UUID; - public class PlayerListener extends PlexListener { private final MongoPlayerData mongoPlayerData = plugin.getMongoPlayerData() != null ? plugin.getMongoPlayerData() : null; @@ -38,7 +37,8 @@ public class PlayerListener extends PlexListener { player.setOp(true); PlexLog.debug("Automatically opped " + player.getName() + " since ranks are enabled."); - } else if (plugin.getSystem().equalsIgnoreCase("permissions")) + } + else if (plugin.getSystem().equalsIgnoreCase("permissions")) { player.setOp(false); PlexLog.debug("Automatically deopped " + player.getName() + " since ranks are disabled."); @@ -51,7 +51,8 @@ public class PlayerListener extends PlexListener plexPlayer.setName(player.getName()); //set the name of the player plexPlayer.setIps(Collections.singletonList(player.getAddress().getAddress().getHostAddress().trim())); //set the arraylist of ips DataUtils.insert(plexPlayer); // insert data in some wack db - } else + } + else { plexPlayer = DataUtils.getPlayer(player.getUniqueId()); } @@ -62,7 +63,8 @@ public class PlayerListener extends PlexListener { punishedPlayer = new PunishedPlayer(player.getUniqueId()); PlayerCache.getPunishedPlayerMap().put(player.getUniqueId(), punishedPlayer); - } else + } + else { punishedPlayer = PlayerCache.getPunishedPlayer(player.getUniqueId()); } @@ -76,8 +78,8 @@ public class PlayerListener extends PlexListener { event.joinMessage( Component.text(ChatColor.AQUA + player.getName() + " is ").color(NamedTextColor.AQUA).append(LegacyComponentSerializer.legacyAmpersand().deserialize(loginMessage)) - .append(Component.newline()) - .append(Component.text(player.getName() + " joined the game").color(NamedTextColor.YELLOW)) + .append(Component.newline()) + .append(Component.text(player.getName() + " joined the game").color(NamedTextColor.YELLOW)) ); } } @@ -96,7 +98,8 @@ public class PlayerListener extends PlexListener if (mongoPlayerData != null) //back to mongo checking { mongoPlayerData.update(plexPlayer); //update the player's document - } else if (sqlPlayerData != null) //sql checking + } + else if (sqlPlayerData != null) //sql checking { sqlPlayerData.update(plexPlayer); } diff --git a/src/main/java/dev/plex/listener/impl/ServerListener.java b/src/main/java/dev/plex/listener/impl/ServerListener.java index e3a633c..584d6d1 100644 --- a/src/main/java/dev/plex/listener/impl/ServerListener.java +++ b/src/main/java/dev/plex/listener/impl/ServerListener.java @@ -3,13 +3,12 @@ package dev.plex.listener.impl; import com.destroystokyo.paper.event.server.PaperServerListPingEvent; import dev.plex.listener.PlexListener; import dev.plex.util.PlexUtils; +import java.util.List; +import java.util.stream.Collectors; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; -import java.util.List; -import java.util.stream.Collectors; - public class ServerListener extends PlexListener { @EventHandler @@ -27,7 +26,8 @@ public class ServerListener extends PlexListener motd.append(PlexUtils.randomChatColor()).append(word).append(" "); } event.motd(LegacyComponentSerializer.legacyAmpersand().deserialize(motd.toString().trim())); - } else + } + else { event.motd(LegacyComponentSerializer.legacyAmpersand().deserialize(baseMotd.trim())); } diff --git a/src/main/java/dev/plex/listener/impl/WorldListener.java b/src/main/java/dev/plex/listener/impl/WorldListener.java index 5b02573..3b032d5 100644 --- a/src/main/java/dev/plex/listener/impl/WorldListener.java +++ b/src/main/java/dev/plex/listener/impl/WorldListener.java @@ -8,6 +8,9 @@ import dev.plex.rank.enums.Rank; import dev.plex.rank.enums.Title; import dev.plex.util.PlexLog; import dev.plex.util.PlexUtils; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.World; import org.bukkit.entity.EntityType; @@ -18,10 +21,6 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntitySpawnEvent; import org.jetbrains.annotations.NotNull; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - public class WorldListener extends PlexListener { @@ -34,15 +33,27 @@ public class WorldListener extends PlexListener if (plugin.getSystem().equalsIgnoreCase("permissions")) { String permission = plugin.config.getString("worlds." + world.getName().toLowerCase() + ".permission"); - if (permission == null) return; - if (player.hasPermission(permission)) return; - } else if (plugin.getSystem().equalsIgnoreCase("ranks")) + if (permission == null) + { + return; + } + if (player.hasPermission(permission)) + { + return; + } + } + else if (plugin.getSystem().equalsIgnoreCase("ranks")) { if (plugin.config.contains("worlds." + world.getName().toLowerCase() + ".requiredLevels")) { @NotNull List requiredLevel = plugin.config.getStringList("worlds." + world.getName().toLowerCase() + ".requiredLevels"); - if (checkLevel(plexPlayer, requiredLevel.toArray(String[]::new))) return; - } else { + if (checkLevel(plexPlayer, requiredLevel.toArray(String[]::new))) + { + return; + } + } + else + { return; } } @@ -64,15 +75,27 @@ public class WorldListener extends PlexListener if (plugin.getSystem().equalsIgnoreCase("permissions")) { String permission = plugin.config.getString("worlds." + world.getName().toLowerCase() + ".permission"); - if (permission == null) return; - if (player.hasPermission(permission)) return; - } else if (plugin.getSystem().equalsIgnoreCase("ranks")) + if (permission == null) + { + return; + } + if (player.hasPermission(permission)) + { + return; + } + } + else if (plugin.getSystem().equalsIgnoreCase("ranks")) { if (plugin.config.contains("worlds." + world.getName().toLowerCase() + ".requiredLevels")) { @NotNull List requiredLevel = plugin.config.getStringList("worlds." + world.getName().toLowerCase() + ".requiredLevels"); - if (checkLevel(plexPlayer, requiredLevel.toArray(String[]::new))) return; - } else { + if (checkLevel(plexPlayer, requiredLevel.toArray(String[]::new))) + { + return; + } + } + else + { return; } } @@ -121,7 +144,8 @@ public class WorldListener extends PlexListener return false; } } - } else if (required.startsWith("Rank")) + } + else if (required.startsWith("Rank")) { String rankString = required.split("\\.")[1]; Rank rank = Rank.valueOf(rankString.toUpperCase(Locale.ROOT)); diff --git a/src/main/java/dev/plex/player/PunishedPlayer.java b/src/main/java/dev/plex/player/PunishedPlayer.java index 7b6b001..c813da8 100644 --- a/src/main/java/dev/plex/player/PunishedPlayer.java +++ b/src/main/java/dev/plex/player/PunishedPlayer.java @@ -8,16 +8,6 @@ import dev.plex.event.PunishedPlayerFreezeEvent; import dev.plex.event.PunishedPlayerMuteEvent; import dev.plex.punishment.Punishment; import dev.plex.util.PlexLog; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.SneakyThrows; -import org.apache.commons.io.FileUtils; -import org.bukkit.Bukkit; -import org.json.JSONArray; -import org.json.JSONObject; -import org.json.JSONTokener; - import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -27,6 +17,15 @@ import java.util.List; import java.util.Map; import java.util.UUID; import java.util.stream.Collectors; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; +import lombok.SneakyThrows; +import org.apache.commons.io.FileUtils; +import org.bukkit.Bukkit; +import org.json.JSONArray; +import org.json.JSONObject; +import org.json.JSONTokener; @Getter public class PunishedPlayer extends PlexBase @@ -79,7 +78,8 @@ public class PunishedPlayer extends PlexBase try { file.createNewFile(); - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } @@ -91,7 +91,10 @@ public class PunishedPlayer extends PlexBase @SneakyThrows public void convertPunishments() { - if (!plugin.getRedisConnection().isEnabled()) return; + if (!plugin.getRedisConnection().isEnabled()) + { + return; + } List punishments = Lists.newArrayList(); File file = getPunishmentsFile(); @@ -121,7 +124,8 @@ public class PunishedPlayer extends PlexBase plugin.getRedisConnection().getJedis().set(uuid, obj.toString()); PlexLog.debug("Updated Redis Punishments to match with file"); } - } else + } + else { plugin.getRedisConnection().getJedis().set(uuid, obj.toString()); } @@ -137,9 +141,15 @@ public class PunishedPlayer extends PlexBase if (plugin.getRedisConnection().isEnabled()) { PlexLog.debug("Getting punishments from Redis..."); - if (!plugin.getRedisConnection().getJedis().exists(uuid)) return punishments; + if (!plugin.getRedisConnection().getJedis().exists(uuid)) + { + return punishments; + } String strObj = plugin.getRedisConnection().getJedis().get(uuid); - if (strObj.isEmpty() || !strObj.startsWith("{")) return punishments; + if (strObj.isEmpty() || !strObj.startsWith("{")) + { + return punishments; + } JSONObject object = new JSONObject(strObj); object.getJSONObject(uuid).getJSONArray("punishments").forEach(obj -> { @@ -169,7 +179,8 @@ public class PunishedPlayer extends PlexBase Punishment punishment = Punishment.fromJson(obj.toString()); punishments.add(punishment); }); - } catch (FileNotFoundException e) + } + catch (FileNotFoundException e) { e.printStackTrace(); } @@ -182,7 +193,8 @@ public class PunishedPlayer extends PlexBase try { return !FileUtils.readFileToString(file, StandardCharsets.UTF_8).trim().isEmpty(); - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/dev/plex/punishment/PunishmentManager.java b/src/main/java/dev/plex/punishment/PunishmentManager.java index f0580b9..3881523 100644 --- a/src/main/java/dev/plex/punishment/PunishmentManager.java +++ b/src/main/java/dev/plex/punishment/PunishmentManager.java @@ -8,13 +8,6 @@ import dev.plex.cache.PlayerCache; import dev.plex.player.PunishedPlayer; import dev.plex.util.PlexLog; import dev.plex.util.PlexUtils; -import org.apache.commons.io.FileUtils; -import org.bukkit.Bukkit; -import org.bukkit.scheduler.BukkitRunnable; -import org.json.JSONObject; -import org.json.JSONTokener; -import redis.clients.jedis.Jedis; - import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; @@ -26,6 +19,12 @@ import java.util.List; import java.util.Map; import java.util.UUID; import java.util.stream.Collectors; +import org.apache.commons.io.FileUtils; +import org.bukkit.Bukkit; +import org.bukkit.scheduler.BukkitRunnable; +import org.json.JSONObject; +import org.json.JSONTokener; +import redis.clients.jedis.Jedis; public class PunishmentManager extends PlexBase { @@ -51,7 +50,8 @@ public class PunishmentManager extends PlexBase writer.append(object.toString(8)); writer.flush(); writer.close(); - } else + } + else { JSONObject object = new JSONObject(); Map> punishments = Maps.newHashMap(); @@ -73,7 +73,8 @@ public class PunishmentManager extends PlexBase writer.flush(); writer.close(); } - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } @@ -84,7 +85,8 @@ public class PunishmentManager extends PlexBase try { return !FileUtils.readFileToString(file, StandardCharsets.UTF_8).trim().isEmpty(); - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } @@ -120,7 +122,8 @@ public class PunishmentManager extends PlexBase punishments.add(punishment); } }); - } catch (IllegalArgumentException e) + } + catch (IllegalArgumentException e) { } @@ -161,7 +164,8 @@ public class PunishmentManager extends PlexBase if (PlayerCache.getPunishedPlayerMap().containsKey(uuid)) { player = PlayerCache.getPunishedPlayer(uuid); - } else + } + else { player = new PunishedPlayer(uuid); } @@ -188,7 +192,8 @@ public class PunishmentManager extends PlexBase writer.append(object.toString()); writer.flush(); writer.close(); - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } @@ -224,7 +229,8 @@ public class PunishmentManager extends PlexBase Bukkit.getLogger().info("Unfroze"); } }.runTaskLater(Plex.get(), 20 * seconds); - } else if (punishment.getType() == PunishmentType.MUTE) + } + else if (punishment.getType() == PunishmentType.MUTE) { player.setMuted(true); LocalDateTime now = LocalDateTime.now(); diff --git a/src/main/java/dev/plex/rank/RankManager.java b/src/main/java/dev/plex/rank/RankManager.java index 944dd0d..9b7745c 100644 --- a/src/main/java/dev/plex/rank/RankManager.java +++ b/src/main/java/dev/plex/rank/RankManager.java @@ -5,17 +5,16 @@ import dev.plex.player.PlexPlayer; import dev.plex.rank.enums.Rank; import dev.plex.rank.enums.Title; import dev.plex.util.PlexUtils; -import lombok.SneakyThrows; -import org.json.JSONArray; -import org.json.JSONObject; -import org.json.JSONTokener; - import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; import java.util.stream.Collectors; +import lombok.SneakyThrows; +import org.json.JSONArray; +import org.json.JSONObject; +import org.json.JSONTokener; public class RankManager { @@ -82,7 +81,8 @@ public class RankManager Title.valueOf(key).setLoginMessage(title.getJSONObject(key).getString("loginMessage")); Title.valueOf(key).setPrefix(title.getJSONObject(key).getString("prefix")); }); - } catch (IOException e) + } + catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/dev/plex/rank/enums/Rank.java b/src/main/java/dev/plex/rank/enums/Rank.java index 85cf285..6edab2a 100644 --- a/src/main/java/dev/plex/rank/enums/Rank.java +++ b/src/main/java/dev/plex/rank/enums/Rank.java @@ -1,11 +1,5 @@ package dev.plex.rank.enums; -import com.google.common.collect.Lists; - -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; import lombok.Getter; import lombok.Setter; import org.bukkit.ChatColor; diff --git a/src/main/java/dev/plex/services/impl/BanService.java b/src/main/java/dev/plex/services/impl/BanService.java index b23ca41..3b76753 100644 --- a/src/main/java/dev/plex/services/impl/BanService.java +++ b/src/main/java/dev/plex/services/impl/BanService.java @@ -4,7 +4,6 @@ import dev.plex.Plex; import dev.plex.punishment.Punishment; import dev.plex.services.AbstractService; import java.time.LocalDateTime; - import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; diff --git a/src/main/java/dev/plex/util/MojangUtils.java b/src/main/java/dev/plex/util/MojangUtils.java index af3be41..0932eb9 100644 --- a/src/main/java/dev/plex/util/MojangUtils.java +++ b/src/main/java/dev/plex/util/MojangUtils.java @@ -2,13 +2,6 @@ package dev.plex.util; import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializer; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.json.JSONObject; - import java.io.IOException; import java.nio.charset.StandardCharsets; import java.time.Instant; @@ -16,6 +9,12 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Arrays; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.json.JSONObject; public class MojangUtils { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 1dd4700..418d8c5 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -9,7 +9,7 @@ server: - "&cForums: https://forum.plex.us.org" titles: - masterbuilders: [] + masterbuilders: [ ] owners: - Telesphoreo