Skip to content

Commit 4aeb633

Browse files
author
david
committed
Remove Lombok annotations and add explicit getter methods
Lombok's `@Getter` and `@Accessors` annotations were removed for clarity and explicit control of code. Corresponding explicit getter methods were added to maintain access to class properties while improving code readability and maintainability.
1 parent bbd95d9 commit 4aeb633

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import core.io.IO;
88
import core.paper.adapters.inventory.MaterialAdapter;
99
import core.paper.adapters.key.KeyAdapter;
10-
import lombok.Getter;
11-
import lombok.experimental.Accessors;
1210
import net.kyori.adventure.key.Key;
1311
import net.kyori.adventure.text.minimessage.MiniMessage;
1412
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
@@ -40,11 +38,9 @@
4038
import java.util.Set;
4139

4240
@NullMarked
43-
@Accessors(fluent = true)
4441
public class GoPaintPlugin extends JavaPlugin implements GoPaintProvider {
45-
4642
private final File translations = new File(getDataFolder(), "translations");
47-
private final @Getter ComponentBundle bundle = new ComponentBundle(translations, audience ->
43+
private final ComponentBundle bundle = new ComponentBundle(translations, audience ->
4844
audience instanceof Player player ? player.locale() : Locale.US)
4945
.register("messages", Locale.US)
5046
.register("messages_german", Locale.GERMANY)
@@ -53,8 +49,8 @@ public class GoPaintPlugin extends JavaPlugin implements GoPaintProvider {
5349
Placeholder.component("prefix", bundle.component(Locale.US, "prefix"))
5450
)).build());
5551

56-
private final @Getter BrushController brushController = new CraftBrushController(this);
57-
private final @Getter BrushRegistry brushRegistry = new CraftBrushRegistry(this);
52+
private final BrushController brushController = new CraftBrushController(this);
53+
private final BrushRegistry brushRegistry = new CraftBrushRegistry(this);
5854

5955
private final FileIO<PluginConfig> configFile = new GsonFile<>(IO.of(getDataFolder(), "config.json"), new PluginConfig(
6056
new PluginConfig.BrushConfig(Material.FEATHER, Key.key("gopaint", "sphere_brush"), 100, 10, 50,
@@ -116,4 +112,16 @@ private void registerCommands() {
116112
public PluginConfig config() {
117113
return configFile.getRoot();
118114
}
115+
116+
public ComponentBundle bundle() {
117+
return this.bundle;
118+
}
119+
120+
public BrushController brushController() {
121+
return this.brushController;
122+
}
123+
124+
public BrushRegistry brushRegistry() {
125+
return this.brushRegistry;
126+
}
119127
}

0 commit comments

Comments
 (0)