mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-23 02:55:52 +01:00
Cleanup TODO messages
This commit is contained in:
parent
a7644b6866
commit
f7295e2c2e
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -35,17 +35,17 @@ public class ConfigCommand extends MultiverseCommand {
|
||||
@CommandPermission("multiverse.core.config")
|
||||
@CommandCompletion("@mvconfigs")
|
||||
@Syntax("<name> [new-value]")
|
||||
@Description("") //TODO
|
||||
@Description("") // TODO: Description
|
||||
public void onConfigCommand(MVCommandIssuer issuer,
|
||||
|
||||
@Syntax("<name>")
|
||||
@Description("") //TODO
|
||||
@Description("") // TODO: Description
|
||||
String name,
|
||||
|
||||
@Optional
|
||||
@Single
|
||||
@Syntax("[new-value]")
|
||||
@Description("") //TODO
|
||||
@Description("") // TODO: Description
|
||||
MVConfigValue value
|
||||
) {
|
||||
if (value == null) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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());
|
||||
|
@ -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("# █▀▄▀█ █░█ █░░ ▀█▀ █ █░█ █▀▀ █▀█ █▀ █▀▀ █▀▀ █▀█ █▀█ █▀▀ #")
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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()) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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())
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user