PC-405
Fixes an issue where players would be able to fill buckets of water in Bridges and get to the centre before the Bridges has fallen.
This commit is contained in:
parent
78c5b8a0a3
commit
05e85523b1
@ -21,6 +21,7 @@ import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.ore.OreHider;
|
||||
import nautilus.game.arcade.ore.OreObsfucation;
|
||||
import nautilus.game.arcade.stats.*;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
@ -43,6 +44,7 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.inventory.PrepareItemCraftEvent;
|
||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||
import org.bukkit.event.player.PlayerBucketFillEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
@ -1927,6 +1929,15 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableWaterPickup(PlayerBucketFillEvent event)
|
||||
{
|
||||
if(_bridgesDown)
|
||||
return;
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot pickup liquids before the bridges have fallen."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
public void setBridgeTime(int time)
|
||||
{
|
||||
_bridgeTime = time;
|
||||
|
Loading…
Reference in New Issue
Block a user