示例#1
0
 public boolean canReload(Player player) {
   String s = "magiccarpet.mr";
   if (vault != null && vault.isPermissionsEnabled()) {
     return vault.getPermissionProvider().has(player, s);
   }
   return player.hasPermission(s);
 }
示例#2
0
 public boolean canFly(Player player) {
   if (carpets.getGiven(player)) {
     return true;
   }
   String s = "magiccarpet.mc";
   if (vault != null && vault.isPermissionsEnabled()) {
     return vault.getPermissionProvider().has(player, s);
   }
   return player.hasPermission(s);
 }
示例#3
0
 public boolean canFlyAt(Player player, int i) {
   if (i == carpSize) {
     return true;
   }
   if (carpets.getGiven(player)) {
     return true;
   }
   String s = "magiccarpet.mc.";
   Permission permission =
       new Permission(s + i, "Allows the carpet to operate at size " + i, PermissionDefault.OP);
   permission.addParent("magiccarpet.*", true);
   if (vault != null && vault.isPermissionsEnabled()) {
     return vault.getPermissionProvider().has(player, s + i);
   }
   return player.hasPermission(permission);
 }