mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
fix: make World Gson-safe
This commit is contained in:
10 files changed
+115
-94
No files matched your search
+4
-1
@@ -19,6 +19,7 @@
|
||||
|
||||
package net.william278.huskhomes.network;
|
||||
|
||||
import com.fatboyindustrial.gsonjavatime.Converters;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import net.william278.huskhomes.position.Position;
|
||||
@@ -89,7 +90,9 @@ public class MessageSerializationTests {
|
||||
|
||||
@NotNull
|
||||
private static Gson createGson() {
|
||||
return new GsonBuilder().create();
|
||||
return Converters.registerOffsetDateTime(new GsonBuilder()
|
||||
.excludeFieldsWithoutExposeAnnotation()
|
||||
).create();
|
||||
}
|
||||
|
||||
private static Stream<Arguments> provideMessages() {
|
||||
|
||||
Reference in new issue
Block a user