#729 Use world from LimboPlayer for "spawn after login" feat., simplify teleport event constructors

This commit is contained in:
ljacqu
2016-06-12 14:10:38 +02:00
parent 3cdec91255
commit 5ef62784b5
4 changed files with 38 additions and 34 deletions
@@ -17,11 +17,10 @@ public class FirstSpawnTeleportEvent extends AbstractTeleportEvent {
* Constructor.
*
* @param player The player
* @param from The location the player is being teleported away from
* @param to The teleport destination
*/
public FirstSpawnTeleportEvent(Player player, Location from, Location to) {
super(true, player, from, to);
public FirstSpawnTeleportEvent(Player player, Location to) {
super(true, player, to);
}
/**
@@ -17,13 +17,11 @@ public class SpawnTeleportEvent extends AbstractTeleportEvent {
* Constructor.
*
* @param player The player
* @param from The location the player is being teleported away from
* @param to The teleport destination
* @param isAuthenticated Whether or not the player is logged in
*/
// TODO ljacqu 20160611: We only ever call this with from = player.getLocation() -> could be done in constructor
public SpawnTeleportEvent(Player player, Location from, Location to, boolean isAuthenticated) {
super(false, player, from, to);
public SpawnTeleportEvent(Player player, Location to, boolean isAuthenticated) {
super(false, player, to);
this.isAuthenticated = isAuthenticated;
}