From cd85c51fbed1596f3dc593a6e0fe296997a0949e Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Mon, 23 Oct 2017 08:31:06 +0200 Subject: [PATCH] Perform join process only on player join Should fix some issues like #1365 --- src/main/java/fr/xephi/authme/listener/PlayerListener.java | 2 +- .../fr/xephi/authme/listener/PlayerListener19Spigot.java | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener.java b/src/main/java/fr/xephi/authme/listener/PlayerListener.java index 80946a5e5..f80071a7d 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener.java @@ -197,8 +197,8 @@ public class PlayerListener implements Listener { if (!PlayerListener19Spigot.isPlayerSpawnLocationEventCalled()) { teleportationService.teleportOnJoin(player); - management.performJoin(player, player.getLocation()); } + management.performJoin(player, player.getLocation()); teleportationService.teleportNewPlayerToFirstSpawn(player); } diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java b/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java index 521b2fb27..d5f46b305 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener19Spigot.java @@ -1,6 +1,5 @@ package fr.xephi.authme.listener; -import fr.xephi.authme.process.Management; import fr.xephi.authme.service.TeleportationService; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -13,9 +12,6 @@ import javax.inject.Inject; public class PlayerListener19Spigot implements Listener { - @Inject - private Management management; - @Inject private TeleportationService teleportationService; @@ -31,8 +27,6 @@ public class PlayerListener19Spigot implements Listener { isPlayerSpawnLocationEventCalled = true; final Player player = event.getPlayer(); - management.performJoin(player, event.getSpawnLocation()); - Location customSpawnLocation = teleportationService.prepareOnJoinSpawnLocation(player); if (customSpawnLocation != null) { event.setSpawnLocation(customSpawnLocation);