simplified toString method

This commit is contained in:
yato
2014-11-10 14:04:43 +01:00
parent 86abc4177e
commit 07b6b2e8a6
5 changed files with 5 additions and 89 deletions

View File

@@ -6,22 +6,7 @@ public enum Armor {
@Override
public String toString() {
String s = "";
switch (this) {
case CLOTHES:
s = "clothes";
break;
case LEATHER:
s = "leather armor";
break;
case CHAIN_MAIL:
s = "chain mail";
break;
case PLATE_MAIL:
s = "plate mail";
break;
}
return s;
return name().toLowerCase();
}
}