From 34b3c13404c466c8f64d198dce914a1e3fa094c2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 15 Feb 2013 13:00:59 +0000 Subject: Plugins can now bind console commands 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 --- source/Plugin.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/Plugin.h') diff --git a/source/Plugin.h b/source/Plugin.h index e787c3239..de7113c22 100644 --- a/source/Plugin.h +++ b/source/Plugin.h @@ -85,12 +85,21 @@ public: virtual bool OnWeatherChanged (cWorld & a_World); virtual bool OnWeatherChanging (cWorld & a_World, eWeather & a_NewWeather); - /// Handles the command split into a_Split, issued by player a_Player. Command permissions have already been checked. + /** Handles the command split into a_Split, issued by player a_Player. + Command permissions have already been checked. + Returns true if command handled successfully + */ virtual bool HandleCommand(const AStringVector & a_Split, cPlayer * a_Player); + /// Handles the console command split into a_Split. Returns true if command handled successfully. + virtual bool HandleConsoleCommand(const AStringVector & a_Split); + /// All bound commands are to be removed, do any language-dependent cleanup here virtual void ClearCommands(void) {} ; + /// All bound console commands are to be removed, do any language-dependent cleanup here + virtual void ClearConsoleCommands(void) {} ; + /** Called from cPluginManager::AddHook() to check if the hook can be added. Plugin API providers may check if the plugin is written correctly (has the hook handler function) Returns true if the hook can be added (handler exists) -- cgit v1.2.3