2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-10 15:08:01 +00:00

oops forgotten to change something for kick when online

This commit is contained in:
mohammed jasem alaajel 2023-08-31 14:35:21 +04:00 committed by mohammed jasem alaajel
parent 6d40c1902a
commit 3c4f0d8c93
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ public class BungeePlayerDataManager extends PlayerDataManager<ProxiedPlayer, Po
event.registerIntent((Plugin) plugin);
// check if online
if (getLastOnline(event.getConnection().getUniqueId()) == 0) {
if (!plugin.configuration().kickWhenOnline()) {
if (plugin.configuration().kickWhenOnline()) {
kickPlayer(event.getConnection().getUniqueId(), plugin.configuration().getMessages().get(RedisBungeeConfiguration.MessageType.LOGGED_IN_OTHER_LOCATION));
// wait 3 seconds before releasing the event
plugin.executeAsyncAfter(() -> event.completeIntent((Plugin) plugin), TimeUnit.SECONDS, 3);

View File

@ -71,7 +71,7 @@ public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLog
public void onLoginEvent(LoginEvent event, Continuation continuation) {
// check if online
if (getLastOnline(event.getPlayer().getUniqueId()) == 0) {
if (!plugin.configuration().kickWhenOnline()) {
if (plugin.configuration().kickWhenOnline()) {
kickPlayer(event.getPlayer().getUniqueId(), plugin.configuration().getMessages().get(RedisBungeeConfiguration.MessageType.LOGGED_IN_OTHER_LOCATION));
// wait 3 seconds before releasing the event
plugin.executeAsyncAfter(continuation::resume, TimeUnit.SECONDS, 3);