Add name, icon, max sev, and permission to Category enum

This commit is contained in:
Spencer 2018-01-02 17:11:12 -05:00 committed by Alexander Meech
parent 8a16b419c4
commit f6e0174c70
1 changed files with 46 additions and 10 deletions

View File

@ -1,17 +1,53 @@
package mineplex.core.punish; package mineplex.core.punish;
import org.bukkit.Material;
import mineplex.core.account.permissions.Permission;
public enum Category public enum Category
{ {
ChatOffense, ChatOffense("Chat", Material.BOOK_AND_QUILL, 3, Punish.Perm.PUNISHMENT_COMMAND),
Advertisement, // No longer used Exploiting("Gameplay", Material.HOPPER, 1, Punish.Perm.PUNISHMENT_COMMAND), // General Offense
Exploiting, // General Offense Hacking("Hacking", Material.IRON_SWORD, 3, Punish.Perm.PUNISHMENT_COMMAND), // Illegal Mods
Hacking, // Illegal Mods Warning("Warning", Material.PAPER, 1, Punish.Perm.PUNISHMENT_COMMAND),
Warning, PermMute("Permanent Mute", Material.BOOK_AND_QUILL, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS),
PermMute, ReportAbuse("Report Ban", Material.ENCHANTED_BOOK, 1, Punish.Perm.REPORT_BAN_ACCESS), // Abusing /report command
ReportAbuse, // Abusing /report command Other("Permanent Ban", Material.REDSTONE_BLOCK, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS); // Represents perm ban - (or old perm mutes)
Other; // Represents perm ban - (or old perm mutes)
String _name;
public static boolean contains(String s) Material _icon;
int _maxSeverity;
Permission _neededPermission;
Category(String name, Material icon, int maxSeverity, Permission neededPermission)
{
_name = name;
_icon = icon;
_maxSeverity = maxSeverity;
_neededPermission = neededPermission;
}
public String getName()
{
return _name;
}
public Material getIcon()
{
return _icon;
}
public int getMaxSeverity()
{
return _maxSeverity;
}
public Permission getNeededPermission()
{
return _neededPermission;
}
public static boolean contains(String s)
{ {
try try
{ {