diff --git a/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt b/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt index a4cfc0a2..d07a640d 100644 --- a/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt +++ b/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt @@ -7,6 +7,7 @@ import net.axay.kspigot.chat.input.implementations.PlayerInputBookComprehensive import net.axay.kspigot.chat.input.implementations.PlayerInputBookPaged import net.axay.kspigot.chat.input.implementations.PlayerInputChat import net.axay.kspigot.event.unregister +import net.axay.kspigot.runnables.sync import net.axay.kspigot.runnables.taskRunLater import org.bukkit.entity.Player import org.bukkit.event.Listener @@ -84,7 +85,9 @@ internal abstract class PlayerInput( if (!received) { inputListeners.forEach { it.unregister() } received = true - callback.invoke(PlayerInputResult(input)) + sync { + callback.invoke(PlayerInputResult(input)) + } } }