flewkey
/
mc.2a03.party
Archived
1
0
Fork 0
This repository has been archived on 2020-06-16. You can view files and clone it, but cannot push or open issues or pull requests.
mc.2a03.party/src/party/_2a03/mc/server/PlayerData.java

34 lines
655 B
Java
Raw Normal View History

2019-06-05 16:44:16 +00:00
package party._2a03.mc.server;
2019-05-27 06:14:20 +00:00
import org.json.JSONArray;
import org.json.JSONObject;
2019-06-05 16:44:16 +00:00
import party._2a03.mc.server.PlayerPosition;
2019-05-27 06:14:20 +00:00
public class PlayerData {
2019-06-02 02:53:35 +00:00
private String uuid;
private PlayerPosition home;
2019-05-27 06:14:20 +00:00
2019-06-02 02:53:35 +00:00
public PlayerData(String p_uuid, PlayerPosition p_home) {
this.uuid = p_uuid;
this.home = p_home;
2019-05-27 06:14:20 +00:00
}
2019-06-01 03:39:51 +00:00
2019-05-27 06:14:20 +00:00
public PlayerPosition getHome() {
2019-06-02 02:53:35 +00:00
return this.home;
2019-05-27 06:14:20 +00:00
}
2019-06-01 03:39:51 +00:00
2019-05-27 06:14:20 +00:00
public String getUUID() {
2019-06-02 02:53:35 +00:00
return this.uuid;
2019-05-27 06:14:20 +00:00
}
2019-06-01 03:39:51 +00:00
2019-05-27 06:14:20 +00:00
public void setHome(PlayerPosition location) {
2019-06-02 02:53:35 +00:00
this.home = location;
}
public JSONObject getJSON() {
JSONObject json = new JSONObject();
json.put("uuid", uuid);
json.put("home", home.getJSON());
return json;
2019-05-27 06:14:20 +00:00
}
}