# PermUtil
Date: 2018-12-06

com.massivecraft.factions.zcore.util

## Class PermUtil

- java.lang.Object
- - com.massivecraft.factions.zcore.util.PermUtil

    public class PermUtil
    extends java.lang.Object

### Field Summary

Fields
`protected MPlugin` `p`
`java.util.Map<java.lang.String,java.lang.String>` `permissionDescriptions`

### Constructor Summary

Constructors
Constructor and Description
`PermUtil(MPlugin p)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getForbiddenMessage(java.lang.String perm)`
`java.lang.String` `getPermissionDescription(java.lang.String perm)`
`boolean` `has(org.bukkit.command.CommandSender me, java.lang.String perm)` This method tests if me has a certain permission and returns true if me has.
`boolean` `has(org.bukkit.command.CommandSender me, java.lang.String perm, boolean informSenderIfNot)`
`<T> T` `pickFirstVal(org.bukkit.command.CommandSender me, java.util.Map<java.lang.String,T> perm2val)`
`void` `setup()` This method hooks into all permission plugins we are supporting

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### permissionDescriptions

    public java.util.Map<java.lang.String,java.lang.String> permissionDescriptions

#### p

    protected MPlugin p

### Constructor Detail

#### PermUtil

    public PermUtil(MPlugin p)

### Method Detail

#### getForbiddenMessage

    public java.lang.String getForbiddenMessage(java.lang.String perm)

#### setup

    public final void setup()

This method hooks into all permission plugins we are supporting

#### getPermissionDescription

    public java.lang.String getPermissionDescription(java.lang.String perm)

#### has

    public boolean has(org.bukkit.command.CommandSender me,
                       java.lang.String perm)

This method tests if me has a certain permission and returns true if me has. Otherwise false

#### has

    public boolean has(org.bukkit.command.CommandSender me,
                       java.lang.String perm,
                       boolean informSenderIfNot)

#### pickFirstVal

    public <T> T pickFirstVal(org.bukkit.command.CommandSender me,
                              java.util.Map<java.lang.String,T> perm2val)