diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-06-18 12:13:01 +0200 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-06-18 12:13:01 +0200 |
commit | e0a9f37d909e9d82ccac88dae910ce21a7fdba6f (patch) | |
tree | 46bd321321e2cfc9f6a130dfa414e1c4ddce1fda /src/Bindings | |
parent | Added crBlocked and crNoPermission (diff) | |
download | cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.gz cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.bz2 cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.lz cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.xz cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.tar.zst cuberite-e0a9f37d909e9d82ccac88dae910ce21a7fdba6f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 8 | ||||
-rw-r--r-- | src/Bindings/PluginManager.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index c317ae362..2cd514211 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1553,18 +1553,18 @@ AString cPluginManager::GetCommandPermission(const AString & a_Command) -bool cPluginManager::ExecuteCommand(cPlayer * a_Player, const AString & a_Command) +cPluginManager::CommandResult cPluginManager::ExecuteCommand(cPlayer * a_Player, const AString & a_Command) { - return (HandleCommand(a_Player, a_Command, true) == crExecuted); + return HandleCommand(a_Player, a_Command, true); } -bool cPluginManager::ForceExecuteCommand(cPlayer * a_Player, const AString & a_Command) +cPluginManager::CommandResult cPluginManager::ForceExecuteCommand(cPlayer * a_Player, const AString & a_Command) { - return (HandleCommand(a_Player, a_Command, false) == crExecuted); + return HandleCommand(a_Player, a_Command, false); } diff --git a/src/Bindings/PluginManager.h b/src/Bindings/PluginManager.h index 96b7a979b..e2bd9cd94 100644 --- a/src/Bindings/PluginManager.h +++ b/src/Bindings/PluginManager.h @@ -57,7 +57,8 @@ public: // tolua_export // Called each tick virtual void Tick(float a_Dt); - + + // tolua_begin enum CommandResult { crExecuted, @@ -67,7 +68,6 @@ public: // tolua_export crNoPermission, } ; - // tolua_begin enum PluginHook { HOOK_BLOCK_SPREAD, @@ -254,10 +254,10 @@ public: // tolua_export AString GetCommandPermission(const AString & a_Command); // tolua_export /** Executes the command, as if it was requested by a_Player. Checks permissions first. Returns true if executed. */ - bool ExecuteCommand(cPlayer * a_Player, const AString & a_Command); // tolua_export + CommandResult ExecuteCommand(cPlayer * a_Player, const AString & a_Command); // tolua_export /** Executes the command, as if it was requested by a_Player. Permisssions are not checked. Returns true if executed (false if not found) */ - bool ForceExecuteCommand(cPlayer * a_Player, const AString & a_Command); // tolua_export + CommandResult ForceExecuteCommand(cPlayer * a_Player, const AString & a_Command); // tolua_export /** Removes all console command bindings that the specified plugin has made */ void RemovePluginConsoleCommands(cPlugin * a_Plugin); |