Mineserver Community

Mineserver => Plugins => Topic started by: pazzesco on December 21, 2010, 05:38:37 pm

Title: A few questions about plugins
Post by: pazzesco on December 21, 2010, 05:38:37 pm
Hey everybody,
   First off, I love the idea of this project. Coming from developing plugins for hey0's mod, this is going to be a breath of fresh air. Not that hey0's mod isn't anything but awesome, but waiting for poor hey0 to wrestle with a pile of obfuscated Java classes can be tedious with a bunch of programmers/players wanting instant, working results. Hats off to him and the others over at that community.
  That being said, I've looked around a little for plugin development resources and haven't turned up any. This is still very much in the works I take it? I'm definitely anticipating developing for this.

Title: Re: A few questions about plugins
Post by: deoxxa on December 21, 2010, 05:56:18 pm
Yep it's still very early days for plugins. Over the last 48 hours or so I got plugins technically working, but I'm not a fan of some of the implementation specifics right now. Check out `src/plugins/banlist/banlist.{cpp,h}` for how a plugin currently looks (note: that plugin doesn't currently do much aside from loading itself).

The implementation problems that we're currently met with are familiar to anyone who's worked with dynamically linked C++ code before: name mangling. Right now plugins need to be compiled with the same compiler and preferably toolchain as the main Mineserver executable. The only way to get around this will be to completely re-engineer the way functionality from the core of Mineserver is exposed to plugins by using a far more C-ish interface, passing a struct of function pointers and maybe some kind of context cookie into the init/shutdown functions instead of a Mineserver (the class, not the application) instance.

If you're interested in keeping up with development and such, especially with the volatility of the plugin interface, joining IRC wouldn't be a horrible idea. We're situated on irc.esper.net in #mineserver if you want to drop in for a chat.

Title: Re: A few questions about plugins
Post by: Fador on December 29, 2010, 10:20:22 pm
I was able to put together a nice Plugin API (http://mineserver.be/wiki/Plugin_API (http://mineserver.be/wiki/Plugin_API)) last night. A lot of functions and hooks missing but I'm going to add them! ;)