Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/wired/WiredMatchFurniSetting.java

28 lines
768 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.wired;
2019-05-26 20:14:53 +02:00
public class WiredMatchFurniSetting {
2020-11-16 12:12:24 +01:00
public final int item_id;
2018-07-06 15:30:00 +02:00
public final String state;
public final int rotation;
public final int x;
public final int y;
2019-05-26 20:14:53 +02:00
public WiredMatchFurniSetting(int itemId, String state, int rotation, int x, int y) {
2020-11-16 12:12:24 +01:00
this.item_id = itemId;
2018-07-06 15:30:00 +02:00
this.state = state.replace("\t\t\t", " ");
this.rotation = rotation;
this.x = x;
this.y = y;
}
@Override
2019-05-26 20:14:53 +02:00
public String toString() {
2018-07-06 15:30:00 +02:00
return this.toString(true);
}
2019-05-26 20:14:53 +02:00
public String toString(boolean includeState) {
2020-11-16 12:12:24 +01:00
return this.item_id + "-" + (this.state.isEmpty() || !includeState ? " " : this.state) + "-" + this.rotation + "-" + this.x + "-" + this.y;
2018-07-06 15:30:00 +02:00
}
}