Package com.nijiko.permissions

Examples of com.nijiko.permissions.PermissionHandler


     
      String group = "", user = "";
        Player player = plugin.getServer().getPlayer(resident.getName());
       
      //sendDebugMsg("    Permissions installed.");
        PermissionHandler handler = permissions.getHandler();
       
        if (node == "prefix") {
                group = handler.getGroupPrefix(player.getWorld().getName(), handler.getGroup(player.getWorld().getName(), player.getName()));
                //user =  handler.getUserPrefix(player.getWorld().getName(), player.getName());
        } else if (node == "suffix") {
                group = handler.getGroupSuffix(player.getWorld().getName(), handler.getGroup(player.getWorld().getName(), player.getName()));
                //user =  handler.getUserSuffix(player.getWorld().getName(), player.getName());
        }
     
      if (!group.equals(user))
            user = group + user;
View Full Code Here


      Player player = plugin.getServer().getPlayer(playerName);
    String worldName = player.getWorld().getName();
    String groupName;
   
    try {
      PermissionHandler handler = permissions.getHandler();
        groupName = handler.getGroup(worldName, playerName);
       
        return handler.getGroupPermissionInteger(worldName, groupName, node);
    } catch (Exception e) {
      // Ignore UnsupportedOperationException on certain Permission APIs
    }
     
      return -1;
View Full Code Here

      Player player = plugin.getServer().getPlayer(playerName);
    String worldName = player.getWorld().getName();
    String groupName;
   
    try {
      PermissionHandler handler = permissions.getHandler();
        groupName = handler.getGroup(worldName, playerName);
        String perm = handler.getGroupPermissionString(worldName, groupName, node);
       
        if (perm != null)
          return perm;
    } catch (Exception e) {
      // Ignore UnsupportedOperationException on certain Permission APIs
View Full Code Here

  public boolean hasPermission(Player player, String node) {
     
      if (player.isOp())
        return true;
     
      PermissionHandler handler = permissions.getHandler();
        return handler.permission(player, node);
    }
View Full Code Here

     * @return Name of this players group.
     */
    @Override
  public String getPlayerGroup(Player player) {

      PermissionHandler handler = permissions.getHandler();
      return handler.getGroup(player.getWorld().getName(), player.getName());
   
    }
View Full Code Here

TOP

Related Classes of com.nijiko.permissions.PermissionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.