From e3dbc6b8497301ea56d5c4d3b0913f9a04833608 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Fri, 22 May 2020 01:38:40 +0200 Subject: [PATCH] Refactoring --- .../Minepacks/Bukkit/Listener/MinepacksListener.java | 8 +++----- .../Bukkit/Listener/WorldBlacklistUpdater.java | 11 +++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/MinepacksListener.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/MinepacksListener.java index c9eedc8..9b0ed0f 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/MinepacksListener.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/MinepacksListener.java @@ -21,12 +21,10 @@ import org.bukkit.event.Listener; +import lombok.AllArgsConstructor; + +@AllArgsConstructor abstract class MinepacksListener implements Listener { protected final Minepacks plugin; - - protected MinepacksListener(Minepacks plugin) - { - this.plugin = plugin; - } } \ No newline at end of file diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/WorldBlacklistUpdater.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/WorldBlacklistUpdater.java index 32bbac5..abb584d 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/WorldBlacklistUpdater.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/WorldBlacklistUpdater.java @@ -20,18 +20,17 @@ import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; import org.bukkit.event.world.WorldInitEvent; import org.jetbrains.annotations.NotNull; -import lombok.AllArgsConstructor; - import java.util.Locale; -@AllArgsConstructor -public class WorldBlacklistUpdater implements Listener +public class WorldBlacklistUpdater extends MinepacksListener { - private final @NotNull Minepacks plugin; + public WorldBlacklistUpdater(final @NotNull Minepacks plugin) + { + super(plugin); + } @EventHandler public void onWorldInit(final WorldInitEvent event)