Skip to content

Commit

Permalink
Race class.
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Mar 21, 2012
1 parent a304dfc commit b4925b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/net/celestiusmc/celestiussides/Race.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
package net.celestiusmc.celestiussides;

/**
*
* @author simplyianm
* Represents a race.
*/
public enum Race {
HUMAN,
XIYAD,
BLACK_GUY;

public static Race fromString(String name) {
name = name.toUpperCase().replace(' ', '_').replace('-', '_');
try {
return Race.valueOf(name);
} catch (Exception ex) {
return null;
}
}

}

0 comments on commit b4925b2

Please sign in to comment.