From 34a4030f80ced22d256e6e56da5dd2e6650a0f16 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 19 Jan 2021 01:17:28 +0100 Subject: [PATCH] Add PingCommand MultiLang --- src/de/steamwar/bungeecore/commands/PingCommand.java | 4 ++-- src/de/steamwar/messages/BungeeCore.properties | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/PingCommand.java b/src/de/steamwar/bungeecore/commands/PingCommand.java index 4975f76f..014a6df1 100644 --- a/src/de/steamwar/bungeecore/commands/PingCommand.java +++ b/src/de/steamwar/bungeecore/commands/PingCommand.java @@ -19,7 +19,7 @@ package de.steamwar.bungeecore.commands; -import de.steamwar.bungeecore.BungeeCore; +import de.steamwar.bungeecore.Message; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -33,7 +33,7 @@ public class PingCommand extends BasicCommand { public void execute(CommandSender sender, String[] args) { if(sender instanceof ProxiedPlayer){ ProxiedPlayer player = (ProxiedPlayer) sender; - player.sendMessage(BungeeCore.CHAT_PREFIX + "§7Dein Ping beträgt §c" + player.getPing() + "§r§7 ms!"); + Message.send("PING_RESPONSE", player, player.getPing()); } } } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 8354a3be..8355371b 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -234,4 +234,7 @@ MSG_OFFLINE=§cDieser Spieler ist derzeit nicht online! MSG_IGNORED=§cDieser Spieler hat dich geblockt! MSG_NOMESSAGE=§cDieser Spieler empfängt derzeit keine Chatnachrichten! MSG_SELF=§cNachrichten an dich selbst hast du wirklich nicht nötig! -MSG_FORMAT=§e{0}§8»§e{1} §r§7{2} \ No newline at end of file +MSG_FORMAT=§e{0}§8»§e{1} §r§7{2} + +#PingCommand +PING_RESPONSE=§7Dein Ping beträgt §c{0}§r§7 ms! \ No newline at end of file