Merge branch 'master' of ssh://dev.mineplex.com:7999/min/mineplex

Conflicts:
	Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java
This commit is contained in:
Chiss 2013-12-04 12:48:12 +11:00
commit a29cc4664f

View File

@ -9,13 +9,13 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.Difficulty; import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.World.Environment; import org.bukkit.World.Environment;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.v1_6_R3.CraftServer; import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld; import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
@ -30,6 +30,8 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityCreatePortalEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityDeathEvent;
@ -101,6 +103,8 @@ public class UHC extends TeamGame
private boolean _portalCreated = false; private boolean _portalCreated = false;
private GameTeam _lastDragonDamager = null; private GameTeam _lastDragonDamager = null;
private Location _exitLocation = null;
public UHC(ArcadeManager manager) public UHC(ArcadeManager manager)
{ {
super(manager, GameType.UHC, super(manager, GameType.UHC,
@ -175,7 +179,7 @@ public class UHC extends TeamGame
} }
@EventHandler @EventHandler
public void endPortalTransfer(PlayerPortalEvent event) public void endPortalTransfer(final PlayerPortalEvent event)
{ {
if (event.getCause() == TeleportCause.END_PORTAL) if (event.getCause() == TeleportCause.END_PORTAL)
{ {
@ -184,6 +188,15 @@ public class UHC extends TeamGame
} }
} }
@EventHandler
public void endPortalCreation(final EntityCreatePortalEvent event)
{
if (event.getEntity() instanceof EnderDragon)
{
event.setCancelled(true);
}
}
@EventHandler @EventHandler
public void TimeUpdate(UpdateEvent event) public void TimeUpdate(UpdateEvent event)
{ {