Skip to content

Commit

Permalink
Update dependencies and refactor key adapter registrations
Browse files Browse the repository at this point in the history
Upgraded 'net.thenextlvl.core:adapters' to version 2.0.1 in build.gradle.kts for better compatibility. Refactored 'MaterialAdapter' and 'KeyAdapter' registrations in GoPaintPlugin.java to use instance methods, improving code readability and maintainability.
  • Loading branch information
NonSwag committed Nov 27, 2024
1 parent 5f5221b commit d71e4ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {

implementation("org.bstats:bstats-bukkit:3.1.0")

api("net.thenextlvl.core:adapters:1.0.9")
api("net.thenextlvl.core:adapters:2.0.1")

api(project(":api"))

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public class GoPaintPlugin extends JavaPlugin implements GoPaintProvider {
new PluginConfig.AngleConfig(2, 5, 10, 40, 85),
new PluginConfig.FractureConfig(2, 5)
), new GsonBuilder()
.registerTypeAdapter(Material.class, MaterialAdapter.NotNull.INSTANCE)
.registerTypeAdapter(Key.class, KeyAdapter.Kyori.INSTANCE)
.registerTypeAdapter(Material.class, MaterialAdapter.instance())
.registerTypeAdapter(Key.class, KeyAdapter.kyori())
.setPrettyPrinting()
.create()
).validate().save();
Expand Down

0 comments on commit d71e4ae

Please sign in to comment.