1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
--- a/net/minecraft/server/JsonList.java
+++ b/net/minecraft/server/JsonList.java
@@ -86,7 +86,7 @@
@Nullable
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) {
@@ -108,6 +108,12 @@
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
}
+ // CraftBukkit start
+ public Collection<V> getValues() {
+ return this.d.values();
+ }
+ // CraftBukkit end
+
public boolean isEmpty() {
return this.d.size() < 1;
}
@@ -137,7 +143,7 @@
while (iterator.hasNext()) {
Object object = iterator.next();
- this.d.remove(this.a(object));
+ this.d.remove(this.a((K) object)); // CraftBukkit - decompile error
}
}
@@ -180,7 +186,7 @@
JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
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
}
}
}
@@ -212,11 +218,11 @@
}
}
- 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);
}
- 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);
}
|