Skip to content

Commit 53f7ab0

Browse files
committed
Refactored adapter registrations in config setup
Replaced deprecated methods with updated adapter instances for `Location`, `Material`, and `World`.
1 parent f6be954 commit 53f7ab0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/net/thenextlvl/tweaks/TweaksPlugin.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ private void initConfigs() {
282282
this.config = new GsonFile<>(
283283
IO.of(getDataFolder(), "config.json"),
284284
new PluginConfig(), new GsonBuilder()
285-
.registerTypeHierarchyAdapter(Location.class, LocationAdapter.simple())
286-
.registerTypeHierarchyAdapter(Material.class, MaterialAdapter.instance())
287-
.registerTypeHierarchyAdapter(World.class, WorldAdapter.key())
285+
.registerTypeHierarchyAdapter(Location.class, new LocationAdapter.Simple())
286+
.registerTypeHierarchyAdapter(Material.class, new MaterialAdapter())
287+
.registerTypeHierarchyAdapter(World.class, new WorldAdapter.Key())
288288
.setPrettyPrinting()
289289
.serializeNulls()
290290
.create()

0 commit comments

Comments
 (0)