Perform join process only on player join

Should fix some issues like #1365
This commit is contained in:
Gabriele C 2017-10-23 08:31:06 +02:00
parent 8fe92da119
commit cd85c51fbe
2 changed files with 1 additions and 7 deletions

View File

@ -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);
}

View File

@ -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);