geforkt von SteamWar/BungeeCore
Add RCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
33c45dd3f2
Commit
5098bf8282
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
@ -38,7 +39,7 @@ public class RCommand extends BasicCommand {
|
|||||||
if(sender instanceof ProxiedPlayer){
|
if(sender instanceof ProxiedPlayer){
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
if(args.length == 0){
|
if(args.length == 0){
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "/r [Antwort]");
|
Message.send("R_SYNTAX", player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,29 +51,27 @@ public class RCommand extends BasicCommand {
|
|||||||
|
|
||||||
ProxiedPlayer target = lastChats.get(player);
|
ProxiedPlayer target = lastChats.get(player);
|
||||||
if(target == null){
|
if(target == null){
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast bisher mit niemandem geschrieben!");
|
Message.send("R_NOTHING", player);
|
||||||
return;
|
return;
|
||||||
}else if(!target.isConnected()){
|
}else if(!target.isConnected()){
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!");
|
Message.send("R_OFFLINE", player);
|
||||||
lastChats.remove(player);
|
lastChats.remove(player);
|
||||||
return;
|
return;
|
||||||
}else if (IgnoreSystem.isIgnored(target, player)) {
|
}else if (IgnoreSystem.isIgnored(target, player)) {
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!");
|
Message.send("R_BLOCKED", player);
|
||||||
return;
|
return;
|
||||||
}else if(target.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
|
}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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder msgBuilder = new StringBuilder();
|
StringBuilder msgBuilder = new StringBuilder();
|
||||||
msgBuilder.append("§e").append(player.getName()).append("§8»§e").append(target.getName()).append(" §r§7");
|
|
||||||
for (String arg : args){
|
for (String arg : args){
|
||||||
msgBuilder.append(arg).append(" ");
|
msgBuilder.append(arg).append(" ");
|
||||||
}
|
}
|
||||||
String msg = msgBuilder.toString();
|
Message.send("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString());
|
||||||
BungeeCore.send(player, msg);
|
Message.send("MSG_FORMAT", target, player.getName(), target.getName(), msgBuilder.toString());
|
||||||
BungeeCore.send(target, msg);
|
BungeeCore.log(Message.parse("MSG_FORMAT", player, player.getName(), target.getName(), msgBuilder.toString()));
|
||||||
BungeeCore.log(msg);
|
|
||||||
|
|
||||||
lastChats.put(target, player);
|
lastChats.put(target, player);
|
||||||
}
|
}
|
||||||
|
@ -257,4 +257,11 @@ RANKED_QUEUE_HOW_TO_LEAVE=§7Wiederhole den Befehl zum Verlassen der Warteschlan
|
|||||||
RANKED_QUEUE_LEFT=§cRanglistenspiel-Warteschlange verlassen
|
RANKED_QUEUE_LEFT=§cRanglistenspiel-Warteschlange verlassen
|
||||||
RANKED_ENEMY_SPOTTED=§eGegner gefunden! Ranglistenspiel startet.
|
RANKED_ENEMY_SPOTTED=§eGegner gefunden! Ranglistenspiel startet.
|
||||||
RANKED_BROADCAST=§7{0}§8-§7Ranglistenspiel§8: §e{1} vs {2}
|
RANKED_BROADCAST=§7{0}§8-§7Ranglistenspiel§8: §e{1} vs {2}
|
||||||
RANKED_BROADCAST_HOVER=§aZuschauen
|
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