mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-27 13:07:23 +01:00
commit
239ea90a9b
@ -21,6 +21,8 @@ import java.util.Set;
|
|||||||
import net.milkbowl.vault.permission.Permission;
|
import net.milkbowl.vault.permission.Permission;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -88,6 +90,30 @@ public class Permission_bPermissions2 extends Permission {
|
|||||||
return hooked;
|
return hooked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean has(Player player, String permission) {
|
||||||
|
return playerHas(player.getWorld().getName(), player.getName(), permission);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean has(String world, String player, String permission) {
|
||||||
|
return playerHas(world, player, permission);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean has(CommandSender sender, String permission) {
|
||||||
|
if(sender instanceof Player) {
|
||||||
|
Player player = (Player) sender;
|
||||||
|
return has(player, permission);
|
||||||
|
}
|
||||||
|
return sender.hasPermission(permission);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean has(org.bukkit.World world, String player, String permission) {
|
||||||
|
return playerHas(world.getName(), player, permission);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean playerHas(String world, String player, String permission) {
|
public boolean playerHas(String world, String player, String permission) {
|
||||||
return ApiLayer.hasPermission(world, CalculableType.USER, player, permission);
|
return ApiLayer.hasPermission(world, CalculableType.USER, player, permission);
|
||||||
|
Loading…
Reference in New Issue
Block a user