Fixed arrow count not updating on shoot cancel
Spectators are now permitted to walk on enemy turf
This commit is contained in:
parent
6343a00b53
commit
fa59ed52b9
@ -13,6 +13,7 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
|
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -24,9 +25,9 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|||||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R4.EntityArrow;
|
import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||||
import net.minecraft.server.v1_7_R4.Item;
|
import net.minecraft.server.v1_7_R4.Item;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.MapUtil;
|
import mineplex.core.common.util.MapUtil;
|
||||||
@ -275,6 +276,8 @@ public class TurfForts extends TeamGame
|
|||||||
{
|
{
|
||||||
UtilPlayer.message(event.getEntity(), F.main("Game", "You cannot attack during Build Time!"));
|
UtilPlayer.message(event.getEntity(), F.main("Game", "You cannot attack during Build Time!"));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
((Player) event.getEntity()).updateInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,6 +602,9 @@ public class TurfForts extends TeamGame
|
|||||||
{
|
{
|
||||||
for (Player player : team.GetPlayers(true))
|
for (Player player : team.GetPlayers(true))
|
||||||
{
|
{
|
||||||
|
if (((CraftPlayer) player).getHandle().spectating)
|
||||||
|
continue;
|
||||||
|
|
||||||
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
|
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
|
||||||
while (block.getTypeId() != 159 && block.getY() > 0)
|
while (block.getTypeId() != 159 && block.getY() > 0)
|
||||||
block = block.getRelative(BlockFace.DOWN);
|
block = block.getRelative(BlockFace.DOWN);
|
||||||
|
Loading…
Reference in New Issue
Block a user