Add KickCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
85d5a76e30
Commit
67fb884bc1
@ -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 net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -35,18 +36,18 @@ public class KickCommand extends BasicCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
if(args.length == 0){
|
if(args.length == 0){
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "/kick [Spieler] [Nachricht]");
|
Message.send("KICK_SYNTAX", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
|
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
|
||||||
if(target == null){
|
if(target == null){
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!");
|
Message.send("KICK_OFFLINE", sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length == 1){
|
if(args.length == 1){
|
||||||
target.disconnect(BungeeCore.stringToText(BungeeCore.CHAT_PREFIX + "§cDu wurdest gekickt."));
|
Message.send("KICK_NORMAL", target);
|
||||||
}else{
|
}else{
|
||||||
StringBuilder msgBuilder = new StringBuilder();
|
StringBuilder msgBuilder = new StringBuilder();
|
||||||
msgBuilder.append(BungeeCore.CHAT_PREFIX).append("§c");
|
msgBuilder.append(BungeeCore.CHAT_PREFIX).append("§c");
|
||||||
@ -55,7 +56,7 @@ public class KickCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
target.disconnect(BungeeCore.stringToText(msgBuilder.toString()));
|
target.disconnect(BungeeCore.stringToText(msgBuilder.toString()));
|
||||||
}
|
}
|
||||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Der Spieler " + target.getName() + " wurde gekickt.");
|
Message.send("KICK_CONFIRM", sender, target.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -220,4 +220,10 @@ JOINME_SYNTAX=§7Mit §8/§ejoin §8[§eSpieler§8] §7kannst du einem Spieler f
|
|||||||
JOINME_BROADCAST=§7Klicke §ehier§8, §7um zu §e" + player.getName() + " §7auf §e" + player.getServer().getInfo().getName() + " §7zu kommen§8!
|
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_BROADCAST_HOVER=§aSpieler folgen
|
||||||
JOINME_PLAYER_OFFLINE=§cDieser Spieler ist offline.
|
JOINME_PLAYER_OFFLINE=§cDieser Spieler ist offline.
|
||||||
JOINME_PLAYER_SELF=§cSei eins mit dir selbst!
|
JOINME_PLAYER_SELF=§cSei eins mit dir selbst!
|
||||||
|
|
||||||
|
#KickCommand
|
||||||
|
KICK_SYNTAX=/kick [Spieler] [Nachricht]
|
||||||
|
KICK_OFFLINE=§cDieser Spieler ist derzeit nicht online!
|
||||||
|
KICK_CONFIRM=Der Spieler {0} wurde gekickt.
|
||||||
|
KICK_NORMAL=§cDu wurdest gekickt.
|
In neuem Issue referenzieren
Einen Benutzer sperren