Add RCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
33c45dd3f2
Commit
5098bf8282
@ -20,6 +20,7 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
@ -38,7 +39,7 @@ public class RCommand extends BasicCommand {
|
||||
if(sender instanceof ProxiedPlayer){
|
||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||
if(args.length == 0){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "/r [Antwort]");
|
||||
Message.send("R_SYNTAX", player);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -50,29 +51,27 @@ public class RCommand extends BasicCommand {
|
||||
|
||||
ProxiedPlayer target = lastChats.get(player);
|
||||
if(target == null){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast bisher mit niemandem geschrieben!");
|
||||
Message.send("R_NOTHING", player);
|
||||
return;
|
||||
}else if(!target.isConnected()){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!");
|
||||
Message.send("R_OFFLINE", player);
|
||||
lastChats.remove(player);
|
||||
return;
|
||||
}else if (IgnoreSystem.isIgnored(target, player)) {
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!");
|
||||
Message.send("R_BLOCKED", player);
|
||||
return;
|
||||
}else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler empfängt derzeit keine Chatnachrichten!");
|
||||
Message.send("R_NO_CHAT", player);
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder msgBuilder = new StringBuilder();
|
||||
msgBuilder.append("§e").append(player.getName()).append("§8»§e").append(target.getName()).append(" §r§7");
|
||||
for (String arg : args){
|
||||
msgBuilder.append(arg).append(" ");
|
||||
}
|
||||
String msg = msgBuilder.toString();
|
||||
BungeeCore.send(player, msg);
|
||||
BungeeCore.send(target, msg);
|
||||
BungeeCore.log(msg);
|
||||
Message.send("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString());
|
||||
Message.send("MSG_FORMAT", target, player.getName(), target.getName(), msgBuilder.toString());
|
||||
BungeeCore.log(Message.parse("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString()));
|
||||
|
||||
lastChats.put(target, player);
|
||||
}
|
||||
|
@ -258,3 +258,10 @@ RANKED_QUEUE_LEFT=§cRanglistenspiel-Warteschlange verlassen
|
||||
RANKED_ENEMY_SPOTTED=§eGegner gefunden! Ranglistenspiel startet.
|
||||
RANKED_BROADCAST=§7{0}§8-§7Ranglistenspiel§8: §e{1} vs {2}
|
||||
RANKED_BROADCAST_HOVER=§aZuschauen
|
||||
|
||||
#RCommand
|
||||
R_SYNTAX=/r [Antwort]
|
||||
R_NOTHING=§cDu hast bisher mit niemandem geschrieben!
|
||||
R_OFFLINE=§cDieser Spieler ist derzeit nicht online!
|
||||
R_BLOCKED=§cDieser Spieler hat dich geblockt!
|
||||
R_NO_CHAT=§cDieser Spieler empfängt derzeit keine Chatnachrichten!
|
In neuem Issue referenzieren
Einen Benutzer sperren