summaryrefslogtreecommitdiffstats
path: root/source/squirrelbindings/SquirrelBaseClass.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-07 22:39:40 +0200
committermadmaxoft <github@xoft.cz>2013-08-07 22:39:40 +0200
commit09ebda4d10ef004d196315b829e9c6740dd3d1ee (patch)
tree402223064c637abc1a036c82177f63ac8f534843 /source/squirrelbindings/SquirrelBaseClass.h
parentMerge pull request #48 from mc-server/BlockTracing (diff)
downloadcuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar.gz
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar.bz2
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar.lz
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar.xz
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.tar.zst
cuberite-09ebda4d10ef004d196315b829e9c6740dd3d1ee.zip
Diffstat (limited to 'source/squirrelbindings/SquirrelBaseClass.h')
-rw-r--r--source/squirrelbindings/SquirrelBaseClass.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/source/squirrelbindings/SquirrelBaseClass.h b/source/squirrelbindings/SquirrelBaseClass.h
deleted file mode 100644
index fb5e95c05..000000000
--- a/source/squirrelbindings/SquirrelBaseClass.h
+++ /dev/null
@@ -1,66 +0,0 @@
-
-#pragma once
-
-
-
-
-#ifdef USE_SQUIRREL
-
-
-
-
-
-#include "SquirrelBindings.h"
-#include "../Plugin_Squirrel.h"
-#include "../PluginManager.h"
-#include "../Root.h"
-#include "../SquirrelCommandBinder.h"
-
-
-
-
-
-// The baseclass for squirrel plugins
-class cSquirrelBaseClass
-{
-public:
- cSquirrelBaseClass()
- : m_Instance(0)
- {
- }
-
- void setInstance(cPlugin_Squirrel *a_Instance)
- {
- m_Instance = a_Instance;
- }
-
- void AddHook(short a_Hook)
- {
- if(m_Instance)
- cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook);
- }
-
- void AddCommand( std::string a_Command, std::string a_Description, std::string a_Permission )
- {
- if(m_Instance) m_Instance->AddCommand(a_Command, a_Description, a_Permission);
- }
-
- bool BindCommand( const std::string a_Command, const std::string a_Permission, Sqrat::Function a_Callback)
- {
- if(!m_Instance) return false;
- return cRoot::Get()->GetPluginManager()->GetSquirrelCommandBinder()->BindCommand(a_Command, a_Permission, m_Instance, a_Callback);
- }
-
-protected:
- cPlugin_Squirrel *m_Instance;
-};
-
-
-
-
-
-#endif // USE_SQUIRREL
-
-
-
-