Die Namen der Spieler werden beim betreten und verlassen des Servers, als auch beim sterben nicht richtig angezeigt:

Source code, der Klasse, um die es geht:
Sorry, für die Formatierung des Codes, beim kopieren aus Eclipse übernimmt der den irgendwie nicht richtig.
Falls noch weitere Informationen zum fixen benötigt werden, bitte melden.

Source code, der Klasse, um die es geht:
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]package
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] net.majo_online.allgemeines;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.ChatColor;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.entity.Player;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.event.EventHandler;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.event.Listener;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.event.entity.PlayerDeathEvent;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.event.player.PlayerJoinEvent;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import
[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] org.bukkit.event.player.PlayerQuitEvent;[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public
[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] EventListener [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]implements[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Listener {[/SIZE]
[SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] EventListener(Hauptklasse [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]hk[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]hk[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getServer().getPluginManager().registerEvents([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]hk[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]
}
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//join message[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@EventHandler[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] join(PlayerJoinEvent [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]je[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/SIZE]
[SIZE=2]
Player
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]je[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getPlayer();[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]je[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setJoinMessage(ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GREEN[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[Info] "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Der/Die Spieler/-in "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GOLD[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"hat das Servernetzwerk "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GREEN[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"betreten."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].sendMessage(ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] +[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Hallo, "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GOLD[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]". Schön das du dich entschieden hast auf unserem Servernetzwerk zu spielen. Mache /info für mehr Informationen."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]
}
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//quit message[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@EventHandler[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] quit(PlayerQuitEvent [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]qe[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/SIZE]
[SIZE=2]
Player
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]qe[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getPlayer();[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]qe[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setQuitMessage(ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GREEN[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[Info] "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Der/Die Spieler/-in "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GOLD[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]AQUA[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"hat das Servernetzwerk "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]RED[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"verlassen."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]
}
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//death message[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@EventHandler[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] death(PlayerDeathEvent [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]de[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/SIZE]
[SIZE=2]
Player
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]de[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getEntity();[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]de[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setDeathMessage(ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]GREEN[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[Info]"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + ChatColor.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]WHITE[/COLOR][/SIZE][/COLOR][/SIZE][/I][/B][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Der/Die Spieler/-in "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]p[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] +[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"wurde ins Krankenhaus gebracht."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]
}
}
[/SIZE]
Falls noch weitere Informationen zum fixen benötigt werden, bitte melden.
Zuletzt bearbeitet: