SteamWar/FightSystem
Archiviert
13
1

Fix piston listener #254

Manuell gemergt
Lixfel hat 1 Commits von fix_pistons nach master 2021-04-09 16:07:05 +02:00 zusammengeführt

Datei anzeigen

@ -41,7 +41,7 @@ public class PistonListener implements Listener {
public void handlePistonExtend(BlockPistonExtendEvent e){ public void handlePistonExtend(BlockPistonExtendEvent e){
BlockFace b = e.getDirection().getOppositeFace(); BlockFace b = e.getDirection().getOppositeFace();
for(Block block : e.getBlocks()){ for(Block block : e.getBlocks()){
if(Config.BlueExtendRegion.inRegion(block.getRelative(b)) && Config.RedExtendRegion.inRegion(block.getRelative(b))){ if(!Config.BlueExtendRegion.inRegion(block.getRelative(b)) && !Config.RedExtendRegion.inRegion(block.getRelative(b))){
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
@ -52,7 +52,7 @@ public class PistonListener implements Listener {
public void handlePistonRetract(BlockPistonRetractEvent e){ public void handlePistonRetract(BlockPistonRetractEvent e){
BlockFace b = e.getDirection().getOppositeFace(); BlockFace b = e.getDirection().getOppositeFace();
for(Block block : e.getBlocks()){ for(Block block : e.getBlocks()){
if(Config.BlueExtendRegion.inRegion(block.getRelative(b)) && Config.RedExtendRegion.inRegion(block.getRelative(b))) { if(!Config.BlueExtendRegion.inRegion(block.getRelative(b)) && !Config.RedExtendRegion.inRegion(block.getRelative(b))) {
e.setCancelled(true); e.setCancelled(true);
return; return;
} }