EssentialsX

EssentialsX

2M Downloads

AFK cannot be async from main thread

SlimeDog opened this issue · 6 comments

commented

Information

Full output of /ess version:

>essentials version
[08:02:20] [Server thread/INFO]: CONSOLE issued server command: /essentials version
[08:02:20] [Server thread/INFO]: Server version: 1.14.1-R0.1-SNAPSHOT git-Spigot-4f661b2-585b2eb (MC: 1.14.1)
[08:02:20] [Server thread/INFO]: EssentialsX version: 2.16.1.178-mc114-b93
[08:02:20] [Server thread/INFO]: LuckPerms version: 4.4.22
[08:02:20] [Server thread/INFO]: Vault version: 1.7.2-b107
[08:02:20] [Server thread/INFO]: EssentialsXChat version: 2.16.1.178-mc114-b93

Details

Description
Player does not go AFK, but...

Similar (but different error message) from #2545.

EssentialsX config AFK nodes:

auto-afk: 300
auto-afk-kick: 1800
freeze-afk-players: false
disable-item-pickup-while-afk: false
cancel-afk-on-interact: true
cancel-afk-on-move: true
sleep-ignores-afk-players: true
afk-list-name: "none"

Server log:

[07:57:05] [Server thread/WARN]: [Essentials] EssentialsTimer Error:
java.lang.IllegalStateException: AfkStatusChangeEvent cannot be triggered asynchronously from primary server thread.
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:497) ~[spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at com.earth2me.essentials.User.setAfk(User.java:463) ~[EssentialsX-2.16.1.178-mc114-b93.jar:?]
        at com.earth2me.essentials.User.checkActivity(User.java:608) ~[EssentialsX-2.16.1.178-mc114-b93.jar:?]
        at com.earth2me.essentials.EssentialsTimer.run(EssentialsTimer.java:58) [EssentialsX-2.16.1.178-mc114-b93.jar:?]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:394) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1008) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:956) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:801) [spigot-1.14.1.jar-2019-05-18-2318:git-Spigot-4f661b2-585b2eb]
        at java.lang.Thread.run(Thread.java:834) [?:?]

Steps to reproduce

  1. Connect
  2. Wait for player to go AFK.
  3. Collect console spam every 2-3 seconds.

Expected behavior
Player should go AFK.

commented

I'm having the same problem with the latest 1.14.1-build: https://pastebin.com/3BTeXeBJ.

commented

Caused by 7cc4dc2, which was an attempt to fix #2545. I'll need to look into this further when I get time.

commented

Duplicate of #2545

commented

@YourCoal This is a different issue, though it is related to #2545.

commented

Could you confirm whether this still happens in the latest experimental build?

commented

Fixed in EssentialsX 2.16.1.181-mc114-b96
Thanks.