Cuberite Forum

Full Version: [SOLVED] Best way to interact with MCServer plugins from external sources?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Among many other things, I'm looking into creating an alternative to BuyCraft that works with MCServer (probably for personal uses, I may release the source code eventually). However, it seems that sockets are not included in MCServer plugins yet (which is disappointing), and I have no interest in creating a system where the plugin checks for data every once in a while with an HTTP request.

Which brings me to my question: Is there any other way to inform an MCServer plugin that, for example, a purchase occurred?

If I were to add some other features I was hoping to add, such as cross-server private messaging, it would be quit inefficient to use HTTP requests.

Thanks,
Nathan

P.S. To be honest, I don't know much about the topic, but it shouldn't be too hard to simply include this in the source code, correct? Or do you plan on wrapping it in a more elegant API?
You can use the cNetwork class for network connections: http://mc-server.xoft.cz/LuaAPI/cNetwork.html

We won't implement LuaSocket because it blocks the server.
- Thanks! I literally *just* realized I overlooked that.