package com.untamedears.mustercull;

/**
 * The method used to cull the mobs
 * @author Celdecea
 */
enum CullType {
	
	/**
	 * Uses Bukkit events to deny a spawn.
	 */
	SPAWN,

	/**
	 * Uses Bukkit events to prevent a spawner from operating.
	 */
	SPAWNER,

	/**
	 * Uses damage on mobs in crowded chunks.
	 */
	DAMAGE;
	
	/**
	 * Returns a CullType representing the name provided.
	 * @param name A case-sensitive name to compare to.
	 * @return The CullType representing the name provided.
	 */
	public static CullType fromName(String name) {
		
		if (name == null) {
			return null;
		}
		
		name = name.trim();
		
		for (CullType culling : values()) {
			if (0 == name.compareToIgnoreCase(culling.name())) {
				return culling;
			}
		}
		
		return null;
	}	
}


@@ -424,16 +424,18 @@
  A case-
+in
 sensitiv
@@ -508,24 +508,33 @@
 ame provided
+, or null
 .%0D%0A%09 */%0D%0A%09pu
@@ -623,16 +623,16 @@
  null;%0D%0A
+
 %09%09%7D%0D%0A%09%09%0D
@@ -636,35 +636,8 @@
 %09%09%0D%0A
-%09%09name = name.trim();%0D%0A%09%09%0D%0A
 %09%09fo

Comment fix and removed trim() because it is really not this method's job.