diff options
Diffstat (limited to 'nms-patches/UserCache.patch')
-rw-r--r-- | nms-patches/UserCache.patch | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/nms-patches/UserCache.patch b/nms-patches/UserCache.patch index a91279c6..8883cde8 100644 --- a/nms-patches/UserCache.patch +++ b/nms-patches/UserCache.patch @@ -9,17 +9,30 @@ private final GameProfileRepository g; protected final Gson b; private final File h; -@@ -330,11 +330,11 @@ - } - } +@@ -69,7 +69,7 @@ + this.h = file; + GsonBuilder gsonbuilder = new GsonBuilder(); -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -+ public JsonElement serialize(UserCacheEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - decompile error - return this.a((UserCache.UserCacheEntry) object, type, jsonserializationcontext); +- gsonbuilder.registerTypeHierarchyAdapter(UserCache.UserCacheEntry.class, new UserCache.BanEntrySerializer(null)); ++ gsonbuilder.registerTypeHierarchyAdapter(UserCache.UserCacheEntry.class, new UserCache.BanEntrySerializer()); // CraftBukkit - decompile error + this.b = gsonbuilder.create(); + this.b(); + } +@@ -120,7 +120,7 @@ + date = calendar.getTime(); } -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -+ public UserCacheEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - decompile error - return this.a(jsonelement, type, jsondeserializationcontext); - } +- UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date, null); ++ UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); // CraftBukkit - decompile error + + if (this.e.containsKey(uuid)) { + UserCache.UserCacheEntry usercache_usercacheentry1 = (UserCache.UserCacheEntry) this.e.get(uuid); +@@ -314,7 +314,7 @@ + return null; + } +- return UserCache.this.new UserCacheEntry(new GameProfile(uuid, s1), date, null); ++ return UserCache.this.new UserCacheEntry(new GameProfile(uuid, s1), date); // CraftBukkit - decompile error + } else { + return null; + } |