Rename to `/mv spawn tp` in preparation for `/mv spawn set`

This commit is contained in:
Zax71 2024-02-24 18:10:30 +00:00
parent 39c533e808
commit 631ed2973a
3 changed files with 19 additions and 23 deletions

View File

@ -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
));
}
}

View File

@ -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,

View File

@ -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!