use std::path::PathBuf; use anyhow::Result; use j4rs::Instance; use tokio::sync::oneshot; use crate::events::Event; pub enum LoadPluginResult { SuccessfullyLoadedSpigot, SuccessfullyLoadedPaper, FailedToLoadSpigotPlugin(anyhow::Error), FailedToLoadPaperPlugin(anyhow::Error), FailedToReadConfigurationFile(anyhow::Error), NoConfigurationFile, } pub enum JvmCommand { Initialize { j4rs_path: PathBuf, respond_to: oneshot::Sender>, }, JavaCallback { instance: Instance, respond_to: oneshot::Sender>, }, LoadPlugin { plugin_path: PathBuf, respond_to: oneshot::Sender, }, InstantiateAllPlugins { respond_to: oneshot::Sender>, }, EnableAllPlugins { respond_to: oneshot::Sender>, }, DisableAllPlugins { respond_to: oneshot::Sender>, }, Shutdown { respond_to: oneshot::Sender>, }, TriggerEvent { event: Event, respond_to: oneshot::Sender>, }, }