c0caina / inaPluginManager

Basic plugin loading implementation for Dragonfly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inaPluginManager

This add-in allows you to load plugins in the .so format.

  • Compiling the plugins from the source code.
  • Loading plugins in the .so format.
  • Unload assets in plugins/assets.

Usage

In fact, the Start function is called in PluginManager, which provides a link to *Logger and *Server, and also gives your assets.

inaPluginTemplate:

package main

import (
	"embed"
	"github.com/df-mc/dragonfly/server"
	"github.com/sirupsen/logrus"
)

//go:embed plugins
var assets embed.FS

func Start(logger *logrus.Logger, server *server.Server) embed.FS {
	logger.Info("I running")
	
	return assets
}

Please note that the versions of plugin packages must be identical to the versions of inaPluginManager.

Contributing

I am an extremely inexperienced programmer, but I tried to make this bootloader. I would be glad if you point out my non-obvious mistakes.

Contact

I can be found on the Dragonfly server.

Chat on Discord

About

Basic plugin loading implementation for Dragonfly.


Languages

Language:Go 100.0%