package com.devotedmc.ExilePearl;

import com.devotedmc.ExilePearl.util.Guard;

public enum ExileRule {
	PEARL_RADIUS("PEARL_RADIUS"),
	DAMAGE_REINFORCEMENT("DAMAGE_REINFORCEMENT"),
	DAMAGE_BASTION("DAMAGE_BASTION"),
	ENTER_BASTION("ENTER_BASTION"),
	THROW_PEARL("THROW_PEARL"),
	CHAT("CHAT"),
	PVP("PVP"),
	IGNITE("IGNITE"),
	USE_BUCKET("USE_BUCKET"),
	PLACE_WATER("PLACE_WATER"),
	PLACE_LAVA("PLACE_LAVA"),
	USE_POTIONS("USE_POTIONS"),
	USE_BED("USE_BED"),
	SUICIDE("SUICIDE"),
	SNITCH("SNITCH"),
	MINE("MINE"),
	BREW("BREW"),
	ENCHANT("ENCHANT")
	;
	
	private final String text;
	
	private ExileRule(final String text) {
		Guard.ArgumentNotNullOrEmpty(text, "text");
		
		this.text = text;
	}
	
	@Override
	public String toString() {
		return text;
	}
	
	public static ExileRule fromString(String text) {
		switch (text.toUpperCase()) {
		
		case "PEARL_RADIUS":
			return PEARL_RADIUS;
		case "DAMAGE_REINFORCEMENT":
			return DAMAGE_REINFORCEMENT;
		case "DAMAGE_BASTION":
			return DAMAGE_BASTION;
		case "ENTER_BASTION":
			return ENTER_BASTION;
		case "THROW_PEARL":
			return THROW_PEARL;
		case "CHAT":
			return CHAT;
		case "PVP":
			return PVP;
		case "IGNITE":
			return IGNITE;
		case "USE_BUCKET":
			return USE_BUCKET;
		case "PLACE_WATER":
			return PLACE_WATER;
		case "PLACE_LAVA":
			return PLACE_LAVA;
		case "USE_POTIONS":
			return USE_POTIONS;
		case "USE_BED":
			return USE_BED;
		case "SUICIDE":
			return SUICIDE;
		case "SNITCH":
			return SNITCH;
		case "MINE":
			return MINE;
		case "BREW":
			return BREW;
		case "ENCHANT":
			return ENCHANT;
		
		default:
			return null;
		}
	}
}

@@ -125,16 +125,32 @@
 _RADIUS%22
+, %22pearl radius%22
 ),%0A%09DAMA
@@ -188,16 +188,43 @@
 RCEMENT%22
+, %22break reinforced blocks%22
 ),%0A%09DAMA
@@ -246,24 +246,48 @@
 AGE_BASTION%22
+, %22break bastion blocks%22
 ),%0A%09ENTER_BA
@@ -307,16 +307,40 @@
 BASTION%22
+, %22enter bastion fields%22
 ),%0A%09THRO
@@ -364,35 +364,98 @@
 ARL%22
-),%0A%09CHAT(%22CHAT%22),%0A%09PVP(%22PVP
+, %22throw ender pearls%22),%0A%09CHAT(%22CHAT%22, %22use local chat%22),%0A%09PVP(%22PVP%22, %22fight other players
 %22),%0A
@@ -470,16 +470,30 @@
 %22IGNITE%22
+, %22start fire%22
 ),%0A%09USE_
@@ -511,16 +511,31 @@
 _BUCKET%22
+, %22use buckets%22
 ),%0A%09PLAC
@@ -555,16 +555,31 @@
 E_WATER%22
+, %22place water%22
 ),%0A%09PLAC
@@ -597,16 +597,30 @@
 CE_LAVA%22
+, %22place lava%22
 ),%0A%09USE_
@@ -640,16 +640,31 @@
 POTIONS%22
+, %22use potions%22
 ),%0A%09USE_
@@ -676,16 +676,32 @@
 USE_BED%22
+, %22set your bed%22
 ),%0A%09SUIC
@@ -713,16 +713,34 @@
 SUICIDE%22
+, %22commit suicide%22
 ),%0A%09SNIT
@@ -754,37 +754,91 @@
 TCH%22
-),%0A%09MINE(%22MINE%22),%0A%09BREW(%22BREW
+, %22place snitches%22),%0A%09MINE(%22MINE%22, %22break blocks%22),%0A%09BREW(%22BREW%22, %22use brew potions
 %22),%0A
@@ -855,16 +855,33 @@
 ENCHANT%22
+, %22enchant items%22
 )%0A%09;%0A%09%0A%09
@@ -907,16 +907,50 @@
 g text;%0A
+%09private final String actionText;%0A
 %09%0A%09priva
@@ -975,24 +975,49 @@
  String text
+, final String actionText
 ) %7B%0A%09%09Guard.
@@ -1060,83 +1060,234 @@
 ;%0A%09%09
-%0A%09%09this.text = text;%0A%09%7D%0A%09%0A%09@Override%0A%09public String toString() %7B%0A%09%09return t
+Guard.ArgumentNotNullOrEmpty(actionText, %22actionText%22);%0A%09%09%0A%09%09this.text = text;%0A%09%09this.actionText = actionText;%0A%09%7D%0A%09%0A%09@Override%0A%09public String toString() %7B%0A%09%09return text;%0A%09%7D%0A%09%0A%09public String getActionString() %7B%0A%09%09return actionT
 ext;

Update rule texts