Dieser Commit ist enthalten in:
Ursprung
fd17b8315f
Commit
b602fb06d0
@ -188,18 +188,17 @@ 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) {
|
||||||
REntityServer entityServer = entityServerMap.get(player);
|
REntityServer entityServer = entityServerMap.computeIfAbsent(player, k -> {
|
||||||
if (entityServer == null) {
|
REntityServer newEntityServer = new REntityServer();
|
||||||
entityServer = new REntityServer();
|
newEntityServer.addPlayer(k);
|
||||||
entityServer.addPlayer(player);
|
newEntityServer.setCallback((p, rEntity, entityAction) -> {
|
||||||
entityServer.setCallback((p, rEntity, entityAction) -> {
|
|
||||||
if (entityAction != REntityServer.EntityAction.INTERACT) return;
|
if (entityAction != REntityServer.EntityAction.INTERACT) return;
|
||||||
if (rEntity instanceof TraceEntity) {
|
if (rEntity instanceof TraceEntity) {
|
||||||
((TraceEntity) rEntity).printIntoChat(p);
|
((TraceEntity) rEntity).printIntoChat(p);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
entityServerMap.put(player, entityServer);
|
return newEntityServer;
|
||||||
}
|
});
|
||||||
|
|
||||||
render(records, entityServer, playerTraceShowData);
|
render(records, entityServer, playerTraceShowData);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren