Skip to content

Commit

Permalink
1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamesuta committed May 5, 2021
1 parent 6f99f76 commit 01eef4c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.kunmc.lab</groupId>
<artifactId>vplayerplugin</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.5-1.15.2-SNAPSHOT</version>
<packaging>jar</packaging>

<name>VPlayerPlugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@ public void write(JsonWriter out, World.Environment value) throws IOException {
@Override
public World.Environment read(JsonReader in) throws IOException {
in.beginObject();
in.nextName();
int id = in.nextInt();
String name = null;
int id = 0;
while (in.hasNext()) {
String type = in.nextName();
switch (type) {
case "name":
name = in.nextString();
break;
case "id":
id = in.nextInt();
break;
}
}
in.endObject();
return World.Environment.getEnvironment(id);
}
Expand Down

0 comments on commit 01eef4c

Please sign in to comment.