Hotfix Tablist colors
Dieser Commit ist enthalten in:
Ursprung
83b1f9c6fc
Commit
e1a9af51b8
@ -24,6 +24,7 @@ import de.steamwar.misslewars.Config;
|
|||||||
import de.steamwar.misslewars.FightState;
|
import de.steamwar.misslewars.FightState;
|
||||||
import de.steamwar.misslewars.MissileWars;
|
import de.steamwar.misslewars.MissileWars;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
@ -39,14 +40,17 @@ public class JoinListener extends BasicListener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onJoin(PlayerJoinEvent e){
|
public void onJoin(PlayerJoinEvent e){
|
||||||
e.setJoinMessage("§a» " + e.getPlayer().getDisplayName());
|
e.setJoinMessage("§a» " + e.getPlayer().getDisplayName());
|
||||||
if (!Config.test())
|
|
||||||
new TablistNamePacket(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), "§7" + e.getPlayer().getName()).send(e.getPlayer());
|
|
||||||
if (Config.isChallenge()) {
|
if (Config.isChallenge()) {
|
||||||
if (Config.RedLeader.equals(e.getPlayer().getUniqueId())) {
|
if (Config.RedLeader.equals(e.getPlayer().getUniqueId())) {
|
||||||
MissileWars.getRedTeam().join(e.getPlayer());
|
MissileWars.getRedTeam().join(e.getPlayer());
|
||||||
} else if (Config.BlueLeader.equals(e.getPlayer().getUniqueId())) {
|
} else if (Config.BlueLeader.equals(e.getPlayer().getUniqueId())) {
|
||||||
MissileWars.getBlueTeam().join(e.getPlayer());
|
MissileWars.getBlueTeam().join(e.getPlayer());
|
||||||
} else {
|
} else {
|
||||||
|
if (!Config.test()) {
|
||||||
|
Bukkit.getScheduler().runTaskLater(MissileWars.getPlugin(), () -> {
|
||||||
|
new TablistNamePacket(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), "§7" + e.getPlayer().getName()).send(e.getPlayer());
|
||||||
|
}, 5);
|
||||||
|
}
|
||||||
MissileWars.spectateJoin(e.getPlayer());
|
MissileWars.spectateJoin(e.getPlayer());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren