SteamWar/BauSystem2.0
Archiviert
12
0

Fix trace Rserver null error ?
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
D4rkr34lm 2024-04-22 19:58:34 +02:00
Ursprung 2ed6008aea
Commit fd17b8315f

Datei anzeigen

@ -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);
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);
}
/**