package com.namelessmc.plugin.NamelessSpigot;

import org.bukkit.command.CommandSender;
import org.bukkit.permissions.PermissionDefault;

public enum Permission {

	//COMMAND_REGISTER("namelessmc.register"),
	//COMMAND_GETNOTIFICATIONS("namelessmc.notifications"),
	//COMMAND_REPORT("namelessmc.report"),
	//COMMAND_ADMIN_SETGROUP("namelessmc.admin.setgroup"),
	//COMMAND_ADMIN_GETUSER("namelessmc.admin.getuser"),
	//COMMAND_VALIDATE("namelessmc.validate"),
	//ADMIN_UPDATENOTIFY("namelessmc.admin.updatenotify");
	
	COMMAND_GET_NOTIFICATIONS("namelessmc.command.getnotifications"),
	COMMAND_REGISTER("namelessmc.command.register"),
	COMMAND_REPORT("namelessmc.command.report"),
	COMMAND_SET_GROUP("namelessmc.command.setgroup"),
	COMMAND_USER_INFO("namelessmc.command.userinfo"),
	COMMAND_VALIDATE("namelessmc.command.validate"),
	
	COMMAND_NAMELESS("namelessmc.command.nameless"),
	
	;
	
	private org.bukkit.permissions.Permission permission;
	private String permissionString;
	
	Permission(String permissionString){
		permission = new org.bukkit.permissions.Permission(permissionString);
		this.permissionString = permissionString;
	}
	
	@Override
	public String toString() {
		return permissionString;
	}
	
	public org.bukkit.permissions.Permission asPermission() {
		return permission;
	}
	
	public boolean hasPermission(CommandSender sender) {
		return sender.hasPermission(asPermission());
	}
	
	public static org.bukkit.permissions.Permission toGroupSyncPermission(String permission) {
		return new org.bukkit.permissions.Permission(permission, PermissionDefault.FALSE);
	}

}

@@ -161,361 +161,8 @@
  %7B%0A%0A
-%09//COMMAND_REGISTER(%22namelessmc.register%22),%0A%09//COMMAND_GETNOTIFICATIONS(%22namelessmc.notifications%22),%0A%09//COMMAND_REPORT(%22namelessmc.report%22),%0A%09//COMMAND_ADMIN_SETGROUP(%22namelessmc.admin.setgroup%22),%0A%09//COMMAND_ADMIN_GETUSER(%22namelessmc.admin.getuser%22),%0A%09//COMMAND_VALIDATE(%22namelessmc.validate%22),%0A%09//ADMIN_UPDATENOTIFY(%22namelessmc.admin.updatenotify%22);%0A%09%0A
 %09COM
@@ -472,17 +472,16 @@
 date%22),%0A
-%09
 %0A%09COMMAN
@@ -527,14 +527,12 @@
 %22),%0A
-%09
 %0A%09;%0A
-%09
 %0A%09pr
@@ -617,17 +617,16 @@
 String;%0A
-%09
 %0A%09Permis
@@ -622,32 +622,38 @@
 g;%0A%0A%09Permission(
+final 
 String permissio
@@ -664,16 +664,21 @@
 ing)%7B%0A%09%09
+this.
 permissi
@@ -786,17 +786,16 @@
 ing;%0A%09%7D%0A
-%09
 %0A%09@Overr
@@ -827,32 +827,37 @@
 ng() %7B%0A%09%09return 
+this.
 permissionString
@@ -857,25 +857,24 @@
 nString;%0A%09%7D%0A
-%09
 %0A%09public org
@@ -930,16 +930,21 @@
 %09return 
+this.
 permissi
@@ -946,25 +946,24 @@
 mission;%0A%09%7D%0A
-%09
 %0A%09public boo
@@ -981,16 +981,22 @@
 mission(
+final 
 CommandS
@@ -1041,16 +1041,21 @@
 mission(
+this.
 asPermis
@@ -1066,17 +1066,16 @@
 ());%0A%09%7D%0A
-%09
 %0A%09public
@@ -1138,16 +1138,22 @@
 mission(
+final 
 String p

Remove old permissions