Merge pull request 'Fix trace Rserver null error ?' (#237) from trace/server-nullpointer-fix into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #237 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
792b089e4f
@ -188,7 +188,19 @@ public class Trace {
|
|||||||
* @param playerTraceShowData The showData for modifying the rendering
|
* @param playerTraceShowData The showData for modifying the rendering
|
||||||
*/
|
*/
|
||||||
protected void render(List<TNTPoint> records, Player player, PlayerTraceShowData playerTraceShowData) {
|
protected void render(List<TNTPoint> records, Player player, PlayerTraceShowData playerTraceShowData) {
|
||||||
render(records, entityServerMap.get(player), playerTraceShowData);
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return newEntityServer;
|
||||||
|
});
|
||||||
|
|
||||||
|
render(records, entityServer, playerTraceShowData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren