Archiviert
1
0

Fix chatcolor, arenacommand

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-22 16:14:35 +02:00
Ursprung f1f334a750
Commit 4d53e8ced9
2 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -19,8 +19,8 @@
package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.Arenaserver;
import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.Servertype;
import de.steamwar.bungeecore.Subserver;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
@ -40,7 +40,8 @@ public class ArenaCommand extends BasicCommand {
ProxiedPlayer player = (ProxiedPlayer) sender;
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);
return;
}

Datei anzeigen

@ -68,6 +68,7 @@ public class ChatListener extends BasicListener {
} else {
e.setCancelled(true);
//TODO /arena
Subserver subserver = Subserver.getSubserver(player);
if(subserver instanceof Arenaserver && subserver.getServer() == player.getServer().getInfo()) {
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() + " ",
UserElo.getEmblem(sender),
group.getColorCode(),
group.getChatPrefix().length() == 0 ? "" : group.getChatPrefix() + " ",
group.getChatPrefix().length() == 0 ? "§f" : group.getChatPrefix() + " ",
group.getChatColorCode()));
}