Fix trace Rserver null error ? #237
@ -188,18 +188,17 @@ public class Trace {
|
||||
* @param playerTraceShowData The showData for modifying the rendering
|
||||
*/
|
||||
protected void render(List<TNTPoint> records, Player player, PlayerTraceShowData playerTraceShowData) {
|
||||
REntityServer entityServer = entityServerMap.get(player);
|
||||
if (entityServer == null) {
|
||||
entityServer = new REntityServer();
|
||||
entityServer.addPlayer(player);
|
||||
entityServer.setCallback((p, rEntity, entityAction) -> {
|
||||
REntityServer entityServer = entityServerMap.computeIfAbsent(player, k -> {
|
||||
REntityServer newEntityServer = new REntityServer();
|
||||
newEntityServer.addPlayer(k);
|
||||
newEntityServer.setCallback((p, rEntity, entityAction) -> {
|
||||
if (entityAction != REntityServer.EntityAction.INTERACT) return;
|
||||
if (rEntity instanceof TraceEntity) {
|
||||
((TraceEntity) rEntity).printIntoChat(p);
|
||||
}
|
||||
});
|
||||
entityServerMap.put(player, entityServer);
|
||||
}
|
||||
return newEntityServer;
|
||||
});
|
||||
|
||||
render(records, entityServer, playerTraceShowData);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren