Fix ArrowStopper #281
@ -21,7 +21,6 @@ package de.steamwar.fightsystem.listener;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import de.steamwar.fightsystem.states.StateDependentTask;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -29,17 +28,15 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class ArrowStopper implements Listener {
|
||||
public class ArrowStopper {
|
||||
|
||||
private static final Vector NULL_VECTOR = new Vector(0, 0, 0);
|
||||
private static final BlockFace[] BLOCK_FACES = {BlockFace.UP, BlockFace.DOWN, BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH};
|
||||
|
||||
public ArrowStopper() {
|
||||
new StateDependentListener(Config.TechhiderActive, FightState.Running, this);
|
||||
new StateDependentTask(Config.TechhiderActive, FightState.Running, this::run, 1, 1);
|
||||
}
|
||||
|
||||
@ -85,7 +82,7 @@ public class ArrowStopper implements Listener {
|
||||
}
|
||||
|
||||
private boolean checkBlock(Block block) {
|
||||
return Config.HiddenBlocks.contains(block.getType().name());
|
||||
return Config.HiddenBlocks.contains(block.getType().name().toLowerCase());
|
||||
}
|
||||
|
||||
private boolean invalidEntity(Arrow entity) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren