Skip to content

Commit

Permalink
Rename to /mv spawn tp in preparation for /mv spawn set
Browse files Browse the repository at this point in the history
  • Loading branch information
zax71 committed Feb 24, 2024
1 parent 39c533e commit 631ed29
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {

Check warning on line 51 in src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 'method def rparen' has incorrect indentation level 11, expected level should be 4. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java:51:12: warning: 'method def rparen' has incorrect indentation level 11, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

Check warning on line 51 in src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 ')' should be on the previous line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java:51:12: warning: ')' should be on the previous line. (SeparatorWrapEol)
// The player is in the world, so it must be loaded
Expand All @@ -58,9 +58,9 @@ void onSpawnCommand(
// 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();
}
Expand All @@ -69,13 +69,9 @@ void onSpawnCommand(
player.sendMessage(commandManager.formatMessage(
issuer,
MessageType.INFO,
MVCorei18n.SPAWN_MESSAGE,
MVCorei18n.SPAWN_TP_MESSAGE,
"{teleporter}",
teleporterName
));

Check warning on line 75 in src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 ')' should be on the previous line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java:75:9: warning: ')' should be on the previous line. (SeparatorWrapEol)


}


}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/multiverse-core_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Check warning on line 130 in src/main/resources/multiverse-core_en.properties

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Property key 'mv-core.spawn.tp.message' is not in the right order with previous property 'mv-core.spawn.tp.player.description'. Raw Output: /github/workspace/./src/main/resources/multiverse-core_en.properties:130:0: warning: Property key 'mv-core.spawn.tp.message' is not in the right order with previous property 'mv-core.spawn.tp.player.description'. (com.puppycrawl.tools.checkstyle.checks.OrderedPropertiesCheck)
mv-core.spawn.tp.consolename=The console

Check warning on line 131 in src/main/resources/multiverse-core_en.properties

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Property key 'mv-core.spawn.tp.consolename' is not in the right order with previous property 'mv-core.spawn.tp.message'. Raw Output: /github/workspace/./src/main/resources/multiverse-core_en.properties:131:0: warning: Property key 'mv-core.spawn.tp.consolename' is not in the right order with previous property 'mv-core.spawn.tp.message'. (com.puppycrawl.tools.checkstyle.checks.OrderedPropertiesCheck)
mv-core.spawn.tp.you=You

# /mv tp
mv-core.teleport.description=Allows you to teleport to a location on your server!
Expand Down

0 comments on commit 631ed29

Please sign in to comment.