2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-05 04:48:02 +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
parent 79d04dbf88
commit 9f90d67ff3
No known key found for this signature in database
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); event.registerIntent((Plugin) plugin);
// check if online // check if online
if (getLastOnline(event.getConnection().getUniqueId()) == 0) { 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)); kickPlayer(event.getConnection().getUniqueId(), plugin.configuration().getMessages().get(RedisBungeeConfiguration.MessageType.LOGGED_IN_OTHER_LOCATION));
// wait 3 seconds before releasing the event // wait 3 seconds before releasing the event
plugin.executeAsyncAfter(() -> event.completeIntent((Plugin) plugin), TimeUnit.SECONDS, 3); 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) { public void onLoginEvent(LoginEvent event, Continuation continuation) {
// check if online // check if online
if (getLastOnline(event.getPlayer().getUniqueId()) == 0) { 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)); kickPlayer(event.getPlayer().getUniqueId(), plugin.configuration().getMessages().get(RedisBungeeConfiguration.MessageType.LOGGED_IN_OTHER_LOCATION));
// wait 3 seconds before releasing the event // wait 3 seconds before releasing the event
plugin.executeAsyncAfter(continuation::resume, TimeUnit.SECONDS, 3); plugin.executeAsyncAfter(continuation::resume, TimeUnit.SECONDS, 3);