Plugin developement
#7
You have probably already noticed that most programming languages look a lot like each other since you've played with PHP and Python. Even though the way you write the code is different, the idea behind it is pretty much the same (if/else/while/etc.)

I think the best way to learn how to create plugins for MCServer is to look at the already existing plugins. For example look at MCServer\Plugins\Core\main.lua
The Core main.lua file contains the initialize functions and stuff to start the plugin. It binds commands and links hooks to functions.

Another extremely simple plugin is the ChatLog plugin MCServer\Plugins\ChatLog\plugin.lua.

The way MCServer starts plugins is by loading ALL the files in the plugin folder (order does not matter) and then it calls the Initialize() function. The Initialize() function can be in any of the .lua files, but there should only be one Smile
MCServer basically loads all plugin files into a single plugin, so you could create the biggest plugin ever in just a single file, but it's easier for the programmer to split plugins up into multiple files so they won't get lost in the complexity of the plugin.
Reply
Thanks given by:


Messages In This Thread
Plugin developement - by tonibm19 - 04-14-2013, 10:00 PM
RE: Plugin developement - by NiLSPACE - 04-14-2013, 10:08 PM
RE: Plugin developement - by tonibm19 - 04-14-2013, 10:23 PM
RE: Plugin developement - by NiLSPACE - 04-14-2013, 10:29 PM
RE: Plugin developement - by tonibm19 - 04-14-2013, 10:34 PM
RE: Plugin developement - by NiLSPACE - 04-14-2013, 10:42 PM
RE: Plugin developement - by FakeTruth - 04-14-2013, 10:49 PM
RE: Plugin developement - by tonibm19 - 04-14-2013, 11:41 PM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 12:04 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 12:13 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 12:33 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 12:43 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 12:44 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 12:46 AM
RE: Plugin developement - by FakeTruth - 04-15-2013, 12:46 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 12:47 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 12:49 AM
RE: Plugin developement - by FakeTruth - 04-15-2013, 12:45 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 12:53 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 12:54 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 03:12 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 03:52 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 03:58 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 04:45 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 04:46 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 04:49 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 04:52 AM
RE: Plugin developement - by tonibm19 - 04-15-2013, 04:54 AM
RE: Plugin developement - by NiLSPACE - 04-15-2013, 05:12 AM
RE: Plugin developement - by tonibm19 - 04-16-2013, 05:01 AM



Users browsing this thread: 1 Guest(s)