geforkt von SteamWar/BungeeCore
Fix chatcolor, arenacommand
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
f1f334a750
Commit
4d53e8ced9
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.Arenaserver;
|
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
|
import de.steamwar.bungeecore.Servertype;
|
||||||
import de.steamwar.bungeecore.Subserver;
|
import de.steamwar.bungeecore.Subserver;
|
||||||
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;
|
||||||
@ -40,7 +40,8 @@ public class ArenaCommand extends BasicCommand {
|
|||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
|
|
||||||
ServerInfo server = ProxyServer.getInstance().getServerInfo(String.join(" ", args));
|
ServerInfo server = ProxyServer.getInstance().getServerInfo(String.join(" ", args));
|
||||||
if(server == null || !(Subserver.getSubserver(server) instanceof Arenaserver)) {
|
Subserver subserver = Subserver.getSubserver(server);
|
||||||
|
if(server == null || subserver == null || subserver.getType() != Servertype.ARENA) {
|
||||||
Message.send("ARENA_NOT_FOUND", player);
|
Message.send("ARENA_NOT_FOUND", player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,7 @@ public class ChatListener extends BasicListener {
|
|||||||
} else {
|
} else {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
|
||||||
|
//TODO /arena
|
||||||
Subserver subserver = Subserver.getSubserver(player);
|
Subserver subserver = Subserver.getSubserver(player);
|
||||||
if(subserver instanceof Arenaserver && subserver.getServer() == player.getServer().getInfo()) {
|
if(subserver instanceof Arenaserver && subserver.getServer() == player.getServer().getInfo()) {
|
||||||
localChat(player, message);
|
localChat(player, message);
|
||||||
@ -162,7 +163,7 @@ public class ChatListener extends BasicListener {
|
|||||||
sender.getTeam() == 0 ? "" : "§" + Team.get(sender.getTeam()).getTeamColor() + Team.get(sender.getTeam()).getTeamKuerzel() + " ",
|
sender.getTeam() == 0 ? "" : "§" + Team.get(sender.getTeam()).getTeamColor() + Team.get(sender.getTeam()).getTeamKuerzel() + " ",
|
||||||
UserElo.getEmblem(sender),
|
UserElo.getEmblem(sender),
|
||||||
group.getColorCode(),
|
group.getColorCode(),
|
||||||
group.getChatPrefix().length() == 0 ? "" : group.getChatPrefix() + " ",
|
group.getChatPrefix().length() == 0 ? "§f" : group.getChatPrefix() + " ",
|
||||||
group.getChatColorCode()));
|
group.getChatColorCode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren