Alles, was Claude Kot vergessen hat
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package de.blight.common;
|
||||
|
||||
public enum ModelCategory {
|
||||
NONE("Keines"),
|
||||
TREE("Baum"),
|
||||
PALM("Palme"),
|
||||
BUILDING("Gebäude"),
|
||||
BUSH("Busch");
|
||||
|
||||
private final String label;
|
||||
|
||||
ModelCategory(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getLabel() { return label; }
|
||||
|
||||
public static ModelCategory fromString(String s) {
|
||||
if (s == null || s.isBlank()) return NONE;
|
||||
try { return valueOf(s); }
|
||||
catch (IllegalArgumentException e) { return NONE; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user