From 631ed2973a2fa330cbac5ce3bc4fb79f87499618 Mon Sep 17 00:00:00 2001 From: Zax71 Date: Sat, 24 Feb 2024 18:10:30 +0000 Subject: [PATCH] Rename to `/mv spawn tp` in preparation for `/mv spawn set` --- .../multiverse/core/commands/SpawnCommand.java | 18 +++++++----------- .../multiverse/core/utils/MVCorei18n.java | 12 ++++++------ .../resources/multiverse-core_en.properties | 12 ++++++------ 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java b/src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java index b65bcab8..97467546 100644 --- a/src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java +++ b/src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java @@ -36,17 +36,17 @@ class SpawnCommand extends MultiverseCommand { this.safetyTeleporter = safetyTeleporter; } - @Subcommand("spawn") + @Subcommand("spawn tp") @CommandPermission("multiverse.core.spawn") @CommandCompletion("@players") @Syntax("[player]") - @Description("{@@mv-core.spawn.description}") - void onSpawnCommand( + @Description("{@@mv-core.spawn.tp.description}") + void onSpawnTpCommand( BukkitCommandIssuer issuer, @Flags("resolve=issuerAware") @Syntax("[player]") - @Description("{@@mv-core.spawn.player.description}") + @Description("{@@mv-core.spawn.tp.player.description}") Player player ) { // The player is in the world, so it must be loaded @@ -58,9 +58,9 @@ class SpawnCommand extends MultiverseCommand { // Make the conformation message make sense String teleporterName; if (issuer.getIssuer().getName().equals("CONSOLE")) { - teleporterName = commandManager.formatMessage(issuer, MessageType.INFO, MVCorei18n.SPAWN_CONSOLENAME); + teleporterName = commandManager.formatMessage(issuer, MessageType.INFO, MVCorei18n.SPAWN_TP_CONSOLENAME); } else if (issuer.getIssuer().getName().equals(player.getName())) { - teleporterName = commandManager.formatMessage(issuer, MessageType.INFO, MVCorei18n.SPAWN_YOU); + teleporterName = commandManager.formatMessage(issuer, MessageType.INFO, MVCorei18n.SPAWN_TP_YOU); } else { teleporterName = issuer.getIssuer().getName(); } @@ -69,13 +69,9 @@ class SpawnCommand extends MultiverseCommand { player.sendMessage(commandManager.formatMessage( issuer, MessageType.INFO, - MVCorei18n.SPAWN_MESSAGE, + MVCorei18n.SPAWN_TP_MESSAGE, "{teleporter}", teleporterName )); - - } - - } diff --git a/src/main/java/org/mvplugins/multiverse/core/utils/MVCorei18n.java b/src/main/java/org/mvplugins/multiverse/core/utils/MVCorei18n.java index 6bbdc692..e9f3c7bc 100644 --- a/src/main/java/org/mvplugins/multiverse/core/utils/MVCorei18n.java +++ b/src/main/java/org/mvplugins/multiverse/core/utils/MVCorei18n.java @@ -94,12 +94,12 @@ public enum MVCorei18n implements MessageKeyProvider { ROOT_TITLE, ROOT_HELP, - // spawn command - SPAWN_DESCRIPTION, - SPAWN_PLAYER_DESCRIPTION, - SPAWN_MESSAGE, - SPAWN_CONSOLENAME, - SPAWN_YOU, + // spawn tp command + SPAWN_TP_DESCRIPTION, + SPAWN_TP_PLAYER_DESCRIPTION, + SPAWN_TP_MESSAGE, + SPAWN_TP_CONSOLENAME, + SPAWN_TP_YOU, // teleport command TELEPORT_SUCCESS, diff --git a/src/main/resources/multiverse-core_en.properties b/src/main/resources/multiverse-core_en.properties index ea3b7b10..3bb00c6b 100644 --- a/src/main/resources/multiverse-core_en.properties +++ b/src/main/resources/multiverse-core_en.properties @@ -124,12 +124,12 @@ mv-core.remove.success=&aWorld '{world}' removed! mv-core.root.title=&a{name} version {version} mv-core.root.help=&aSee &f/mv help&a for commands available. -# /mv spawn -mv-core.spawn.description=Teleports the specified player to the spawn of the world they are in -mv-core.spawn.player.description=The player -mv-core.spawn.message={teleporter} just sent you to spawn! -mv-core.spawn.consolename=The console -mv-core.spawn.you=You +# /mv spawn tp +mv-core.spawn.tp.description=Teleports the specified player to the spawn of the world they are in +mv-core.spawn.tp.player.description=The player +mv-core.spawn.tp.message={teleporter} just sent you to spawn! +mv-core.spawn.tp.consolename=The console +mv-core.spawn.tp.you=You # /mv tp mv-core.teleport.description=Allows you to teleport to a location on your server!