Fix trace Rserver null error ? #237
@ -188,7 +188,20 @@ public class Trace {
|
||||
* @param playerTraceShowData The showData for modifying the rendering
|
||||
*/
|
||||
protected void render(List<TNTPoint> records, Player player, PlayerTraceShowData playerTraceShowData) {
|
||||
render(records, entityServerMap.get(player), playerTraceShowData);
|
||||
REntityServer entityServer = entityServerMap.get(player);
|
||||
D4rkr34lm markierte diese Unterhaltung als gelöst
Veraltet
|
||||
if (entityServer == null) {
|
||||
entityServer = new REntityServer();
|
||||
entityServer.addPlayer(player);
|
||||
entityServer.setCallback((p, rEntity, entityAction) -> {
|
||||
if (entityAction != REntityServer.EntityAction.INTERACT) return;
|
||||
if (rEntity instanceof TraceEntity) {
|
||||
((TraceEntity) rEntity).printIntoChat(p);
|
||||
}
|
||||
});
|
||||
entityServerMap.put(player, entityServer);
|
||||
}
|
||||
|
||||
render(records, entityServer, playerTraceShowData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Hier bitte mit computeIfAbsent arbeiten und nicht mit get!