Fix some issues with Velocity support
This commit is contained in:
parent
6dea065ed2
commit
de69919c01
@ -137,6 +137,10 @@ public class AsynchronousJoin implements AsynchronousProcess {
|
|||||||
|
|
||||||
// Session logic
|
// Session logic
|
||||||
if (sessionService.canResumeSession(player)) {
|
if (sessionService.canResumeSession(player)) {
|
||||||
|
if (velocitySender.isEnabled()) {
|
||||||
|
bukkitService.scheduleSyncDelayedTask(() ->
|
||||||
|
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), service.getProperty(HooksSettings.PROXY_SEND_DELAY));
|
||||||
|
}
|
||||||
service.send(player, MessageKey.SESSION_RECONNECTION);
|
service.send(player, MessageKey.SESSION_RECONNECTION);
|
||||||
// Run commands
|
// Run commands
|
||||||
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(
|
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(
|
||||||
|
|||||||
@ -26,7 +26,6 @@ import fr.xephi.authme.service.CommonService;
|
|||||||
import fr.xephi.authme.service.SessionService;
|
import fr.xephi.authme.service.SessionService;
|
||||||
import fr.xephi.authme.service.bungeecord.BungeeSender;
|
import fr.xephi.authme.service.bungeecord.BungeeSender;
|
||||||
import fr.xephi.authme.service.bungeecord.MessageType;
|
import fr.xephi.authme.service.bungeecord.MessageType;
|
||||||
import fr.xephi.authme.service.velocity.VMessageType;
|
|
||||||
import fr.xephi.authme.service.velocity.VelocitySender;
|
import fr.xephi.authme.service.velocity.VelocitySender;
|
||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
import fr.xephi.authme.settings.properties.DatabaseSettings;
|
import fr.xephi.authme.settings.properties.DatabaseSettings;
|
||||||
@ -314,10 +313,6 @@ public class AsynchronousLogin implements AsynchronousProcess {
|
|||||||
bukkitService.scheduleSyncDelayedTask(() ->
|
bukkitService.scheduleSyncDelayedTask(() ->
|
||||||
bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
|
bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
|
||||||
}
|
}
|
||||||
if (velocitySender.isEnabled()) {
|
|
||||||
bukkitService.scheduleSyncDelayedTask(() ->
|
|
||||||
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
|
|
||||||
}
|
|
||||||
|
|
||||||
// As the scheduling executes the Task most likely after the current
|
// As the scheduling executes the Task most likely after the current
|
||||||
// task, we schedule it in the end
|
// task, we schedule it in the end
|
||||||
|
|||||||
@ -14,7 +14,10 @@ import fr.xephi.authme.service.CommonService;
|
|||||||
import fr.xephi.authme.service.JoinMessageService;
|
import fr.xephi.authme.service.JoinMessageService;
|
||||||
import fr.xephi.authme.service.TeleportationService;
|
import fr.xephi.authme.service.TeleportationService;
|
||||||
import fr.xephi.authme.service.bungeecord.BungeeSender;
|
import fr.xephi.authme.service.bungeecord.BungeeSender;
|
||||||
|
import fr.xephi.authme.service.velocity.VMessageType;
|
||||||
|
import fr.xephi.authme.service.velocity.VelocitySender;
|
||||||
import fr.xephi.authme.settings.commandconfig.CommandManager;
|
import fr.xephi.authme.settings.commandconfig.CommandManager;
|
||||||
|
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||||
import fr.xephi.authme.settings.properties.RegistrationSettings;
|
import fr.xephi.authme.settings.properties.RegistrationSettings;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
@ -30,6 +33,9 @@ public class ProcessSyncPlayerLogin implements SynchronousProcess {
|
|||||||
@Inject
|
@Inject
|
||||||
private BungeeSender bungeeSender;
|
private BungeeSender bungeeSender;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private VelocitySender velocitySender;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private LimboService limboService;
|
private LimboService limboService;
|
||||||
|
|
||||||
@ -102,6 +108,13 @@ public class ProcessSyncPlayerLogin implements SynchronousProcess {
|
|||||||
player.removePotionEffect(PotionEffectType.BLINDNESS);
|
player.removePotionEffect(PotionEffectType.BLINDNESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AuthMeVelocity start - send on player login
|
||||||
|
if (velocitySender.isEnabled()) {
|
||||||
|
bukkitService.scheduleSyncDelayedTask(() ->
|
||||||
|
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), commonService.getProperty(HooksSettings.PROXY_SEND_DELAY));
|
||||||
|
}
|
||||||
|
// AuthMeVelocity end
|
||||||
|
|
||||||
// The Login event now fires (as intended) after everything is processed
|
// The Login event now fires (as intended) after everything is processed
|
||||||
bukkitService.callEvent(new LoginEvent(player));
|
bukkitService.callEvent(new LoginEvent(player));
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user