EssentialsX

EssentialsX

2M Downloads

[Bug] Instant-sleep with Beds happens when the afk activates

Opened this issue ยท 3 comments

commented

Information

Full output of /ess version:

[13:09:59 INFO]: Server version: 1.14.4-R0.1-SNAPSHOT git-Paper-233 (MC: 1.14.4)
[13:09:59 INFO]: EssentialsX version: 2.17.1.19
[13:09:59 INFO]: LuckPerms version: 5.0.14
[13:09:59 INFO]: PlaceholderAPI version: 2.10.4
[13:09:59 INFO]: Vault version: 1.7.2-b107
[13:09:59 INFO]: EssentialsXChat version: 2.17.1.19

Server log:

EssentialsX config: https://pastebin.com/ZZvvPRxK

Details

Description
An instant-sleep issue with beds seems to be present and seems to be related to the afk feature of EssentialsX. This also seems to be related to #2775.

This issue seems to be present even without the essentials permission "essentials.sleepingignored".

It does seem to be related to the afk function though.

  • As soon as a player becomes 'afk' either by the config time or when a player flags themself as "/afk", the afk as it relates to sleep does not seem to stop when the player resumes activity and is no longer flagged as afk.
  • The above occurs even if the player does not have the "essentials.sleepingignored" permission.
    • The instant-sleep issue persists even when there is no permission plugin.
  • This afk instant sleep issue will not stop until the server has rebooted.
  • The config and the permission website say that the auto-afk will only start if the player has the permission "essentials.afk.auto". However, this permission does not seem to be required for the auto-afk feature to apply.
  • When setting the config "auto-afk" to "-1" it does seem to disable the automatic afk feature, and this issue no longer automatically persists. However, if a player initiates the afk with the command, the issue will happen, and will not go away until server reboot.

NOTE: Another config line, "sleep-ignores-afk-players: true" says that if set to false, it shall not allow afk players combined with sleeping players to skip the night (basically resuming native minecraft behavior). I have not used multiple accounts to test the integrity of this as of yet.

I have been testing the above as the only player on a server, with op, without op, with permission, without permission, without permission plugin, and by removing the essentialsx plugin. This only occurs when

Steps to reproduce
Go afk.

The only way to re-set this bug is when the server is restarted, or when the auto-afk feature is disabled and use of the afk command is not allowed.

Expected behavior
The afk feature should not skip the night when the "essentials.sleepingignored" permission is not added to a player.

The auto-afk time limit should not even work if a player does not have the "essentials.afk.auto" permission.

commented

I've had a similar issue since either 1.13 or 1.14 (with a server that started on 1.13). For me, I don't think there's any relation to going AFK; as soon as I join and it's night, I go to sleep and it's instantly daytime. I'm currently on 1.15.

I don't think it's another plugin interfering, since I only have EssentialsX, PerWorldInventory, MultiVerse, WorldEdit, and Vault installed.

commented

I have the same problem, but I tried only with essentials enabled (and no other plugins)

on Paper 1.14
actually I even recreated a server only to test if it was due to some change possible with paper.yml or spigot.yml but it wasn't.

version : 2.17.1.40

Edit : I found out why, it was because I had the permission *, so even when I was testing deopped, I had the permission "essentials.sleepingignored".

commented

@Tresswa @zacharee Apologies for the delayed response. Could you double check with /ess debug (and /lp verbose on essentials.sleepingignored if you're using LuckPerms) to ensure that you definitely don't have the sleepingignored permission being set or assumed somewhere?