felixbade / minecraft-telegram-gateway

Bukkit/Spigot plugin integrates Minecraft chat with a Telegram group
MIT License
9 stars 4 forks source link

AFK status change causes java.lang.IllegalStateException #32

Closed felixbade closed 5 years ago

felixbade commented 5 years ago

Caused by: java.lang.IllegalStateException: AfkStatusChangeEvent cannot be triggered asynchronously from another thread

[Craft Scheduler Thread - 65/WARN]: [TelegramGateway] Plugin TelegramGateway v1.0 generated an exception while executing task 41 java.lang.NullPointerException: null at fi.felixbade.TelegramGateway.Main.lambda$onEnable$0(Main.java:43) ~[?:?]

felixbade commented 5 years ago

Related: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/Event.html#isAsynchronous--

felixbade commented 5 years ago

Seems like if player is AFK and uses the chat, the exception is thrown

felixbade commented 5 years ago

This is also common. [Craft Scheduler Thread - 67/WARN]: [TelegramGateway] Plugin TelegramGateway v1.0 generated an exception while executing task 41 java.lang.NullPointerException: null Happens when sending a message from Telegram. Does not happen every time.

felixbade commented 5 years ago

This is not a TelegramGateway problem. The exception persists even when the plugin is disabled