Skip to content

Commit

Permalink
Update all references to 'schema' to be 'rank_schema'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Martin committed May 10, 2024
1 parent 482c8c5 commit bf06331
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Session session() {
new MCLoaderMatchPlayer(
player_uuid,
entryObject.get("username").getAsString(),
entryObject.get("schema").getAsString(),
entryObject.get("rank_schema").getAsString(),
DefaultRankResolver.New().resolve(entryObject.get("rank_schema").getAsJsonObject())
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protected DefaultRankResolver() {}

@Override
public IPlayerRank resolve(JsonObject object) throws IllegalStateException {
String schema = object.get("schema").getAsString();
String schema = object.get("rank_schema").getAsString();

if(schema.equals(RandomizedPlayerRank.schema()))
return RandomizedPlayerRank.New();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public String schemaName() {
@Override
public JsonObject toJSON() {
JsonObject object = new JsonObject();
object.add("schema", new JsonPrimitive(this.schemaName()));
object.add("rank_schema", new JsonPrimitive(this.schemaName()));
object.add("mu", new JsonPrimitive(this.mu));
object.add("sigma", new JsonPrimitive(this.sigma));
return object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String schemaName() {
@Override
public JsonObject toJSON() {
JsonObject object = new JsonObject();
object.add("schema", new JsonPrimitive(this.schemaName()));
object.add("rank_schema", new JsonPrimitive(this.schemaName()));
return object;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public String schemaName() {
@Override
public JsonObject toJSON() {
JsonObject object = new JsonObject();
object.add("schema", new JsonPrimitive(this.schemaName()));
object.add("rank_schema", new JsonPrimitive(this.schemaName()));
object.add("wins", new JsonPrimitive(this.wins));
object.add("losses", new JsonPrimitive(this.losses));
return object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public String schemaName() {
@Override
public JsonObject toJSON() {
JsonObject object = new JsonObject();
object.add("schema", new JsonPrimitive(this.schemaName()));
object.add("rank_schema", new JsonPrimitive(this.schemaName()));
object.add("wins", new JsonPrimitive(this.wins));
object.add("losses", new JsonPrimitive(this.losses));
object.add("ties", new JsonPrimitive(this.ties));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public JsonObject toJSON() {

playerObject.add("uuid", new JsonPrimitive(matchPlayer.player().uuid().toString()));
playerObject.add("username", new JsonPrimitive(matchPlayer.player().username()));
playerObject.add("schema", new JsonPrimitive(matchPlayer.gameRank().schemaName()));
playerObject.add("rank_schema", new JsonPrimitive(matchPlayer.gameRank().schemaName()));
playerObject.add("rank", matchPlayer.gameRank().toJSON());

array.add(playerObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protected DefaultRankResolver() {}

@Override
public IPlayerRank resolve(JsonObject object) throws IllegalStateException {
String schema = object.get("schema").getAsString();
String schema = object.get("rank_schema").getAsString();

if(schema.equals(RandomizedPlayerRank.schema()))
return RandomizedPlayerRank.New();
Expand Down

0 comments on commit bf06331

Please sign in to comment.