Skip to content

Commit 4d083d4

Browse files
author
david
committed
Remove Lombok @requiredargsconstructor from listeners
Replaced Lombok's @requiredargsconstructor with explicit constructors in all listener classes. This change improves clarity and ensures consistency in code structure.
1 parent ba96157 commit 4d083d4

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

src/main/java/net/thenextlvl/gopaint/listener/ConnectListener.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.listener;
2020

21-
import lombok.RequiredArgsConstructor;
2221
import net.thenextlvl.gopaint.GoPaintPlugin;
2322
import org.bukkit.event.EventHandler;
2423
import org.bukkit.event.EventPriority;
@@ -27,10 +26,13 @@
2726
import org.jspecify.annotations.NullMarked;
2827

2928
@NullMarked
30-
@RequiredArgsConstructor
3129
public class ConnectListener implements Listener {
3230
private final GoPaintPlugin plugin;
3331

32+
public ConnectListener(GoPaintPlugin plugin) {
33+
this.plugin = plugin;
34+
}
35+
3436
@EventHandler(priority = EventPriority.LOWEST)
3537
public void onPlayerQuit(PlayerQuitEvent event) {
3638
plugin.brushController().removeBrushSettings(event.getPlayer());

src/main/java/net/thenextlvl/gopaint/listener/InteractListener.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.sk89q.worldedit.bukkit.BukkitPlayer;
2525
import com.sk89q.worldedit.function.mask.MaskIntersection;
2626
import com.sk89q.worldedit.session.request.Request;
27-
import lombok.RequiredArgsConstructor;
2827
import net.thenextlvl.gopaint.GoPaintPlugin;
2928
import net.thenextlvl.gopaint.api.brush.setting.BrushSettings;
3029
import net.thenextlvl.gopaint.api.brush.setting.PlayerBrushSettings;
@@ -36,10 +35,13 @@
3635
import org.jspecify.annotations.NullMarked;
3736

3837
@NullMarked
39-
@RequiredArgsConstructor
4038
public final class InteractListener implements Listener {
4139
private final GoPaintPlugin plugin;
4240

41+
public InteractListener(GoPaintPlugin plugin) {
42+
this.plugin = plugin;
43+
}
44+
4345
@EventHandler(priority = EventPriority.LOWEST)
4446
public void onClick(PlayerInteractEvent event) {
4547
var player = event.getPlayer();

src/main/java/net/thenextlvl/gopaint/listener/InventoryListener.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,17 @@
1818
*/
1919
package net.thenextlvl.gopaint.listener;
2020

21-
import lombok.RequiredArgsConstructor;
2221
import net.thenextlvl.gopaint.GoPaintPlugin;
2322
import net.thenextlvl.gopaint.api.model.SurfaceMode;
24-
import net.thenextlvl.gopaint.brush.standard.*;
23+
import net.thenextlvl.gopaint.brush.standard.AngleBrush;
24+
import net.thenextlvl.gopaint.brush.standard.DiskBrush;
25+
import net.thenextlvl.gopaint.brush.standard.FractureBrush;
26+
import net.thenextlvl.gopaint.brush.standard.GradientBrush;
27+
import net.thenextlvl.gopaint.brush.standard.OverlayBrush;
28+
import net.thenextlvl.gopaint.brush.standard.PaintBrush;
29+
import net.thenextlvl.gopaint.brush.standard.SplatterBrush;
30+
import net.thenextlvl.gopaint.brush.standard.SprayBrush;
31+
import net.thenextlvl.gopaint.brush.standard.UnderlayBrush;
2532
import net.thenextlvl.gopaint.menu.MainMenu;
2633
import org.bukkit.Axis;
2734
import org.bukkit.entity.Player;
@@ -34,10 +41,13 @@
3441
import org.jspecify.annotations.NullMarked;
3542

3643
@NullMarked
37-
@RequiredArgsConstructor
3844
public final class InventoryListener implements Listener {
3945
private final GoPaintPlugin plugin;
4046

47+
public InventoryListener(GoPaintPlugin plugin) {
48+
this.plugin = plugin;
49+
}
50+
4151
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
4252
public void menuClick(InventoryClickEvent event) {
4353
if (!(event.getWhoClicked() instanceof Player player)) {

0 commit comments

Comments
 (0)