MCPcopy Index your code
hub / github.com/PaperMC/Paper / serialize

Method serialize

paper-api/src/main/java/org/bukkit/Location.java:1185–1204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

getWorldMethod · 0.95
putMethod · 0.65
asStringMethod · 0.65
keyMethod · 0.65

Tested by

no test coverage detected