Skip to content

Commit

Permalink
Fix NPE on NeoForge when starting profiler (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Oct 23, 2024
1 parent e6930ec commit 6856fca
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ public boolean hasPermission(String permission) {

@Override
protected Object getObjectForComparison() {
return this.delegate.getEntity();
UUID uniqueId = getUniqueId();
if (uniqueId != null) {
return uniqueId;
}
Entity entity = this.delegate.getEntity();
if (entity != null) {
return entity;
}
return getName();
}
}

0 comments on commit 6856fca

Please sign in to comment.