diff --git a/src/main/java/fr/xephi/authme/events/AbstractTeleportEvent.java b/src/main/java/fr/xephi/authme/events/AbstractTeleportEvent.java index 57a456b6..51d366d9 100644 --- a/src/main/java/fr/xephi/authme/events/AbstractTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/AbstractTeleportEvent.java @@ -19,25 +19,13 @@ public abstract class AbstractTeleportEvent extends CustomEvent implements Cance * * @param isAsync Whether to fire the event asynchronously or not * @param player The player - * @param from The location the player is being teleported away from - * @param to The teleport destination - */ - public AbstractTeleportEvent(boolean isAsync, Player player, Location from, Location to) { - super(isAsync); - this.player = player; - this.from = from; - this.to = to; - } - - /** - * Constructor, using the player's current location as "from" location. - * - * @param isAsync Whether to fire the event asynchronously or not - * @param player The player * @param to The teleport destination */ public AbstractTeleportEvent(boolean isAsync, Player player, Location to) { - this(isAsync, player, player.getLocation(), to); + super(isAsync); + this.player = player; + this.from = player.getLocation(); + this.to = to; } /** diff --git a/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java b/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java index 6a90e5dd..e5e6868d 100644 --- a/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java @@ -20,7 +20,7 @@ public class FirstSpawnTeleportEvent extends AbstractTeleportEvent { * @param to The teleport destination */ public FirstSpawnTeleportEvent(Player player, Location to) { - super(true, player, to); + super(false, player, to); } /**