Fix compatibility issues with Citizens (fixes #3105)

This commit is contained in:
SirYwell 2021-06-22 10:18:48 +02:00
parent ca9e371067
commit 0e84cf085b
2 changed files with 4 additions and 10 deletions

View File

@ -62,14 +62,13 @@ public class BukkitPlayerManager extends PlayerManager<BukkitPlayer, Player> {
@NonNull
@Override
public BukkitPlayer getPlayer(final @NonNull Player object) {
if (object.getUniqueId().version() == 2) { // not a real player
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, object, false, this.permissionHandler);
}
if (!object.isOnline()) {
throw new NoSuchPlayerException(object.getUniqueId());
}
try {
return getPlayer(object.getUniqueId());
} catch (final NoSuchPlayerException exception) {
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, object, false, this.permissionHandler);
}
return getPlayer(object.getUniqueId());
}
@Override

View File

@ -314,11 +314,6 @@ public abstract class PlayerManager<P extends PlotPlayer<? extends T>, T> {
super(String.format("There is no online player with UUID '%s'", uuid.toString()));
}
@Override
public synchronized Throwable fillInStackTrace() {
return this;
}
}
}