diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java index 610bab487..f8dddbde8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java @@ -9,12 +9,14 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Chunk; import org.bukkit.Difficulty; +import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.World.Environment; import org.bukkit.block.Block; 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.CraftWorld; import org.bukkit.enchantments.Enchantment; @@ -101,6 +103,8 @@ public class UHC extends TeamGame private ArrayList _portal = null; private boolean _portalCreated = false; private GameTeam _lastDragonDamager = null; + + private Location _exitLocation = null; public UHC(ArcadeManager manager) { @@ -178,29 +182,10 @@ public class UHC extends TeamGame @EventHandler public void endPortalTransfer(final PlayerPortalEvent event) { - System.out.println(event.getCause()); if (event.getCause() == TeleportCause.END_PORTAL) { event.setCancelled(true); - - if (event.getPlayer().getLocation().getWorld() == Bukkit.getWorld("world_the_end")) - { - System.out.println("in teleport place"); - Bukkit.getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable() - { - public void run() - { - if (event.getPlayer().isOnline()) - { - System.out.println("Teleporting player back to world: " + new Location(WorldData.World, 2.5, 70, 0.5)); - event.getPlayer().teleport(new Location(event.getPlayer().getWorld(), 2.5, 70, 0.5)); - event.getPlayer().sendMessage("Hi, get back in your world."); - } - } - }, 2L); - } - else - event.getPlayer().teleport(((CraftServer)Bukkit.getServer()).getHandle().getServer().getPlayerList().calculateTarget(event.getPlayer().getLocation(), ((CraftWorld)Bukkit.getWorld("world_the_end")).getHandle())); + event.getPlayer().teleport(((CraftServer)Bukkit.getServer()).getHandle().getServer().getPlayerList().calculateTarget(event.getPlayer().getLocation(), ((CraftWorld)Bukkit.getWorld("world_the_end")).getHandle())); } }