Closed Noctiro closed 7 months ago
https://spark.lucko.me/VCVkSCIppB
Can successfully change the afk status of a player
The AFK status of the player does not change after executing setAfk(true)
setAfk(true)
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; public class Command implements CommandExecutor { @Override public boolean onCommand(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, String[] args) { if (sender instanceof Player player) { boolean before = player.isAfk(); player.setAfk(!player.isAfk()); boolean after = player.isAfk(); System.out.println(before + " " + after); } return true; } }
version [19:57:52 INFO]: Checking version, please wait... [19:57:52 INFO]: Current: git-Purpur-2136 (MC: 1.20.4)* Previous: git-Purpur-2134 (MC: 1.20.4) You are running the latest version
version [19:57:52 INFO]: Checking version, please wait... [19:57:52 INFO]: Current: git-Purpur-2136 (MC: 1.20.4)* Previous: git-Purpur-2134 (MC: 1.20.4)
No response
player-idle-timeout is set to 0 in server.properties. That must be set to a number higher than zero for the AFK system to work.
player-idle-timeout
0
server.properties
Spark link
https://spark.lucko.me/VCVkSCIppB
Expected behavior
Can successfully change the afk status of a player
Observed/Actual behavior
The AFK status of the player does not change after executing
setAfk(true)
Steps/models to reproduce
Purpur version
Agreements
Other
No response