Fix players getting out of the Duels arena

This commit is contained in:
Sam 2018-07-20 23:15:38 +01:00 committed by Alexander Meech
parent cff9b1749b
commit df54dfac97
2 changed files with 2 additions and 19 deletions

View File

@ -11,10 +11,7 @@ import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerBucketFillEvent;
import mineplex.core.common.Pair; import mineplex.core.common.Pair;
import mineplex.core.common.util.MapUtil; import mineplex.core.common.util.MapUtil;
@ -78,20 +75,6 @@ public class BlockRecorderComponent extends HubGameComponent<CycledGame>
event.setCancelled(false); event.setCancelled(false);
} }
@EventHandler
public void blockPhysics(BlockPhysicsEvent event)
{
Location location = event.getBlock().getLocation();
if (!UtilAlg.inBoundingBox(location, _cornerA, _cornerB))
{
return;
}
_placedBlocks.add(event.getBlock().getLocation());
event.setCancelled(false);
}
@EventHandler @EventHandler
public void end(HubGameStateChangeEvent event) public void end(HubGameStateChangeEvent event)
{ {
@ -101,5 +84,6 @@ public class BlockRecorderComponent extends HubGameComponent<CycledGame>
} }
_game.getManager().runSyncLater(() -> _blocks.forEach((location, pair) -> MapUtil.QuickChangeBlockAt(location, pair.getLeft(), pair.getRight())), 1); _game.getManager().runSyncLater(() -> _blocks.forEach((location, pair) -> MapUtil.QuickChangeBlockAt(location, pair.getLeft(), pair.getRight())), 1);
_placedBlocks.clear();
} }
} }

View File

@ -86,7 +86,6 @@ public class Duels extends CycledGame
_notDamaged = new ArrayList<>(getGameType().getMaxPlayers()); _notDamaged = new ArrayList<>(getGameType().getMaxPlayers());
registerComponent(new DamageComponent(this)); registerComponent(new DamageComponent(this));
//registerComponent(new PVPTrackerComponent(this));
registerComponent(new GameDescriptionComponent(this, player -> registerComponent(new GameDescriptionComponent(this, player ->
{ {
for (Player other : getAlivePlayers()) for (Player other : getAlivePlayers())