org.monstercraft.irc.handlers
Class PermissionsHandler

java.lang.Object
  extended by org.bukkit.plugin.java.JavaPlugin
      extended by org.monstercraft.irc.IRC
          extended by org.monstercraft.irc.handlers.PermissionsHandler
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.plugin.Plugin

public class PermissionsHandler
extends IRC

This handles all of the plugins permissions.

Author:
fletch_to_99

Constructor Summary
PermissionsHandler(com.nijiko.permissions.PermissionHandler perms)
          Creates an instance of the PermissionsHandler class.
 
Method Summary
 boolean anyGroupsInList(org.bukkit.entity.Player player, java.util.List<java.lang.String> list)
          Checks if a player is in a list.
 java.lang.String[] getGroups(org.bukkit.entity.Player player)
          Sets the players groups.
 boolean hasCommandPerms(org.bukkit.entity.Player player, GameCommand command)
          Checks if the player has access to the command.
 
Methods inherited from class org.monstercraft.irc.IRC
getCommandManager, getHandleManager, getHookManager, getSettings, onCommand, onDisable, onEnable
 
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getCommand, getConfig, getConfiguration, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getPluginLoader, getResource, getServer, isEnabled, isInitialized, isNaggable, onLoad, reloadConfig, saveConfig, setNaggable, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionsHandler

public PermissionsHandler(com.nijiko.permissions.PermissionHandler perms)
Creates an instance of the PermissionsHandler class.

Parameters:
perms - The Permissions hooks handler.
Method Detail

hasCommandPerms

public boolean hasCommandPerms(org.bukkit.entity.Player player,
                               GameCommand command)
Checks if the player has access to the command.

Parameters:
player - The player executing the command.
command - The command being executed.
Returns:
True if the player has permission; otherwise false.

anyGroupsInList

public boolean anyGroupsInList(org.bukkit.entity.Player player,
                               java.util.List<java.lang.String> list)
Checks if a player is in a list.

Parameters:
player - The player to check.
list - The list to check.
Returns:
True if the list contains their name; otherwise false.

getGroups

public java.lang.String[] getGroups(org.bukkit.entity.Player player)
Sets the players groups.

Parameters:
player - The player to set groups for.
Returns:
The groups the player is in.