aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/server/players/JsonList.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/server/players/JsonList.patch')
-rw-r--r--patch-remap/og/net/minecraft/server/players/JsonList.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/server/players/JsonList.patch b/patch-remap/og/net/minecraft/server/players/JsonList.patch
new file mode 100644
index 0000000000..5b359f8e02
--- /dev/null
+++ b/patch-remap/og/net/minecraft/server/players/JsonList.patch
@@ -0,0 +1,52 @@
+--- a/net/minecraft/server/players/JsonList.java
++++ b/net/minecraft/server/players/JsonList.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.server.players;
+
+ import com.google.common.collect.Lists;
+@@ -54,7 +55,7 @@
+ @Nullable
+ public V get(K k0) {
+ this.removeExpired();
+- return (JsonListEntry) this.map.get(this.getKeyForUser(k0));
++ return (V) this.map.get(this.getKeyForUser(k0)); // CraftBukkit - fix decompile error
+ }
+
+ public void remove(K k0) {
+@@ -93,7 +94,7 @@
+ Iterator iterator = this.map.values().iterator();
+
+ while (iterator.hasNext()) {
+- V v0 = (JsonListEntry) iterator.next();
++ V v0 = (V) iterator.next(); // CraftBukkit - decompile error
+
+ if (v0.hasExpired()) {
+ list.add(v0.getUser());
+@@ -103,7 +104,7 @@
+ iterator = list.iterator();
+
+ while (iterator.hasNext()) {
+- K k0 = iterator.next();
++ K k0 = (K) iterator.next(); // CraftBukkit - decompile error
+
+ this.map.remove(this.getKeyForUser(k0));
+ }
+@@ -118,7 +119,7 @@
+
+ public void save() throws IOException {
+ JsonArray jsonarray = new JsonArray();
+- Stream stream = this.map.values().stream().map((jsonlistentry) -> {
++ Stream<JsonObject> stream = this.map.values().stream().map((jsonlistentry) -> { // CraftBukkit - decompile error
+ JsonObject jsonobject = new JsonObject();
+
+ Objects.requireNonNull(jsonlistentry);
+@@ -171,7 +172,7 @@
+ JsonListEntry<K> jsonlistentry = this.createEntry(jsonobject);
+
+ if (jsonlistentry.getUser() != null) {
+- this.map.put(this.getKeyForUser(jsonlistentry.getUser()), jsonlistentry);
++ this.map.put(this.getKeyForUser(jsonlistentry.getUser()), (V) jsonlistentry); // CraftBukkit - decompile error
+ }
+ }
+ } catch (Throwable throwable) {