Cuberite Forum
[SOLVED] Best way to interact with MCServer plugins from external sources? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: [SOLVED] Best way to interact with MCServer plugins from external sources? (/thread-1907.html)



[SOLVED] Best way to interact with MCServer plugins from external sources? - NathanFlurry - 05-04-2015

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?


RE: Best way to interact with MCServer plugins from external sources? - NiLSPACE - 05-04-2015

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.


RE: Best way to interact with MCServer plugins from external sources? - NathanFlurry - 05-04-2015

@NiLSPACE - Thanks! I literally *just* realized I overlooked that.