Skip to content

Commit

Permalink
added missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
NonSwag committed Jun 28, 2024
1 parent ab13472 commit 24f6a5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ private void execute(CommandContext<CommandSourceStack> context) {
var player = context.<Player>optional("player").orElse(sender instanceof Player self ? self : null);
if (player == null) throw new InvalidSyntaxException("world teleport [world] [player]", sender, List.of());
player.teleportAsync(world.getSpawnLocation(), PlayerTeleportEvent.TeleportCause.COMMAND);
var message = player.equals(sender) ? "world.teleport.player.self" : "world.teleport.player.other";
var placeholder = Placeholder.parsed("world", world.getName());
if (!player.equals(sender)) plugin.bundle().sendMessage(sender, "world.teleport.player.other", placeholder);
plugin.bundle().sendMessage(player, "world.teleport.player.self", placeholder);
plugin.bundle().sendMessage(player, message, placeholder);
}
}
2 changes: 2 additions & 0 deletions plugin/src/main/resources/worlds.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ world.import.success=<prefix> <white>Successfully imported the world <green><wor
world.import.failed=<prefix> <red>Failed to import the world <dark_red><world>
world.list=<prefix> <gray>Worlds <dark_gray>(<green><amount><dark_gray>): <white><worlds>
world.list.hover=Click to teleport to <world>
world.teleport.player.self=<prefix> <white>You got teleported to <green><world>
world.teleport.player.other=<prefix> <white>Teleported <green><player> <white>to <green><world>
world.known=<prefix> <red>A world called <dark_red><world><red> does already exist
world.unknown=<prefix> <red>A world called <dark_red><world><red> does not exist
world.preset.invalid=<prefix> <red>The world preset is not a valid json string
Expand Down
2 changes: 2 additions & 0 deletions plugin/src/main/resources/worlds_german.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ world.import.success=<prefix> <white>Die Welt <green><world> <white>wurde erfolg
world.import.failed=<prefix> <red>Die Welt <dark_red><world> <red>konnte nicht importiert werden
world.list=<prefix> <gray>Welten <dark_gray>(<green><amount><dark_gray>): <white><worlds>
world.list.hover=Klicke um dich zu <world> zu teleportieren
world.teleport.player.self=<prefix> <white>Du wurdest zu <green><world> <white>teleportiert
world.teleport.player.other=<prefix> <white>Du hast <green><player> <white>zu <green><world> <white>teleportiert
world.known=<prefix> <red>Eine Welt mit dem namen <dark_red><world><red> existiert bereits
world.unknown=<prefix> <red>Eine Welt mit dem namen <dark_red><world><red> existiert nicht
world.preset.invalid=<prefix> <red>Die Welten Voreinstellung ist kein gültiger json Text
Expand Down

0 comments on commit 24f6a5c

Please sign in to comment.