From 4a646e6be0b63ffe952b066106727c28f8c50c0c Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 23 Apr 2026 12:09:17 +0200 Subject: [PATCH] Improve WindchargeStopper --- .../steamwar/fightsystem/listener/WindchargeStopper21.java | 4 ++-- .../steamwar/fightsystem/listener/WindchargeStopper8.java | 4 ---- .../de/steamwar/fightsystem/listener/WindchargeStopper.java | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/listener/WindchargeStopper21.java b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/listener/WindchargeStopper21.java index 90ae8a54..892312f6 100644 --- a/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/listener/WindchargeStopper21.java +++ b/FightSystem/FightSystem_21/src/de/steamwar/fightsystem/listener/WindchargeStopper21.java @@ -26,8 +26,8 @@ import net.minecraft.world.entity.projectile.windcharge.WindCharge; import org.bukkit.Location; public class WindchargeStopper21 implements WindchargeStopper.IWindchargeStopper { - @Override - public void init() { + + public WindchargeStopper21() { new StateDependentTask(true, FightState.Running, this::run, 1, 1); } diff --git a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/listener/WindchargeStopper8.java b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/listener/WindchargeStopper8.java index c8863680..74f769c5 100644 --- a/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/listener/WindchargeStopper8.java +++ b/FightSystem/FightSystem_8/src/de/steamwar/fightsystem/listener/WindchargeStopper8.java @@ -20,8 +20,4 @@ package de.steamwar.fightsystem.listener; public class WindchargeStopper8 implements WindchargeStopper.IWindchargeStopper { - @Override - public void init() { - - } } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WindchargeStopper.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WindchargeStopper.java index d0301006..0218f58d 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WindchargeStopper.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/WindchargeStopper.java @@ -25,13 +25,11 @@ import de.steamwar.linkage.Linked; @Linked public class WindchargeStopper { - private static final IWindchargeStopper impl = VersionDependent.getVersionImpl(FightSystem.getPlugin()); - public WindchargeStopper() { - impl.init(); + static { + VersionDependent.getVersionImpl(FightSystem.getPlugin()); } public interface IWindchargeStopper { - void init(); } }