コード例 #1
0
 @Override
 public boolean playerAdd(String world, String player, String permission) {
   try {
     PermissionBase user = manager.getUser(player);
     user.addPerm(permission, world);
     return true;
   } catch (IOException ex) {
     plugin
         .getLogger()
         .log(
             Level.SEVERE,
             String.format(
                 "[%s] An error occured while saving perms",
                 totalperms.getDescription().getName()),
             ex);
     return false;
   }
 }
コード例 #2
0
 @Override
 public boolean groupRemove(String world, String group, String permission) {
   try {
     PermissionBase permGroup = manager.getGroup(group);
     permGroup.remPerm(permission, world);
     return true;
   } catch (IOException ex) {
     plugin
         .getLogger()
         .log(
             Level.SEVERE,
             String.format(
                 "[%s] An error occured while saving perms",
                 totalperms.getDescription().getName()),
             ex);
     return false;
   }
 }