summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-03-12The entire unknown command is echoed back to the user on error.madmaxoft1-1/+1
2014-02-17Added cPluginManager:GetPluginsPath() to the Lua API.madmaxoft1-1/+1
2014-02-06Server internally uses new functionsTiger Wang1-2/+2
2014-02-05Simplified shutdownTycho1-4/+0
2014-02-05Added support to start up MCServer and then immediatly sut it down in travisTycho1-0/+4
2014-02-01Removed "player destroying" hookdaniel09161-21/+0
2014-01-25Added "player destroying" and "player destroyed" hooksdaniel09161-0/+42
Hooks: HOOK_PLAYER_DESTROYING HOOK_PLAYER_DESTROYED Idea from: https://github.com/mc-server/MCServer/issues/473
2014-01-23Fixed crash while calling disabled plugins.madmaxoft1-1/+1
2014-01-21Implemented cPluginManager:CallPlugin() API.madmaxoft1-0/+15
This function supersedes cPlugin:Call(), is safer to use in regards to multithreading and once again removes the need for the cPlugin class being exported at all.
2014-01-12Fixed settings plugin generation after IniFileTiger Wang1-3/+3
2014-01-07Plugin messages are received and handed to plugins.madmaxoft1-0/+21
Note that MCS doesn't currently handle any channel registrations, this will come later on.
2014-01-01OnPlayerFishing doesn't have a const cItems anymoreSTRWarrior1-1/+1
2013-12-31implemented the recommendations Xoft gave.STRWarrior1-2/+2
2013-12-30Implented OnPlayerFishing and OnPlayerFished.STRWarrior1-0/+42
2013-12-29Added HOOK_PLUGINS_LOADED.madmaxoft1-3/+23
This fixes #482.
2013-12-18Prettified command error messagesTiger Wang1-8/+17
Using the magic of overlords (overloads) and standards compliance.
2013-12-18Renamed back EntityAnimation to PlayerAnimationTiger Wang1-3/+3
This fixes #411 and partially reverts 30ead790490f04248b861db79fddde9148b552f4
2013-12-11Added a HOOK_WORLD_STARTED hook and a cRoot::CreateAndInitializeWorld function for plugins.STRWarrior1-0/+21
2013-12-08Fixed tolua++ compilation.madmaxoft1-1/+0
Duplicate files, wrong includes, const-incorrect code...
2013-12-08Moved bindings-related to a Bindings subfolder.madmaxoft1-6/+6
Ref.: #407
2013-12-07Renamed animation functionTiger Wang1-3/+3
Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just players can have animations, you know.
2013-11-30Added the real tick duration to the OnWorldTick hook.madmaxoft1-2/+2
2013-11-27Fixed the remaining derpsAlexander Harkness1-1/+1
2013-11-26Hopefully fixed last of the Linux compile errorsTiger Wang1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-22Added cFile:GetFolderContents().madmaxoft1-2/+2
Fix 162.
2013-11-16Fixed a warning about unsigned int comparison - probably was a real issue.Alexander Harkness1-22/+26
2013-11-13PluginManager::Bind displays more information in the error message.madmaxoft1-2/+2
2013-11-05Implemented suggestionsTiger Wang1-7/+17
- Reverted changes to WebAdmin.cpp IPv6 ports and Server.cpp server description + Added default value explicitly for HardCore value * Split PluginManager plugin defaults write to new function - Removed a commented block from BlockTorch and... + Added g_BlockIsTorchPlaceable to Defines.h
2013-11-04Removed settings/webadmin.example.ini filesTiger Wang1-1/+6
Additionally, added some default plugins to autogeneration. Also moved nbt examples to docs/NBT Examples.
2013-11-04Autogeneration of settings.ini and webadmin.iniTiger Wang1-15/+22
Fixes issue #75
2013-10-25cIniFile doesn't store filename internally anymore.madmaxoft1-2/+2
2013-10-06Plugin folders now check for "." and "..".madmaxoft1-2/+2
This fixes #207.
2013-09-28Minor startup streamliningTiger Wang1-3/+7
* LOGD'd unneeded debugging messages, streamlining startup + Added a basic timer for how long in seconds it took to start up + Added two checks for plural (plugin/s, second/s)
2013-09-21Fixed cFile:IsFolder() and plugin-loading.madmaxoft1-2/+2
This should fix loading plugins on Linux.
2013-09-18Proper folder / file distinction in plugin loading.madmaxoft1-3/+3
2013-08-22Fixed AddHook() wanting old-style function names.madmaxoft1-4/+0
Error reported by STR_Warrior in the forum http://forum.mc-server.org/showthread.php?tid=1227&pid=9620#pid9620
2013-08-21Hook adding uses the new API.madmaxoft1-2/+11
Multiple hooks per plugin can be added. The cPluginManager.AddHook() has four available signatures, the recommended one is cPluginManager.AddHook(HOOK_TYPE, CallbackFunction)
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-08-19Finished renaming cPlugin_NewLua to cPluginLua.madmaxoft1-1/+1
2013-08-19Implemented the OnWorldTick hook.madmaxoft1-0/+21
Triggerred for each world every time it ticks, parameters are the cWorld and the previous tick length (a_Dt)
2013-08-11Added the OnHopperPullingItem and OnHopperPushingItem hooks.madmaxoft1-0/+42
Requested in FS 412, slightly modified the params.
2013-08-11Added OnPlayerAnimation() hook.madmaxoft1-0/+21
Initial patch by @STR_Warrior, updated to account for different animation packets.
2013-08-10Renamed Plugin_NewLua to PluginLua.madmaxoft1-1/+1
2013-08-09Renamed Plugin_NewLua to PluginLua.madmaxoft1-1/+1
2013-08-09Added OnExploding() and OnExploded() hooks.madmaxoft1-0/+42
As requested in FS 413, with extra parameters: World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData OnExploding() can return 3 values: StopHook, CanCauseFire, ExplosionSize
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-0/+82
As requested in FS 418.
2013-08-07Removed Squirrel.madmaxoft1-1/+0
This compiles under Windows, but is untested in Linux.
2013-08-02Implemented OnPlayerRightClickingEntity() hookmadmaxoft1-0/+21
Fixes FS 425
2013-07-31Implemented the actual tab completion for commands and playernames.madmaxoft1-8/+16
Each command is reported only if the player has the permission to use it.
2013-07-30Tab completion packet is handled and sent.madmaxoft1-0/+14
This only handles the network comm and the overall design logic, the actual completion is not yet implemented, only dummy values are returned for now.
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-2/+2
Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-29Advanced RCON: Command output is sent to the RCON client.madmaxoft@gmail.com1-3/+4
RCON authentication is now required before executing commands. Console command handlers now return two values, bool (IsHandled) and string (CommandOutput). API change: removed cRoot:ExecuteConsoleCommand(), added cRoot:QueueExecuteConsoleCommand(). API change: removed cPluginManager:ExecuteConsoleCommand(), use cRoot:QueueExecuteConsoleCommand() instead git-svn-id: http://mc-server.googlecode.com/svn/trunk@1631 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-22Plugins can modify message in the OnChat() hook handler.madmaxoft@gmail.com1-1/+1
FS #376 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1622 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-27Fixed a crash in the plugin reload code.madmaxoft@gmail.com1-2/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1415 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-21Added HOOK_EXECUTE_COMMAND for intercepting executed commands and console commands.madmaxoft@gmail.com1-0/+35
Note that built-in console commands are exempt to this hook - they are always performed and the hook is not called. Also note that, for reasons unknown, the HookNotify plugin doesn't list the callback arguments. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1221 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-15Plugins can now bind console commandsmadmaxoft@gmail.com1-0/+100
FS #300 Most console commands are now implemented in the Core plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1214 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13Added HOOK_WEATHER_CHANGING.madmaxoft@gmail.com1-1/+22
http://www.mc-server.org/support/index.php?do=details&task_id=299 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1210 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-05Added new hooks: OnChunkAvailable(), OnChunkUnloaded() and OnChunkUnloading(). Modified OnChunkGenerated() signature.madmaxoft@gmail.com1-4/+67
http://forum.mc-server.org/showthread.php?tid=464&pid=6312#pid6312 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1193 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-01Another GCC fix, hopefully this one will workmadmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1187 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-01Fixed GCC compilationmadmaxoft@gmail.com1-1/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1186 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-01Moved command API into cPluginManager.madmaxoft@gmail.com1-136/+196
As specified in http://forum.mc-server.org/showthread.php?tid=765 , commands are now bound using a single function, cPluginManager:BindCommand(). git-svn-id: http://mc-server.googlecode.com/svn/trunk@1183 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-28Renamed HOOK_KILLED to HOOK_KILLING to match naming conventions.madmaxoft@gmail.com1-3/+3
Also tweaked the mechanics so that plugins may revive without dropping other plugins out of the picture. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1182 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-28Renamed HOOK_COLLECT_PICKUP to HOOK_COLLECTING_PICKUP to match other hooks' naming.madmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1180 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-27Added the HOOK_BLOCK_TO_PICKUPS hook that fires when a block is dug up and should be converted to pickups.madmaxoft@gmail.com1-53/+6
Note that cItems is used in the function signature but not yet exported in the API, TODO! git-svn-id: http://mc-server.googlecode.com/svn/trunk@1176 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-26Changed HOOK_PLAYER_MOVED to HOOK_PLAYER_MOVING to match the scheme used for names.madmaxoft@gmail.com1-2/+2
-ING means the event is being processed and may be refused by a plugin, -ED means it has already happenned and the plugin cannot do anything about it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1174 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-25Merged the usable portion of the "gens" branch.madmaxoft@gmail.com1-1/+1
Splitting off the Composable generator and fiddling with LuaChunk / ChunkDesc is good, other generators not good yet. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1171 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-18Renamed rclk hook to HOOK_PLAYER_RIGHT_CLICK.madmaxoft@gmail.com1-1/+1
http://forum.mc-server.org/showthread.php?tid=464&pid=6163#pid6163 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1158 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-156/+430
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)madmaxoft@gmail.com1-27/+33
http://forum.mc-server.org/showthread.php?tid=625 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1087 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-14Completely removed support for old style Lua plugins (can use both Plugin and NewPlugin in settings.ini for now)faketruth1-129/+104
Removed cPlugin_Lua, obviously cPluginManager stores plugins by their (folder)name cPluginManager now scans the Plugins folder for potential plugins and adds them as non-loaded plugins Added a DisablePlugin and LoadPlugin to disable and load plugins on a per-plugin basis instead of all at once cPluginManager::FindPlugins refreshes the plugin list by removing non-existing plugins and adding new plugins Made it incredibly easy to use new plugins from the WebAdmin Exposed some food/hunger related functions in cPlayer to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@959 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-11/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-05Added the possibility of reserved player slots by implementing the HandleHandshake hook!faketruth1-0/+20
More info: http://forum.mc-server.org/showthread.php?tid=555 git-svn-id: http://mc-server.googlecode.com/svn/trunk@836 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-01Added a Player parameter to OnUpdatedSign and OnUpdatingSign Lua callbacks and to the cWorld:UpdateSign method (http://forum.mc-server.org/showthread.php?tid=464&pid=4393#pid4393)madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@814 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24cPickup doesn't use cPackets.madmaxoft@gmail.com1-16/+21
Also, Lua API change, OnCollectItem -> OnCollectPickup; first param is cPlayer to match other callbacks. git-svn-id: http://mc-server.googlecode.com/svn/trunk@786 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-22WebAdmin should not cause crashes anymorefaketruth1-4/+2
Got rid of cWebPlugin_Lua cPlugin_Lua is also a cWebPlugin now, so plugins don't need a separate cWebPlugin object Changed some stuff to use AString instead of char* git-svn-id: http://mc-server.googlecode.com/svn/trunk@777 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-16/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18Chat packet handled in the new way; fixed missing packet sending for inventory slot.madmaxoft@gmail.com1-49/+43
Again, API change! cPlugin:OnChat() has had its parameters swapped, to match all the other callbacks - Player first, Message second git-svn-id: http://mc-server.googlecode.com/svn/trunk@751 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18Packet refactoring, phase two, partial. Rewritten a few packet handling functions not to use cPacket-descendant objects.madmaxoft@gmail.com1-49/+64
This breaks plugin API! Plugins need to modify their hook functions to match those used in the Core plugin git-svn-id: http://mc-server.googlecode.com/svn/trunk@750 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-16Windows compilation fix after Android changesmadmaxoft@gmail.com1-10/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@742 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-15Compiles on Android! Added Eclipse project, import it into your workspace and it should be runnable on Android!faketruth1-5/+14
Disabled Squirrel for Android cLog now logs to Android LogCat as well Fixed Lua so it compiles on Android Removed/commented out exceptions in JsonCpp so it compiles on Android git-svn-id: http://mc-server.googlecode.com/svn/trunk@741 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-21Implemented the missing HOOK_PLAYER_SPAWN hook (although its name is not too good, should be PLAYER_AUTH)madmaxoft@gmail.com1-0/+17
git-svn-id: http://mc-server.googlecode.com/svn/trunk@687 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-10Fixed some bugs within the squirrel plugin system.lapayo94@gmail.com1-0/+9
Implemented feature request www.mc-server.org/support/index.php?do=details&task_id=53 git-svn-id: http://mc-server.googlecode.com/svn/trunk@655 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-09Improved Squirrel Bindingslapayo94@gmail.com1-6/+17
Added AddCommand / BindCommand for Squirrel Plugins git-svn-id: http://mc-server.googlecode.com/svn/trunk@652 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-08Squirrel Pluginslapayo94@gmail.com1-25/+11
I worked a little bit on the squirrel Bindings They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working) I also fixed some small bugs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Added new hooks: UPDATING_SIGN and UPDATED_SIGN. The first one is capable of changing the sign text by returning the new four lines along with the bool valuemadmaxoft@gmail.com1-1/+44
git-svn-id: http://mc-server.googlecode.com/svn/trunk@622 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually workmadmaxoft@gmail.com1-0/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@610 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Added a world parameter to HOOK_CHUNK_GENERATING.madmaxoft@gmail.com1-22/+21
git-svn-id: http://mc-server.googlecode.com/svn/trunk@609 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-748/+748
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13Added a BlockToPickup hook for modifying pickups when a player breaks a block.madmaxoft@gmail.com1-0/+24
git-svn-id: http://mc-server.googlecode.com/svn/trunk@602 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-12Added working crafting hooks HOOK_PRE_CRAFTING, HOOK_CRAFTING_NO_RECIPE and HOOK_POST_CRAFTINGmadmaxoft@gmail.com1-25/+99
git-svn-id: http://mc-server.googlecode.com/svn/trunk@598 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-11Added implementation of E_PLUGIN_CHUNK_GENERATING lua hookfaketruth1-13/+36
It crashes the server when a plugin actually overrides default behavior though... git-svn-id: http://mc-server.googlecode.com/svn/trunk@594 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-05New hook, E_PLUGIN_CHUNK_GENERATED, called after each chunk is generated (the chunk is already present in cWorld)madmaxoft@gmail.com1-0/+19
git-svn-id: http://mc-server.googlecode.com/svn/trunk@558 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-28Got rid of sPluginManagerStatefaketruth1-64/+67
/pluginlist now also shows the number of active plugins Fixed crash caused by lingering bound Lua commands http://forum.mc-server.org/showthread.php?tid=212&pid=2541#pid2541 Added error messages when binding commands to an invalid plugin git-svn-id: http://mc-server.googlecode.com/svn/trunk@440 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18Thread-safe chunk generation, storage and generator are queried for progress while initializing servermadmaxoft@gmail.com1-1/+0
Note that this commit breaks foliage generation - there are no trees in the chunks generated! git-svn-id: http://mc-server.googlecode.com/svn/trunk@292 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08cPluginManager: slight cleanupmadmaxoft@gmail.com1-178/+272
git-svn-id: http://mc-server.googlecode.com/svn/trunk@247 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-04Fixed a bug in source/cClientHandle.hadmin@omencraft.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@231 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!madmaxoft@gmail.com1-7/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@209 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-26Working on a new plugin design with Lua. While retaining backwards compatibility of course...faketruth1-0/+18
In this new design a plugin consists of a folder with Lua files, this should enable plugin developers to keep things separate and have more overview. git-svn-id: http://mc-server.googlecode.com/svn/trunk@172 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-08It's a Squirrel!!faketruth1-9/+78
In SquirrelBindings.h use #define USE_SQUIRREL 1 to enable squirrel git-svn-id: http://mc-server.googlecode.com/svn/trunk@76 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+423
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6