2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/JsonList.java
|
|
|
|
+++ b/net/minecraft/server/JsonList.java
|
2017-05-14 10:00:00 +08:00
|
|
|
@@ -84,7 +84,7 @@
|
2015-02-27 06:41:06 +08:00
|
|
|
|
|
|
|
public V get(K k0) {
|
|
|
|
this.h();
|
|
|
|
- return (JsonListEntry) this.d.get(this.a(k0));
|
|
|
|
+ return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
|
|
|
|
}
|
|
|
|
|
|
|
|
public void remove(K k0) {
|
2017-05-14 10:00:00 +08:00
|
|
|
@@ -102,6 +102,12 @@
|
2014-11-26 05:32:16 +08:00
|
|
|
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
|
|
|
|
}
|
2015-02-27 06:41:06 +08:00
|
|
|
|
2014-11-26 05:32:16 +08:00
|
|
|
+ // CraftBukkit start
|
2015-02-27 06:41:06 +08:00
|
|
|
+ public Collection<V> getValues() {
|
2014-11-26 05:32:16 +08:00
|
|
|
+ return this.d.values();
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2015-02-27 06:41:06 +08:00
|
|
|
+
|
2014-11-26 05:32:16 +08:00
|
|
|
public boolean isEmpty() {
|
|
|
|
return this.d.size() < 1;
|
|
|
|
}
|
2017-05-19 19:00:13 +08:00
|
|
|
@@ -178,7 +184,7 @@
|
|
|
|
JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
|
2014-11-26 05:32:16 +08:00
|
|
|
|
2017-05-19 19:00:13 +08:00
|
|
|
if (jsonlistentry.getKey() != null) {
|
|
|
|
- this.d.put(this.a(jsonlistentry.getKey()), jsonlistentry);
|
|
|
|
+ this.d.put(this.a((K) jsonlistentry.getKey()), (V) jsonlistentry); // CraftBukkit - fix decompile error
|
|
|
|
}
|
2015-02-27 06:41:06 +08:00
|
|
|
}
|
|
|
|
}
|
2017-05-19 19:00:13 +08:00
|
|
|
@@ -207,11 +213,11 @@
|
2015-02-27 06:41:06 +08:00
|
|
|
}
|
|
|
|
}
|
2014-11-26 05:32:16 +08:00
|
|
|
|
2015-02-27 06:41:06 +08:00
|
|
|
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
|
|
|
+ public JsonElement serialize(JsonListEntry<K> object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - fix decompile error
|
|
|
|
return this.a((JsonListEntry) object, type, jsonserializationcontext);
|
|
|
|
}
|
2014-11-26 05:32:16 +08:00
|
|
|
|
2015-02-27 06:41:06 +08:00
|
|
|
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
|
|
|
+ public JsonListEntry<K> deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - fix decompile error
|
|
|
|
return this.a(jsonelement, type, jsondeserializationcontext);
|
|
|
|
}
|
2014-11-26 05:32:16 +08:00
|
|
|
|