Add JoinmeCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
0dbbea3558
Commit
85d5a76e30
@ -34,8 +34,6 @@ import java.util.ArrayList;
|
||||
|
||||
public class JoinmeCommand extends BasicCommand {
|
||||
|
||||
private static final String DENY_MESSAGE = "§cDu kannst diesem Spieler derzeit nicht folgen.";
|
||||
|
||||
public JoinmeCommand() {
|
||||
super("joinme", "");
|
||||
}
|
||||
@ -46,17 +44,15 @@ public class JoinmeCommand extends BasicCommand {
|
||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||
|
||||
if (args.length == 0 && player.hasPermission("bungeecore.joinme")) {
|
||||
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Klicke §ehier§8, §7um zu §e" + player.getName() + " §7auf §e" + player.getServer().getInfo().getName() + " §7zu kommen§8!");
|
||||
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aSpieler folgen").create()));
|
||||
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
|
||||
ProxyServer.getInstance().broadcast(tc);
|
||||
Message.broadcast("JOINME_BROADCAST", true, Message.parse("JOINME_BROADCAST_HOVER", player) //TODO Needs Message Object
|
||||
, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
|
||||
} else if (args.length == 1) {
|
||||
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
|
||||
if(target == null || !target.isConnected()){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist offline.");
|
||||
Message.send("JOINME_PLAYER_OFFLINE", player);
|
||||
return;
|
||||
}else if(target.equals(player)){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cSei eins mit dir selbst!");
|
||||
Message.send("JOINME_PLAYER_SELF", player);
|
||||
return;
|
||||
}
|
||||
ServerInfo server = target.getServer().getInfo();
|
||||
@ -74,18 +70,18 @@ public class JoinmeCommand extends BasicCommand {
|
||||
subserver.sendPlayer(player);
|
||||
} else {
|
||||
SubserverSystem.sendDeniedMessage(player, bauserver.getOwner());
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE);
|
||||
Message.send("JOIN_PLAYER_BLOCK", player);
|
||||
}
|
||||
}
|
||||
}else if(serverPerm != null && !player.hasPermission(serverPerm)){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE);
|
||||
Message.send("JOIN_PLAYER_BLOCK", player);
|
||||
}else if(serverPerm == null && !player.getGroups().contains("team")) {
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + DENY_MESSAGE);
|
||||
Message.send("JOIN_PLAYER_BLOCK", player);
|
||||
}else{
|
||||
player.connect(server);
|
||||
}
|
||||
} else {
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Mit §8/§ejoin §8[§eSpieler§8] §7kannst du einem Spieler folgen §8(z.B. in eine Arena)§7.");
|
||||
Message.send("JOINME_SYNTAX", player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ SPACER=
|
||||
UNKNOWN_COMMAND=§cUnbekannter Befehl.
|
||||
UNKNOWN_PLAYER=§cDiesen Spieler gibt es nicht.
|
||||
INVALID_TIME=§cUngültige Zeitangabe.
|
||||
JOIN_PLAYER_BLOCK=§cDu kannst diesem Spieler derzeit nicht folgen.
|
||||
|
||||
#ModLoader blocker
|
||||
MODLOADER_INSTALLED=§7Du hast §e{0} §7installiert. Daher kannst du keinen Arenen beitreten.
|
||||
@ -212,4 +213,11 @@ CHECK_DECLINED_TEAM=§7Die Schematic §e{0} §7von §e{1} §awurde aufgrund von
|
||||
|
||||
#HistoricCommand
|
||||
HISTORIC_BROADCAST=§7Historischer §e{0}§8-§7Kampf von §e{1}§8!
|
||||
HISTORIC_BROADCAST_HOVER=§aGegen §7{0} §ekämpfen
|
||||
HISTORIC_BROADCAST_HOVER=§aGegen §7{0} §ekämpfen
|
||||
|
||||
#JoinmeCommand
|
||||
JOINME_SYNTAX=§7Mit §8/§ejoin §8[§eSpieler§8] §7kannst du einem Spieler folgen §8(z.B. in eine Arena)§7.
|
||||
JOINME_BROADCAST=§7Klicke §ehier§8, §7um zu §e" + player.getName() + " §7auf §e" + player.getServer().getInfo().getName() + " §7zu kommen§8!
|
||||
JOINME_BROADCAST_HOVER=§aSpieler folgen
|
||||
JOINME_PLAYER_OFFLINE=§cDieser Spieler ist offline.
|
||||
JOINME_PLAYER_SELF=§cSei eins mit dir selbst!
|
In neuem Issue referenzieren
Einen Benutzer sperren