()
| 1183 | } |
| 1184 | |
| 1185 | @Override |
| 1186 | @Utility |
| 1187 | @NotNull |
| 1188 | public Map<String, Object> serialize() { |
| 1189 | Map<String, Object> data = new HashMap<>(); |
| 1190 | |
| 1191 | World world = this.getWorld(); |
| 1192 | if (world != null) { |
| 1193 | data.put("world_key", world.key().asString()); |
| 1194 | } |
| 1195 | |
| 1196 | data.put("x", this.x); |
| 1197 | data.put("y", this.y); |
| 1198 | data.put("z", this.z); |
| 1199 | |
| 1200 | data.put("yaw", this.yaw); |
| 1201 | data.put("pitch", this.pitch); |
| 1202 | |
| 1203 | return data; |
| 1204 | } |
| 1205 | |
| 1206 | /** |
| 1207 | * Required method for deserialization |