Fixed permission check.

This commit is contained in:
Tastybento 2017-12-21 23:13:22 -08:00
parent f28936948a
commit c2e37ad2ae
2 changed files with 6 additions and 4 deletions

View File

@ -126,8 +126,12 @@ public class User {
return playerUUID;
}
public boolean hasPermission(String string) {
return string == null ? false : sender.hasPermission(string);
/**
* @param permission
* @return true if permission is empty or if the player has that permission
*/
public boolean hasPermission(String permission) {
return permission.isEmpty() ? true : sender.hasPermission(permission);
}
public boolean isOnline() {

View File

@ -2,8 +2,6 @@ package us.tastybento.bskyblock.commands.island.teams;
import java.util.UUID;
import org.bukkit.ChatColor;
import us.tastybento.bskyblock.api.commands.CompositeCommand;
import us.tastybento.bskyblock.api.commands.User;
import us.tastybento.bskyblock.api.events.IslandBaseEvent;