Skip to content

Commit ba96157

Browse files
author
david
committed
Replace @requiredargsconstructor with explicit constructor
The @requiredargsconstructor annotation was removed, and an explicit constructor was added for GoPaintCommand. This change makes the dependency injection more explicit and improves code clarity.
1 parent 5595ce0 commit ba96157

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/net/thenextlvl/gopaint/command/GoPaintCommand.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import io.papermc.paper.command.brigadier.Commands;
88
import io.papermc.paper.command.brigadier.argument.ArgumentTypes;
99
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
10-
import lombok.RequiredArgsConstructor;
1110
import net.kyori.adventure.key.Key;
1211
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
1312
import net.thenextlvl.gopaint.GoPaintPlugin;
@@ -20,10 +19,13 @@
2019
import java.util.List;
2120

2221
@NullMarked
23-
@RequiredArgsConstructor
2422
public class GoPaintCommand {
2523
private final GoPaintPlugin plugin;
2624

25+
public GoPaintCommand(GoPaintPlugin plugin) {
26+
this.plugin = plugin;
27+
}
28+
2729
public void register() {
2830
var command = Commands.literal("gopaint")
2931
.requires(stack -> stack.getSender().hasPermission(GoPaintProvider.USE_PERMISSION))

0 commit comments

Comments
 (0)