forked from SteamWar/SteamWar
Fix Pull Request comment
This commit is contained in:
@@ -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
|
||||
|
||||
+3
-3
@@ -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);
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
+1
@@ -29,6 +29,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
@Linked
|
||||
public class WindChargeInteractModeCommand extends SWCommand {
|
||||
|
||||
public WindChargeInteractModeCommand() {
|
||||
super("windchargeinteract");
|
||||
}
|
||||
|
||||
+2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user