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

This commit is contained in:
Chiss 2013-12-03 16:27:12 +11:00
commit d10871abd9
3 changed files with 16 additions and 1 deletions

Binary file not shown.

View File

@ -27,7 +27,7 @@ public class LobbyBalancer implements Listener, Runnable
{ {
_plugin = plugin; _plugin = plugin;
_repository = new LobbyBalancerRepository(); _repository = new LobbyBalancerRepository();
_repository.initialize(false); _repository.initialize(true);
loadLobbyServers(); loadLobbyServers();

View File

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
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;
@ -15,6 +16,8 @@ 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.craftbukkit.v1_6_R3.CraftServer;
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.CaveSpider; import org.bukkit.entity.CaveSpider;
@ -44,7 +47,9 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.event.player.PlayerKickEvent; import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe; import org.bukkit.inventory.ShapedRecipe;
@ -182,6 +187,16 @@ public class UHC extends TeamGame
} }
} }
@EventHandler
public void endPortalTransfer(PlayerPortalEvent event)
{
if (event.getCause() == TeleportCause.END_PORTAL)
{
event.setCancelled(true);
event.getPlayer().teleport(((CraftServer)Bukkit.getServer()).getHandle().getServer().getPlayerList().calculateTarget(event.getPlayer().getLocation(), ((CraftWorld)Bukkit.getWorld("world_the_end")).getHandle()));
}
}
@EventHandler @EventHandler
public void TimeUpdate(UpdateEvent event) public void TimeUpdate(UpdateEvent event)
{ {