hsyyid / EssentialCmds

EssentialCmds adds useful commands to Minecraft
https://bit.ly/2HPQ9tR
MIT License
31 stars 21 forks source link

problem with AFK kicks #55

Closed dungeonmaster372 closed 8 years ago

dungeonmaster372 commented 8 years ago

Here is whats happening, I have set the configs as instructed and as is here. This is with v. 7.4b. I get an error: handleDisconnection() called twice. The reason for the AFK settings to be as they are in the link above is, that when I set the afk kick time to something different; than the time to afk, it dont broadcast that I have gone afk, neither in the console or chat. So I am thinking that something is broken with this feature. Plus it kicks me out at the time of getting afk status no matter how I set the times.

Everything else seems to be working great, thanks for the essentials!

I would like to be able to configure the afk kick message as well if possible in the future.

hsyyid commented 8 years ago

Do you have the permission to be exempt from AFK? Also, what Minecraft and Sponge is this? (Include the kind of Sponge ie. SpongeForge or SpongeVanilla)

dungeonmaster372 commented 8 years ago

its the latest sponge forge for mc 1.8.9 forge build 1732

dungeonmaster372 commented 8 years ago

as far as the permission, I didnt have the permission to be exempt at the time of this test. It was supposed to give me afk status but didnt until just before I got kicked.

hsyyid commented 8 years ago

Alright. I'll look into it today

viveleroi commented 8 years ago

I'm seeing this as well - in fact it's become incredibly spammy for the console/logs.

It took me forever to track this down because it doesn't provide a trace and is hard to tell what order things happened in. After watching our server logs after a clean reboot, I saw the problem happen twice and I compared what the affected players had in common - they both were afk-kicked.

What's unusual is that in some instances, it seems to begin immediately, as shown here but when I tested locally by afk-kicking myself, it only occurred when I re-joined the server:

[Server thread/INFO]: viveleroi[/127.0.0.1:55613] logged in with entity id 294 in world(0) at (-395.74989360192956, 72.0, 51.130785385881026)
[Server thread/INFO]: viveleroi joined the game
[Server thread/INFO]: viveleroi lost connection: Kicked for being AFK too long.
[Server thread/INFO]: viveleroi left the game

Nothing yet, but when I re-joined seconds later:

[User Authenticator #2/INFO]: UUID of player viveleroi is aed1fed6-9801-4790-b1d0-c1a809062880
[Server thread/INFO]: viveleroi[/127.0.0.1:55655] logged in with entity id 540 in world(0) at (-395.74989360192956, 72.0, 51.130785385881026)
[Server thread/INFO]: viveleroi joined the game
[Server thread/WARN]: handleDisconnection() called twice

In most cases it repeats forever. Though on our public server it appears to stop when that same player comes back. Unfortunately this piles up and I have 100MB log files.

SpongeForge: 1159 Forge: 1.8.9-11.15.1.1734 EssentialCmds: 7.4e

Given that it goes away when a player returns, I wonder if it's an object reference problem.

hsyyid commented 8 years ago

Okay. I think I tracked down the issue with some help. Will try and push a fix soon.