From f7295e2c2e65d500f87b1eae334d775e791a5273 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:50:10 +0800 Subject: [PATCH] Cleanup TODO messages --- .../MultiverseCore/commands/CheckCommand.java | 2 +- .../MultiverseCore/commands/ConfigCommand.java | 6 +++--- .../MultiverseCore/commands/ListCommand.java | 3 +-- .../MultiverseCore/commands/ReloadCommand.java | 2 +- .../MultiverseCore/commands/TeleportCommand.java | 2 +- .../MultiverseCore/commands/UnloadCommand.java | 2 +- .../MultiverseCore/config/MVCoreConfigNodes.java | 3 ++- .../destination/DestinationsProvider.java | 4 ++-- .../MultiverseCore/economy/MVEconomist.java | 2 +- .../MultiverseCore/listeners/MVPlayerListener.java | 2 +- .../MultiverseCore/utils/MVPermissions.java | 2 +- .../MultiverseCore/world/SimpleMVWorldManager.java | 4 ++-- .../world/entrycheck/WorldEntryChecker.java | 2 +- .../MultiverseCore/worldnew/WorldManager.java | 14 +++++++------- .../worldnew/config/WorldConfig.java | 2 +- .../worldnew/config/WorldConfigNodes.java | 10 +++++----- .../worldnew/config/WorldsConfigFile.java | 2 +- .../multiverse/core/inject/InjectionTest.kt | 2 +- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CheckCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CheckCommand.java index 36cd5fa7..7853ed95 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CheckCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CheckCommand.java @@ -47,7 +47,7 @@ public class CheckCommand extends MultiverseCommand { issuer.sendInfo(MVCorei18n.CHECK_CHECKING, "{player}", player.getName(), "{destination}", destination.toString()); - //TODO More detailed output on permissions required. + // TODO: More detailed output on permissions required. this.destinationsProvider.checkTeleportPermissions(issuer, player, destination); } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ConfigCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ConfigCommand.java index d710a987..96608070 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ConfigCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ConfigCommand.java @@ -35,17 +35,17 @@ public class ConfigCommand extends MultiverseCommand { @CommandPermission("multiverse.core.config") @CommandCompletion("@mvconfigs") @Syntax(" [new-value]") - @Description("") //TODO + @Description("") // TODO: Description public void onConfigCommand(MVCommandIssuer issuer, @Syntax("") - @Description("") //TODO + @Description("") // TODO: Description String name, @Optional @Single @Syntax("[new-value]") - @Description("") //TODO + @Description("") // TODO: Description MVConfigValue value ) { if (value == null) { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java index cc595b6f..849080a4 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java @@ -92,8 +92,7 @@ public class ListCommand extends MultiverseCommand { .withSendHandler(PagedSendHandler.create() .withHeader("%s====[ Multiverse World List ]====", ChatColor.GOLD) .withTargetPage(parsedFlags.flagValue("--page", 1, Integer.class)) - .withFilter(parsedFlags.flagValue("--filter", DefaultContentFilter.get(), ContentFilter.class)) - .withLinesPerPage(4)) //TODO Change back after testing + .withFilter(parsedFlags.flagValue("--filter", DefaultContentFilter.get(), ContentFilter.class))) .send(issuer); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java index e75421f8..d21cac70 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java @@ -64,7 +64,7 @@ public class ReloadCommand extends MultiverseCommand { MVConfigReloadEvent configReload = new MVConfigReloadEvent(configsLoaded); this.pluginManager.callEvent(configReload); - // @TODO: replace this sendMessage and format the configsLoaded above, maybe? + // TODO: replace this sendMessage and format the configsLoaded above, maybe? configReload.getAllConfigsLoaded().forEach(issuer::sendMessage); issuer.sendInfo(MVCorei18n.RELOAD_SUCCESS); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java index 92116532..90981700 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java @@ -48,7 +48,7 @@ public class TeleportCommand extends MultiverseCommand { @Description("{@@mv-core.teleport.destination.description}") ParsedDestination destination ) { - // TODO Add warning if teleporting too many players at once. + // TODO: Add warning if teleporting too many players at once. String playerName = players.length == 1 ? issuer.getPlayer() == players[0] ? "you" : players[0].getName() diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/UnloadCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/UnloadCommand.java index defdfb50..ba4fd309 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/UnloadCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/UnloadCommand.java @@ -42,7 +42,7 @@ public class UnloadCommand extends MultiverseCommand { issuer.sendInfo(MVCorei18n.UNLOAD_UNLOADING, "{world}", world.getColoredWorldString()); - //TODO API: Should be able to use MVWorld object directly + // TODO: Should be able to use MVWorld object directly for unloadWorld if (!this.worldManager.unloadWorld(world.getName())) { issuer.sendError(MVCorei18n.UNLOAD_FAILURE, "{world}", world.getColoredWorldString()); diff --git a/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfigNodes.java b/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfigNodes.java index 36632653..9bdae949 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfigNodes.java +++ b/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfigNodes.java @@ -29,7 +29,8 @@ class MVCoreConfigNodes { return node; } - private final ConfigHeaderNode HEADER = node(ConfigHeaderNode.builder("world") // TODO hacky way to get the header to the top of the file + // TODO: hacky way to get the header to the top of the file + private final ConfigHeaderNode HEADER = node(ConfigHeaderNode.builder("world") .comment("####################################################################################################") .comment("# #") .comment("# █▀▄▀█ █░█ █░░ ▀█▀ █ █░█ █▀▀ █▀█ █▀ █▀▀   █▀▀ █▀█ █▀█ █▀▀ #") diff --git a/src/main/java/com/onarandombox/MultiverseCore/destination/DestinationsProvider.java b/src/main/java/com/onarandombox/MultiverseCore/destination/DestinationsProvider.java index 416d2300..af6a7ea1 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/destination/DestinationsProvider.java +++ b/src/main/java/com/onarandombox/MultiverseCore/destination/DestinationsProvider.java @@ -167,7 +167,7 @@ public class DestinationsProvider { * @return True if the teleporter has permission, false otherwise. */ public boolean checkTeleportPermissions(CommandIssuer teleporter, Entity teleportee, ParsedDestination destination) { - //TODO Move permission checking to a separate class + // TODO: Move permission checking to a separate class String permission = PERMISSION_PREFIX + (teleportee.equals(teleporter.getIssuer()) ? "self" : "other") + "." + destination.getDestination().getIdentifier(); @@ -176,7 +176,7 @@ public class DestinationsProvider { return false; } - //TODO Config whether to use finer permission + // TODO: Config whether to use finer permission String finerPermissionSuffix = destination.getDestinationInstance().getFinerPermissionSuffix(); if (finerPermissionSuffix == null || finerPermissionSuffix.isEmpty()) { return true; diff --git a/src/main/java/com/onarandombox/MultiverseCore/economy/MVEconomist.java b/src/main/java/com/onarandombox/MultiverseCore/economy/MVEconomist.java index 340afd8b..08d3ae81 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/economy/MVEconomist.java +++ b/src/main/java/com/onarandombox/MultiverseCore/economy/MVEconomist.java @@ -223,7 +223,7 @@ public class MVEconomist { * @return the old VaultHandler. * @deprecated just use the other methods in this class for economy stuff. */ - // TODO make private + // TODO: make private @Deprecated public VaultHandler getVaultHandler() { return vaultHandler; diff --git a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java index 4b84a2a7..5464e230 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java @@ -358,7 +358,7 @@ public class MVPlayerListener implements InjectableListener { Logging.finest("To World: %s", world); player.setGameMode(world.getGameMode()); // Check if their flight mode should change - // TODO need a override permission for this + // TODO: need a override permission for this if (player.getAllowFlight() && !world.getAllowFlight() && player.getGameMode() != GameMode.CREATIVE) { player.setAllowFlight(false); if (player.isFlying()) { diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java b/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java index 3189c470..93d33029 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/MVPermissions.java @@ -286,7 +286,7 @@ public class MVPermissions { * @param node The permission node to check (possibly already a parent). * @return True if they have any parent perm, false if none. */ - // TODO remove this...? + // TODO: remove this...? private boolean hasAnyParentPermission(CommandSender sender, String node) { String parentPerm = this.pullOneLevelOff(node); // Base case diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/SimpleMVWorldManager.java b/src/main/java/com/onarandombox/MultiverseCore/world/SimpleMVWorldManager.java index e1326184..024290cf 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/SimpleMVWorldManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/SimpleMVWorldManager.java @@ -826,7 +826,7 @@ public class SimpleMVWorldManager implements MVWorldManager { try { this.configWorlds.save(file); } catch (IOException e) { - // TODO Auto-generated catch block + // TODO: Auto-generated catch block e.printStackTrace(); } // load world-objects @@ -842,7 +842,7 @@ public class SimpleMVWorldManager implements MVWorldManager { WorldProperties props = (WorldProperties) obj; if (this.worldsFromTheConfig.containsKey(worldName)) { // Object-Recycling :D - // TODO Why is is checking worldsFromTheConfig and then getting from worlds? So confused... (DTM) + // TODO: Why is is checking worldsFromTheConfig and then getting from worlds? So confused... (DTM) SimpleMVWorld mvWorld = (SimpleMVWorld) this.worlds.get(worldName); if (mvWorld != null) { mvWorld.copyValues((WorldProperties) obj); diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/entrycheck/WorldEntryChecker.java b/src/main/java/com/onarandombox/MultiverseCore/world/entrycheck/WorldEntryChecker.java index 3cf0e879..a87056dd 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/entrycheck/WorldEntryChecker.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/entrycheck/WorldEntryChecker.java @@ -97,6 +97,6 @@ public class WorldEntryChecker { } return economist.isPlayerWealthyEnough(player, price, currency) ? Result.success(EntryFeeResult.Success.ENOUGH_MONEY) - : Result.failure(EntryFeeResult.Failure.NOT_ENOUGH_MONEY, replace("{amount}").with("$##")); //TODO + : Result.failure(EntryFeeResult.Failure.NOT_ENOUGH_MONEY, replace("{amount}").with("$##")); // TODO: Money formatting } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java index 4a0211b3..78479de0 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java @@ -30,37 +30,37 @@ public class WorldManager { public void addWorld(String worldName) { WorldConfig worldConfig = worldsConfigFile.getWorldConfig(worldName); - //todo + // TODO: Implement logic saveWorldsConfig(); } public void loadWorld(String worldName) { WorldConfig worldConfig = worldsConfigFile.getWorldConfig(worldName); - //todo + // TODO: Implement logic } public void unloadWorld() { - //todo + // TODO: Implement logic } public void removeWorld(String worldName) { - //todo + // TODO: Implement logic worldsConfigFile.deleteWorldConfigSection(worldName); saveWorldsConfig(); } public void deleteWorld(String worldName) { - //todo + // TODO: Implement logic worldsConfigFile.deleteWorldConfigSection(worldName); saveWorldsConfig(); } public void getMVWorld(String worldName) { - //todo + // TODO: Implement logic } public void getUnloadedWorld(String worldName) { - //todo + // TODO: Implement logic } public void saveWorldsConfig() { diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java index 22c502e4..c22246d8 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java @@ -19,7 +19,7 @@ public class WorldConfig { public WorldConfig(@NotNull final ConfigurationSection configSection) { this.configNodes = new WorldConfigNodes(); - //todo: Config migration and version + // TODO: Config migration and version this.configHandle = ConfigurationSectionHandle.builder(configSection) .logger(Logging.getLogger()) .nodes(configNodes.getNodes()) diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java index 6197d6b7..b2f857f9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java @@ -126,9 +126,9 @@ public class WorldConfigNodes { .name("world-blacklist") .build()); - //todo: Migrate color and style into alias - //todo: spawning - //todo: entryfee - //todo: spawnLocation - //todo: worldBlacklist + // TODO: Migrate color and style into alias + // TODO: spawning + // TODO: entryfee + // TODO: spawnLocation + // TODO: worldBlacklist } diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigFile.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigFile.java index 1c67c5a8..a47bd441 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigFile.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigFile.java @@ -24,7 +24,7 @@ public class WorldsConfigFile { } public void load() { - //todo: Migration from old worlds.yml + // TODO: Migration from old worlds.yml worldConfig = YamlConfiguration.loadConfiguration(worldConfigFile); } diff --git a/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt b/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt index 3f594651..bde52ae6 100644 --- a/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt @@ -134,7 +134,7 @@ class InjectionTest : TestWithMockBukkit() { @Test fun `Destinations are available as services`() { val destinations = multiverseCore.getAllServices(Destination::class.java) - // TODO come up with a better way to test this like via actually testing the effect of using each destination + // TODO: come up with a better way to test this like via actually testing the effect of using each destination assertEquals(6, destinations.size) }