Only initialise EconHandler when economy is enabled and stop accessing the static instance directly.

This commit is contained in:
Alexander Söderberg
2020-06-24 15:26:06 +02:00
parent efab6e92f7
commit f64026af1a
15 changed files with 80 additions and 65 deletions

View File

@ -155,8 +155,8 @@ public class BukkitPlayer extends PlotPlayer<Player> {
}
@Override public boolean hasPermission(final String permission) {
if (this.offline && EconHandler.manager != null) {
return EconHandler.manager.hasPermission(getName(), permission);
if (this.offline && EconHandler.getEconHandler() != null) {
return EconHandler.getEconHandler().hasPermission(getName(), permission);
}
return this.player.hasPermission(permission);
}