mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-06 23:54:43 +02:00
Get rid of PermHandler
This commit is contained in:
@ -35,6 +35,7 @@ import com.plotsquared.core.player.PlotPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Optional;
|
||||
@ -74,7 +75,8 @@ public class BukkitPermissionHandler implements PermissionHandler {
|
||||
this.playerReference = new WeakReference<>(player);
|
||||
}
|
||||
|
||||
@Override public boolean hasPermission(@Nonnull final String permission) {
|
||||
@Override public boolean hasPermission(@Nullable final String world,
|
||||
@Nonnull final String permission) {
|
||||
final Player player = this.playerReference.get();
|
||||
return player != null && player.hasPermission(permission);
|
||||
}
|
||||
|
Reference in New Issue
Block a user