diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java index 242cb2e09..caad13de8 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java @@ -166,7 +166,7 @@ public static AnarchyExploitFixes getInstance() { return instance; } - public static TickReporter getTickReporter() { + public static TickReporter tickReporter() { return tickReporter; } @@ -174,11 +174,11 @@ public static Config config() { return config; } - public static ComponentLogger getPrefixedLogger() { + public static ComponentLogger prefixedLogger() { return prefixedLogger; } - public static ComponentLogger getUnprefixedLogger() { + public static ComponentLogger unprefixedLogger() { return unPrefixedLogger; } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/commands/aef/subcommands/LagSubCmd.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/commands/aef/subcommands/LagSubCmd.java index da2fdaa72..992f68712 100644 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/commands/aef/subcommands/LagSubCmd.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/commands/aef/subcommands/LagSubCmd.java @@ -60,7 +60,7 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab } catch (InterruptedException e) { sender.sendMessage(Component.text(" Operation was interrupted! - " + e.getLocalizedMessage()).color(NamedTextColor.RED)); player.sendMessage(Component.empty()); - AnarchyExploitFixes.getPrefixedLogger().error("Lag command encountered an error!", e); + AnarchyExploitFixes.prefixedLogger().error("Lag command encountered an error!", e); } }, null, 1L); } else { @@ -72,7 +72,7 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab sender.sendMessage(Component.empty()); } catch (InterruptedException e) { sender.sendMessage(Component.text(" Operation was interrupted! - " + e.getLocalizedMessage()).color(NamedTextColor.RED)); - AnarchyExploitFixes.getPrefixedLogger().error("Lag command encountered an error!", e); + AnarchyExploitFixes.prefixedLogger().error("Lag command encountered an error!", e); } }); } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/Config.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/Config.java index f67636870..bea0181e2 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/Config.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/Config.java @@ -90,7 +90,7 @@ The time in ticks (1 sec = 20 ticks) a checked tps will be cached\s try { parsedSound = Sound.valueOf(configuredSound); } catch (IllegalArgumentException e) { - AnarchyExploitFixes.getPrefixedLogger().warn(" Sound '{}' does not exist. Using default.", configuredSound); + AnarchyExploitFixes.prefixedLogger().warn(" Sound '{}' does not exist. Using default.", configuredSound); parsedSound = Sound.ENTITY_EXPERIENCE_ORB_PICKUP; } this.elytra_too_fast_sound = parsedSound; @@ -115,7 +115,7 @@ public void saveConfig() { try { config.save(); } catch (Exception e) { - AnarchyExploitFixes.getPrefixedLogger().error("Failed to save config file!", e); + AnarchyExploitFixes.prefixedLogger().error("Failed to save config file!", e); } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/LanguageCache.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/LanguageCache.java index 8d1cec9f5..34b9f6b51 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/LanguageCache.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/config/LanguageCache.java @@ -35,7 +35,7 @@ public LanguageCache(String langString) throws Exception { // Check if the lang folder has already been created File parent = langYML.getParentFile(); if (!parent.exists() && !parent.mkdir()) - AnarchyExploitFixes.getPrefixedLogger().error("Unable to create lang directory."); + AnarchyExploitFixes.prefixedLogger().error("Unable to create lang directory."); // Check if the file already exists and save the one from the plugin's resources folder if it does not if (!langYML.exists()) plugin.saveResource("lang/" + langString + ".yml", false); @@ -171,7 +171,7 @@ public LanguageCache(String langString) throws Exception { try { this.lang.save(); } catch (Exception e) { - AnarchyExploitFixes.getPrefixedLogger().error("Failed to save language file: {}!", langYML.getName(), e); + AnarchyExploitFixes.prefixedLogger().error("Failed to save language file: {}!", langYML.getName(), e); } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/AEFModule.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/AEFModule.java index 6540f93b5..0df5bc3b8 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/AEFModule.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/AEFModule.java @@ -72,25 +72,25 @@ public static void reloadModules() { ENABLED_MODULES.add(module); } } catch (Throwable t) { // We want to catch everything here if it fails to init - AnarchyExploitFixes.getPrefixedLogger().warn("Failed initialising module class '{}'.", moduleClass.getSimpleName(), t); + AnarchyExploitFixes.prefixedLogger().warn("Failed initialising module class '{}'.", moduleClass.getSimpleName(), t); } } } protected void error(String message, Throwable throwable) { - AnarchyExploitFixes.getPrefixedLogger().error(logFormat, message, throwable); + AnarchyExploitFixes.prefixedLogger().error(logFormat, message, throwable); } protected void error(String message) { - AnarchyExploitFixes.getPrefixedLogger().error(logFormat, message); + AnarchyExploitFixes.prefixedLogger().error(logFormat, message); } protected void warn(String message) { - AnarchyExploitFixes.getPrefixedLogger().warn(logFormat, message); + AnarchyExploitFixes.prefixedLogger().warn(logFormat, message); } protected void info(String message) { - AnarchyExploitFixes.getPrefixedLogger().info(logFormat, message); + AnarchyExploitFixes.prefixedLogger().info(logFormat, message); } protected void notRecognized(Class clazz, String unrecognized) { diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java index d370a59f5..fe63f28f6 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java @@ -55,7 +55,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NETHER) return; if (exemptedWorlds.contains(world.getName())) return; - if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), config.nether_ceiling_max_y); } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java index c8bf3e375..4d01d1fc2 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java @@ -55,7 +55,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NETHER) return; if (exemptedWorlds.contains(world.getName())) return; - if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), world.getMinHeight()); } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java index f2f24104d..4510c0a82 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java @@ -55,7 +55,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NETHER) return; if (exemptedWorlds.contains(world.getName())) return; - if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), world.getMinHeight()); } } diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java index 86417b311..765c3c8cc 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java @@ -50,7 +50,7 @@ public void disable() { @Override public void accept(ScheduledTask task) { - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getGlobalTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getGlobalTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() != World.Environment.NETHER) continue; @@ -61,7 +61,7 @@ public void accept(ScheduledTask task) { plugin.getServer().getRegionScheduler().execute(plugin, world, chunk.getX(), chunk.getZ(), () -> { if (!chunk.isEntitiesLoaded()) return; - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; ChunkUtil.createBedrockLayer(chunk, config.nether_ceiling_max_y); }); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java index 77908a5ed..0c40895e9 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java @@ -50,7 +50,7 @@ public void disable() { @Override public void accept(ScheduledTask task) { - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getGlobalTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getGlobalTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() != World.Environment.NETHER) continue; @@ -61,7 +61,7 @@ public void accept(ScheduledTask task) { plugin.getServer().getRegionScheduler().execute(plugin, world, chunk.getX(), chunk.getZ(), () -> { if (!chunk.isEntitiesLoaded()) return; - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; ChunkUtil.createBedrockLayer(chunk, world.getMinHeight()); }); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java index dd098745e..57f82b9f0 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java @@ -51,7 +51,7 @@ public void disable() { @Override public void accept(ScheduledTask task) { - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getGlobalTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getGlobalTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() != World.Environment.NORMAL) continue; @@ -62,7 +62,7 @@ public void accept(ScheduledTask task) { plugin.getServer().getRegionScheduler().execute(plugin, world, chunk.getX(), chunk.getZ(), () -> { if (!chunk.isEntitiesLoaded()) return; - if (pauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (pauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; ChunkUtil.createBedrockLayer(chunk, world.getMinHeight()); }); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java index 2df18da9c..88398b527 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java @@ -77,7 +77,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (spawn_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= spawn_DenyElytraTPS) { + if (spawn_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= spawn_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java index ca6462d70..678ca16a3 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java @@ -84,7 +84,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (global_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= global_DenyElytraTPS) { + if (global_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= global_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); @@ -112,7 +112,7 @@ private void onPlayerMove(PlayerMoveEvent event) { if (ElytraHelper.getInstance().isInNewChunks(player)) { // Speed New Chunks - if (global_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= global_BurstNewChunk_TPS) { + if (global_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= global_BurstNewChunk_TPS) { // Burst Speed New Chunks if (flySpeed > global_BurstSpeedNewChunks) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); @@ -195,7 +195,7 @@ private void onPlayerMove(PlayerMoveEvent event) { } } else { // Speed Old Chunks - if (global_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= global_BurstOldChunk_TPS) { + if (global_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= global_BurstOldChunk_TPS) { // Burst Speed Old Chunks if (flySpeed > global_BurstSpeedOldChunks) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java index 47fc53999..ecc8aea22 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java @@ -81,7 +81,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (ceiling_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= ceiling_DenyElytraTPS) { + if (ceiling_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= ceiling_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); @@ -110,7 +110,7 @@ private void onPlayerMove(PlayerMoveEvent event) { if (ElytraHelper.getInstance().isInNewChunks(player)) { // Speed New Chunks - if (ceiling_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= ceiling_BurstNewChunk_TPS) { + if (ceiling_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= ceiling_BurstNewChunk_TPS) { // Burst Speed New Chunks if (flySpeed > ceiling_BurstSpeedNewChunks) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); @@ -193,7 +193,7 @@ private void onPlayerMove(PlayerMoveEvent event) { } } else { // Speed Old Chunks - if (ceiling_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= ceiling_BurstOldChunk_TPS) { + if (ceiling_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= ceiling_BurstOldChunk_TPS) { // Burst Speed Old Chunks if (flySpeed > ceiling_BurstSpeedOldChunks) { if (config.elytra_teleport_back) player.teleportAsync(ElytraHelper.getInstance().getSetbackLocation(event)); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java index d55651620..6a8cfce82 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java @@ -80,7 +80,7 @@ public void accept(ScheduledTask task) { if (ChunkUtil.isRetrievalUnsafe(chunk)) continue; plugin.getServer().getRegionScheduler().execute(plugin, world, chunk.getX(), chunk.getZ(), () -> { - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; if (!chunk.isEntitiesLoaded()) return; for (int x = 0; x < 16; x++) { diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java index a3308caa9..2c2065517 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java @@ -72,7 +72,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (event.isNewChunk()) return; if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return; if (exemptedWorlds.contains(event.getWorld().getName())) return; - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; final int minY = event.getWorld().getMinHeight(); final int maxY = event.getWorld().getMaxHeight(); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java index 6bca6d685..f24c3a66b 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java @@ -88,7 +88,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (event.isNewChunk()) return; if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return; if (!naturalSpawners.containsKey(event.getWorld().getName())) return; - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; final int minY = event.getWorld().getMinHeight(); final int maxY = event.getWorld().getMaxHeight(); diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java index cca7ae78d..027b34166 100644 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java @@ -71,8 +71,8 @@ public void disable() { } public boolean shouldCancelActivity(Event event, Location location, int limit) { - double tps = AnarchyExploitFixes.getTickReporter().getTPS(); - double mspt = AnarchyExploitFixes.getTickReporter().getMSPT(); + double tps = AnarchyExploitFixes.tickReporter().getTPS(); + double mspt = AnarchyExploitFixes.tickReporter().getMSPT(); if (tps <= pauseTPS || mspt >= pauseMSPT) { if (logIsEnabled) info("Cancelling " + event.getClass().getSimpleName() + " because server is lagging." + diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java index a951497ab..fc095addf 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java @@ -85,7 +85,7 @@ private void onPlayerJoin(PlayerJoinEvent event) { if (logFirstJoin) { for (Component line : AnarchyExploitFixes.getLang(joiningPlayer.locale()).misc_firstJoinMessage) { - AnarchyExploitFixes.getUnprefixedLogger().info(line + AnarchyExploitFixes.unprefixedLogger().info(line .replaceText(TextReplacementConfig.builder() .matchLiteral("%player%") .replacement(joiningPlayer.name()) diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java index 61878c07d..99b18af76 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java @@ -68,7 +68,7 @@ private void onPlayerJoinEvent(PlayerJoinEvent event) { } if (showInConsole) { - AnarchyExploitFixes.getUnprefixedLogger().info(AnarchyExploitFixes.getLang(joiningPlayer.locale()).misc_joinMessage + AnarchyExploitFixes.unprefixedLogger().info(AnarchyExploitFixes.getLang(joiningPlayer.locale()).misc_joinMessage .replaceText(TextReplacementConfig.builder().matchLiteral("%player%").replacement(joiningPlayer.name()).build()) .append(Component.text(" (" + joiningPlayer.locale() + ")"))); } @@ -96,7 +96,7 @@ private void onPlayerLeaveEvent(PlayerQuitEvent event) { } if (showInConsole) { - AnarchyExploitFixes.getUnprefixedLogger().info(AnarchyExploitFixes.getLang(leavingPlayer.locale()).misc_leaveMessage + AnarchyExploitFixes.unprefixedLogger().info(AnarchyExploitFixes.getLang(leavingPlayer.locale()).misc_leaveMessage .replaceText(TextReplacementConfig.builder().matchLiteral("%player%").replacement(leavingPlayer.name()).build()) .append(Component.text(" (" + leavingPlayer.locale() + ")"))); } diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java index 96db1b46c..76a4b53ee 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java @@ -183,11 +183,11 @@ public static Config config() { return config; } - public static Datastore getDatastore() { + public static Datastore datastore() { return datastore; } - public static TickReporter getTickReporter() { + public static TickReporter tickReporter() { return tickReporter; } diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/commands/ToggleConnectionMsgsCmd.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/commands/ToggleConnectionMsgsCmd.java index aa6220141..13eff8791 100644 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/commands/ToggleConnectionMsgsCmd.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/commands/ToggleConnectionMsgsCmd.java @@ -51,12 +51,12 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab final Player player = (Player) sender; - AnarchyExploitFixes.getDatastore().getJoinLeaveEnabled(player.getUniqueId()).thenAccept(enabled -> { + AnarchyExploitFixes.datastore().getJoinLeaveEnabled(player.getUniqueId()).thenAccept(enabled -> { if (enabled) { - AnarchyExploitFixes.getDatastore().setJoinLeaveEnabled(player.getUniqueId(), false) + AnarchyExploitFixes.datastore().setJoinLeaveEnabled(player.getUniqueId(), false) .thenRun(() -> sender.sendMessage(AnarchyExploitFixes.getLang(player.getLocale()).misc_disabledConnectionMsgs)); } else { - AnarchyExploitFixes.getDatastore().setJoinLeaveEnabled(player.getUniqueId(), true) + AnarchyExploitFixes.datastore().setJoinLeaveEnabled(player.getUniqueId(), true) .thenRun(() -> sender.sendMessage(AnarchyExploitFixes.getLang(player.getLocale()).misc_enabledConnectionMsgs)); } }); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java index 93fe3e96d..66fbdf716 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java @@ -56,7 +56,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NETHER) return; if (exemptedWorlds.contains(world.getName())) return; - if (!pauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!pauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), config.nether_ceiling_max_y); } } diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java index d25a01190..3fbc6625a 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java @@ -56,7 +56,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NETHER) return; if (exemptedWorlds.contains(world.getName())) return; - if (!pauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!pauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), WorldUtil.getMinWorldHeight(world)); } } diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java index eaaa88bb1..34376d693 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java @@ -56,7 +56,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (world.getEnvironment() != World.Environment.NORMAL) return; if (exemptedWorlds.contains(world.getName())) return; - if (!pauseOnLowTPS || AnarchyExploitFixes.getTickReporter().getTPS() >= pauseTPS) { + if (!pauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) { ChunkUtil.createBedrockLayer(event.getChunk(), WorldUtil.getMinWorldHeight(world)); } } diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java index 45021223b..3f96a9de6 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherCeiling.java @@ -48,7 +48,7 @@ public void disable() { @Override public void run() { - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() == World.Environment.NETHER) { diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java index 4e0ef5a34..84fbb534d 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillNetherFloor.java @@ -49,7 +49,7 @@ public void disable() { @Override public void run() { - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() == World.Environment.NETHER) { diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java index 8355ba681..5f9999960 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/bedrock/PeriodicallyFillOverworldFloor.java @@ -49,7 +49,7 @@ public void disable() { @Override public void run() { - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (world.getEnvironment() == World.Environment.NORMAL) { diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java index 3729b0dcc..ae9bab2f3 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraAtSpawn.java @@ -72,7 +72,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (spawn_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= spawn_DenyElytraTPS) { + if (spawn_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= spawn_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java index 1b357d97f..11217f3bd 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraGlobal.java @@ -78,7 +78,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (global_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= global_DenyElytraTPS) { + if (global_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= global_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); @@ -104,7 +104,7 @@ private void onPlayerMove(PlayerMoveEvent event) { if (ElytraHelper.getInstance().isInNewChunks(player)) { // Speed New Chunks - if (global_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= global_BurstNewChunk_TPS) { + if (global_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= global_BurstNewChunk_TPS) { // Burst Speed New Chunks if (flySpeed > global_BurstSpeedNewChunks) { // Too fast @@ -184,7 +184,7 @@ private void onPlayerMove(PlayerMoveEvent event) { } } else { // Speed Old Chunks - if (global_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= global_BurstOldChunk_TPS) { + if (global_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= global_BurstOldChunk_TPS) { // Burst Speed Old Chunks if (flySpeed > global_BurstSpeedOldChunks) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java index e91001dfc..0e7bb902b 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/elytra/ElytraOnCeiling.java @@ -78,7 +78,7 @@ private void onPlayerMove(PlayerMoveEvent event) { return; } - if (ceiling_DenyOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= ceiling_DenyElytraTPS) { + if (ceiling_DenyOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= ceiling_DenyElytraTPS) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); else event.setCancelled(true); @@ -105,7 +105,7 @@ private void onPlayerMove(PlayerMoveEvent event) { if (ElytraHelper.getInstance().isInNewChunks(player)) { // Speed New Chunks - if (ceiling_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= ceiling_BurstNewChunk_TPS) { + if (ceiling_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= ceiling_BurstNewChunk_TPS) { // Burst Speed New Chunks if (flySpeed > ceiling_BurstSpeedNewChunks) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); @@ -184,7 +184,7 @@ private void onPlayerMove(PlayerMoveEvent event) { } } else { // Speed Old Chunks - if (ceiling_EnableBursting && AnarchyExploitFixes.getTickReporter().getTPS() >= ceiling_BurstOldChunk_TPS) { + if (ceiling_EnableBursting && AnarchyExploitFixes.tickReporter().getTPS() >= ceiling_BurstOldChunk_TPS) { // Burst Speed Old Chunks if (flySpeed > ceiling_BurstSpeedOldChunks) { if (config.elytra_teleport_back) player.teleport(ElytraHelper.getInstance().getSetbackLocation(event)); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java index 0b7d16b75..6f71d7895 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/PeriodicallyRemoveIllegalBlocks.java @@ -80,7 +80,7 @@ public void disable() { @Override public void run() { - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; for (World world : plugin.getServer().getWorlds()) { if (exemptedWorlds.contains(world.getName())) continue; diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java index 0455d92d5..0c5f65f23 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveIllegalBlocksOnChunkload.java @@ -84,7 +84,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (event.isNewChunk()) return; if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return; if (exemptedWorlds.contains(event.getWorld().getName())) return; - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; final int minY = WorldUtil.getMinWorldHeight(event.getWorld()); final int maxY = event.getWorld().getMaxHeight(); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java index 5fc0093aa..e055717ac 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/illegals/placedblocks/RemoveUnnaturalSpawners.java @@ -89,7 +89,7 @@ private void onChunkLoad(ChunkLoadEvent event) { if (event.isNewChunk()) return; if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return; if (!naturalSpawners.containsKey(event.getWorld().getName())) return; - if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.getTickReporter().getTPS() <= pauseTPS) return; + if (checkShouldPauseOnLowTPS && AnarchyExploitFixes.tickReporter().getTPS() <= pauseTPS) return; final int minY = WorldUtil.getMinWorldHeight(event.getWorld()); final int maxY = event.getWorld().getMaxHeight(); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java index 35c48e74d..0667e6b91 100644 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/lagpreventions/regionalactivity/RegionalActivityModule.java @@ -72,8 +72,8 @@ public void disable() { } public boolean shouldCancelActivity(Event event, Location location, int limit) { - double tps = AnarchyExploitFixes.getTickReporter().getTPS(); - double mspt = AnarchyExploitFixes.getTickReporter().getMSPT(); + double tps = AnarchyExploitFixes.tickReporter().getTPS(); + double mspt = AnarchyExploitFixes.tickReporter().getMSPT(); if (tps <= pauseTPS || mspt >= pauseMSPT) { if (logIsEnabled) info("Cancelling " + event.getClass().getSimpleName() + " because server is lagging." + diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java index 4cbd07fe5..c0b4a1645 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/FirstJoinMessages.java @@ -56,7 +56,7 @@ private void onPlayerJoin(PlayerJoinEvent event) { final int playersNumber = totalPlayers.incrementAndGet(); for (final Player onlinePlayer : plugin.getServer().getOnlinePlayers()) { - AnarchyExploitFixes.getDatastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { + AnarchyExploitFixes.datastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { if (enabled) AnarchyExploitFixes.getLang(onlinePlayer.getLocale()).misc_firstJoinMessage. forEach(line -> onlinePlayer.sendMessage(line .replace("%player%", joiningPlayer.getName()) diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java index 4d92756ff..3a8a0c21d 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/modules/misc/JoinLeaveMessages.java @@ -48,7 +48,7 @@ private void onPlayerJoinEvent(PlayerJoinEvent event) { if (firstJoinEnabled && !joiningPlayer.hasPlayedBefore()) return; for (final Player onlinePlayer : plugin.getServer().getOnlinePlayers()) { - AnarchyExploitFixes.getDatastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { + AnarchyExploitFixes.datastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { if (enabled) { onlinePlayer.sendMessage(AnarchyExploitFixes.getLang(onlinePlayer.getLocale()).misc_joinMessage .replace("%player%", joiningPlayer.getName())); @@ -69,7 +69,7 @@ private void onPlayerLeaveEvent(PlayerQuitEvent event) { for (final Player onlinePlayer : plugin.getServer().getOnlinePlayers()) { if (onlinePlayer.getUniqueId().equals(leavingPlayer.getUniqueId())) continue; - AnarchyExploitFixes.getDatastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { + AnarchyExploitFixes.datastore().getJoinLeaveEnabled(onlinePlayer.getUniqueId()).thenAccept(enabled -> { if (enabled) { onlinePlayer.sendMessage(AnarchyExploitFixes.getLang(onlinePlayer.getLocale()).misc_leaveMessage .replace("%player%", leavingPlayer.getName()));