• Es freut uns dass du in unser Minecraft Forum gefunden hast. Hier kannst du mit über 130.000 Minecraft Fans über Minecraft diskutieren, Fragen stellen und anderen helfen. In diesem Minecraft Forum kannst du auch nach Teammitgliedern, Administratoren, Moderatoren , Supporter oder Sponsoren suchen. Gerne kannst du im Offtopic Bereich unseres Minecraft Forums auch über nicht Minecraft spezifische Themen reden. Wir hoffen dir gefällt es in unserem Minecraft Forum!

Spielername wird nicht richtig angezeigt.

Status
Für weitere Antworten geschlossen.

majo2702

Redstoneengineer
Registriert
11 Juni 2012
Beiträge
48
Diamanten
0
Die Namen der Spieler werden beim betreten und verlassen des Servers, als auch beim sterben nicht richtig angezeigt:
2014-08-01_20.23.27.jpg
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]
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.
 
Zuletzt bearbeitet:
Status
Für weitere Antworten geschlossen.
Oben