mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-12-02 08:48:00 +01:00
24 lines
486 B
Java
24 lines
486 B
Java
|
package com.minelittlepony.minelp;
|
||
|
|
||
|
public enum PonyLevel {
|
||
|
PONIES,
|
||
|
HUMANS,
|
||
|
MIXED;
|
||
|
|
||
|
private static final PonyLevel[] oldValues = { HUMANS, MIXED, PONIES };
|
||
|
|
||
|
public static PonyLevel parse(int intValue) {
|
||
|
if (intValue < 0)
|
||
|
intValue = 0;
|
||
|
if (intValue > 2)
|
||
|
intValue = 2;
|
||
|
// it's an old value
|
||
|
return oldValues[intValue];
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return name().toString();
|
||
|
}
|
||
|
}
|