Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/items/FurnitureType.java

39 lines
813 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.items;
2019-05-26 20:14:53 +02:00
public enum FurnitureType {
2018-07-06 15:30:00 +02:00
FLOOR("S"),
WALL("I"),
EFFECT("E"),
BADGE("B"),
ROBOT("R"),
HABBO_CLUB("H"),
PET("P");
public final String code;
2019-05-26 20:14:53 +02:00
FurnitureType(String code) {
2018-07-06 15:30:00 +02:00
this.code = code;
}
2019-05-26 20:14:53 +02:00
public static FurnitureType fromString(String code) {
switch (code.toUpperCase()) {
2018-07-06 15:30:00 +02:00
case "S":
return FLOOR;
case "I":
return WALL;
case "E":
return EFFECT;
case "B":
return BADGE;
case "R":
return ROBOT;
case "H":
return HABBO_CLUB;
case "P":
return PET;
default:
return FLOOR;
}
}
}