From ce75413e2c03f39bee283a41f3a267f172ac24c6 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 1 Sep 2016 18:48:24 +0200 Subject: [PATCH] Removed old code --- .../thebuttonmcchat/PlayerListener.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/src/buttondevteam/thebuttonmcchat/PlayerListener.java b/src/buttondevteam/thebuttonmcchat/PlayerListener.java index b77d66a..4cf4d09 100644 --- a/src/buttondevteam/thebuttonmcchat/PlayerListener.java +++ b/src/buttondevteam/thebuttonmcchat/PlayerListener.java @@ -510,24 +510,6 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerMove(PlayerMoveEvent e) { - // minecraft:tp @a[x=190,y=-80,z=45,dx=5,dy=50,dz=5] 190 1 45 - if (e.getPlayer().getWorld().getName().equals("wilds") && e.getTo().getBlockX() > 100 - && e.getTo().getBlockX() < 250 && e.getTo().getBlockZ() > 0 && e.getTo().getBlockZ() < 200 - && e.getTo().getBlockY() < -64) { - final Player p = e.getPlayer(); - p.setVelocity(new Vector(0, 0, 0)); - p.setFallDistance(0); - Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(PluginMain.Instance, new Runnable() { - public void run() { - p.setVelocity(new Vector(0, 0, 0)); - p.setFallDistance(0); - p.teleport(new Location(Bukkit.getWorld("wilds"), 190, 1, 50)); - p.setVelocity(new Vector(0, 0, 0)); - p.setFallDistance(0); - } - }); - } - ChatPlayer mp = ChatPlayer.GetFromPlayer(e.getPlayer()); if (mp.ChatOnly) e.setCancelled(true); @@ -535,19 +517,6 @@ public class PlayerListener implements Listener { @EventHandler(priority = EventPriority.LOWEST) public void onPlayerTeleport(PlayerTeleportEvent e) { - /* - * if (BoardColl.get().getFactionAt(PS.valueOf(e.getFrom())).getId() .equalsIgnoreCase("nomansland") || BoardColl.get().getFactionAt(PS.valueOf(e.getTo())).getId() - * .equalsIgnoreCase("nomansland")) { - */ - // e.setTo(e.getFrom()); - // e.setCancelled(true); // Relative coordinates mess it up - /* - * System.out.println("From: " + e.getFrom()); System.out.println("To: " + e.getTo()); System.out.println("Cause: "+e.getCause()); - */ - /* - * e.getPlayer().sendMessage( "§cYou are not allowed to teleport to/from No Mans Land."); } - */ - if (ChatPlayer.GetFromPlayer(e.getPlayer()).ChatOnly) { e.setCancelled(true); e.getPlayer().sendMessage("§cYou are not allowed to teleport while in chat-only mode.");