mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 12:45:57 +01:00
Perform join process only on player join
Should fix some issues like #1365
This commit is contained in:
parent
8fe92da119
commit
cd85c51fbe
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user