diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index f58c3502..3680e3e2 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -54,7 +54,7 @@ FLAG_FREEZE_INACTIVE = §caus FLAG_PROTECT_ACTIVE = §aan FLAG_PROTECT_INACTIVE = §caus FLAG_WATER_DESTROY = Wasserschaden -FLAG_PROJECTILE_STOPPER = Projektiel stopper +FLAG_PROJECTILE_STOPPER = Projektil stopper FLAG_WINDCHARGE_INTERACT = Windkugel interaktion FLAG_WATER_DESTROY_ALLOW = §cerlaubt FLAG_WATER_DESTROY_DENY = §aaus diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperCommand.java index 9ee3b4c5..752e5478 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperCommand.java @@ -23,19 +23,19 @@ import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.bausystem.region.flags.ProjectileStopperMode; -import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; @Linked public class ProjectileStopperCommand extends SWCommand { + public ProjectileStopperCommand() { super("projectilestopper"); } - @AbstractSWCommand.Register(description = "REGION_PROJECTILE_STOPPER_HELP") - public void toggleCommand(@AbstractSWCommand.Validator Player p) { + @Register(description = "REGION_PROJECTILE_STOPPER_HELP") + public void toggleCommand(@Validator Player p) { Region region = Region.getRegion(p.getLocation()); if (region.getRegionData().get(Flag.PROJECTILE_STOPPER).get() == ProjectileStopperMode.ENABLED) { region.getRegionData().set(Flag.PROJECTILE_STOPPER, ProjectileStopperMode.DISABLED); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperListener.java index 5e82cf2a..48a1ceeb 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProjectileStopperListener.java @@ -67,7 +67,6 @@ public class ProjectileStopperListener implements Listener, ScoreboardElement { private void addEntity(Entity entity) { Region region = Region.getRegion(entity.getLocation()); - projektileList.computeIfAbsent(region, key -> new HashSet<>()).add(entity); } @@ -75,10 +74,12 @@ public class ProjectileStopperListener implements Listener, ScoreboardElement { public ScoreboardGroup getGroup() { return ScoreboardGroup.REGION; } + @Override public int order() { return 2; } + @Override public String get(Region region, Player p) { if (region.getRegionData().get(Flag.PROJECTILE_STOPPER).is(ProjectileStopperMode.ENABLED)) return null; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeCommand.java index 3207528d..3b967251 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeCommand.java @@ -29,6 +29,7 @@ import org.bukkit.entity.Player; @Linked public class WindChargeInteractModeCommand extends SWCommand { + public WindChargeInteractModeCommand() { super("windchargeinteract"); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeListener.java index a2037f82..c918463e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeListener.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/region/WindChargeInteractModeListener.java @@ -45,10 +45,12 @@ public class WindChargeInteractModeListener implements Listener, ScoreboardEleme public ScoreboardGroup getGroup() { return ScoreboardGroup.REGION; } + @Override public int order() { return 2; } + @Override public String get(Region region, Player p) { if (region.getRegionData().get(Flag.WIND_CHARGE_INTERACT).is(WindChargeInteractMode.ALLOW)) return null;