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:
parent
6d40c1902a
commit
3c4f0d8c93
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user