From 1ac5b4230e288302019cf5f36cc05f032a92e253 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 13 Aug 2013 18:06:24 +0100 Subject: [PATCH] Teleport cleanup --- Essentials/src/com/earth2me/essentials/Teleport.java | 7 ------- Essentials/src/com/earth2me/essentials/api/ITeleport.java | 8 -------- .../src/com/earth2me/essentials/commands/Commandhome.java | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 3de854b8b..8d6ec0c78 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -227,13 +227,6 @@ public class Teleport implements net.ess3.api.ITeleport now(teleportOwner, new LocationTarget(teleportOwner.getLastLocation()), TeleportCause.COMMAND); } - //This function handles teleporting to /home - @Override - public void home(Location loc, Trade chargeFor) throws Exception - { - teleport(teleportOwner, new LocationTarget(loc), chargeFor, TeleportCause.COMMAND); - } - //If we need to cancelTimer a pending teleportPlayer call this method private void cancel(boolean notifyUser) { diff --git a/Essentials/src/com/earth2me/essentials/api/ITeleport.java b/Essentials/src/com/earth2me/essentials/api/ITeleport.java index 392cd9fca..a14f4a5e1 100644 --- a/Essentials/src/com/earth2me/essentials/api/ITeleport.java +++ b/Essentials/src/com/earth2me/essentials/api/ITeleport.java @@ -109,12 +109,4 @@ public interface ITeleport */ public void back() throws Exception; - /** - * Teleport wrapper used to handle /home teleports - * - * @param loc - Location where player will be teleported too - * @param chargeFor - What the user will be charged if teleportPlayer is successful - * @throws Exception - */ - public void home(Location loc, Trade chargeFor) throws Exception; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index 903f773d8..f204c0a49 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -105,6 +105,6 @@ public class Commandhome extends EssentialsCommand { throw new Exception(_("noPerm", "essentials.worlds." + loc.getWorld().getName())); } - user.getTeleport().home(loc, charge); + user.getTeleport().teleport(loc, charge, TeleportCause.COMMAND); } }