private void destroyPlugin(Plugin plugin) throws Exception {
        Exception exception = null;
        PluginDescriptor descriptor = plugin.descriptor();
        Path path = descriptor.getPath();
        try {
            plugin.close();
        } catch (Exception e) {
            exception = new RuntimeException(
                    "Caught an error while closing the plugin: "
                            + descriptor.getId(),
                    e);
        }
        if (path != null) {
            try {
                Files.deleteIfExists(path);
            } catch (IOException e) {
                e = new IOException(
                        "Caught an error while deleting the plugin file: "
                                + path,
                        e);
                if (exception == null) {
                    throw e;
                } else {
                    exception.addSuppressed(e);
                }
            }
        }
        if (exception != null) {
            throw exception;
        }
    }
@implNote Start plugins after all beans are ready so that plugins can get any bean when
          starting.
turms-server-common/src/main/java/im/turms/server/common/infra/plugin/PluginManager.java