Skip to content

Commit 5595ce0

Browse files
author
david
committed
Refactor brush classes by adjusting imports and constructors.
Reorganized imports in `CraftBrushRegistry` and refactored `CraftBrushController` to replace the `@RequiredArgsConstructor` annotation with an explicit constructor. These changes improve code clarity and maintainability.
1 parent 914d346 commit 5595ce0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/net/thenextlvl/gopaint/brush/CraftBrushController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package net.thenextlvl.gopaint.brush;
2020

21-
import lombok.RequiredArgsConstructor;
2221
import net.kyori.adventure.key.Key;
2322
import net.thenextlvl.gopaint.GoPaintPlugin;
2423
import net.thenextlvl.gopaint.api.brush.BrushController;
@@ -43,11 +42,14 @@
4342
import java.util.UUID;
4443

4544
@NullMarked
46-
@RequiredArgsConstructor
4745
public class CraftBrushController implements BrushController {
4846
private final Map<UUID, PlayerBrushSettings> playerBrushes = new HashMap<>();
4947
private final GoPaintPlugin plugin;
5048

49+
public CraftBrushController(GoPaintPlugin plugin) {
50+
this.plugin = plugin;
51+
}
52+
5153
@Override
5254
public PlayerBrushSettings getBrushSettings(Player player) {
5355
return playerBrushes.computeIfAbsent(player.getUniqueId(), ignored ->

src/main/java/net/thenextlvl/gopaint/brush/CraftBrushRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import com.google.common.base.Preconditions;
44
import net.kyori.adventure.key.Key;
55
import net.thenextlvl.gopaint.GoPaintPlugin;
6-
import net.thenextlvl.gopaint.api.brush.PatternBrush;
76
import net.thenextlvl.gopaint.api.brush.BrushRegistry;
7+
import net.thenextlvl.gopaint.api.brush.PatternBrush;
88
import net.thenextlvl.gopaint.brush.standard.*;
99
import org.jspecify.annotations.NullMarked;
1010

0 commit comments

Comments
 (0)