summaryrefslogtreecommitdiffstats
path: root/source/cPlugin.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-03 13:53:11 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-03 13:53:11 +0200
commit2a72c5c8384d23cad054058ba0066ef5b163694e (patch)
tree035c11a464a7e1a6c3ce3d5caf01ccdbd9e62aa7 /source/cPlugin.h
parentRemoved the DeNotcher project, as it's no longer needed and won't even compile (diff)
downloadcuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar.gz
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar.bz2
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar.lz
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar.xz
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.tar.zst
cuberite-2a72c5c8384d23cad054058ba0066ef5b163694e.zip
Diffstat (limited to 'source/cPlugin.h')
-rw-r--r--source/cPlugin.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/cPlugin.h b/source/cPlugin.h
index e42e970c2..21994977e 100644
--- a/source/cPlugin.h
+++ b/source/cPlugin.h
@@ -51,23 +51,23 @@ public:
virtual bool OnCollectItem (cPickup* a_Pickup, cPlayer* a_Player );
virtual bool OnDisconnect (const AString & a_Reason, cPlayer * a_Player );
virtual bool OnBlockPlace (cPacket_BlockPlace* a_PacketData, cPlayer* a_Player );
- virtual bool OnBlockDig (cPacket_BlockDig * a_PacketData, cPlayer* a_Player, cItem* a_PickupItem ) { (void)a_PacketData; (void)a_Player; (void)a_PickupItem; return false; }
+ virtual bool OnBlockDig (cPacket_BlockDig * a_PacketData, cPlayer * a_Player, cItem * a_PickupItem);
virtual bool OnChat (const char * a_Chat, cPlayer* a_Player );
virtual bool OnLogin (cPacket_Login* a_PacketData );
virtual void OnPlayerSpawn (cPlayer* a_Player );
virtual bool OnPlayerJoin (cPlayer* a_Player );
- virtual void OnPlayerMove (cPlayer* a_Player ) { (void)a_Player; }
- virtual void OnTakeDamage (cPawn* a_Pawn, TakeDamageInfo* a_TakeDamageInfo ) { (void)a_Pawn; (void)a_TakeDamageInfo; }
- virtual bool OnKilled (cPawn* a_Killed, cEntity* a_Killer ) { (void)a_Killed; (void)a_Killer; return false; }
- virtual void OnChunkGenerated (cWorld * a_World, int a_ChunkX, int a_ChunkZ) {}
- virtual bool OnChunkGenerating (cWorld * a_Wordl, int a_ChunkX, int a_ChunkZ, cLuaChunk * a_pLuaChunk ) { return false; }
- virtual bool OnPreCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
- virtual bool OnCraftingNoRecipe(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
- virtual bool OnPostCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
- virtual bool OnBlockToPickup (BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cPlayer * a_Player, const cItem & a_EquippedItem, cItems & a_Pickups) {return false; }
- virtual bool OnWeatherChanged (cWorld * a_World) {return false; }
- virtual bool OnUpdatingSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4) {return false; }
- virtual bool OnUpdatedSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) {return false; }
+ virtual void OnPlayerMove (cPlayer* a_Player );
+ virtual void OnTakeDamage (cPawn* a_Pawn, TakeDamageInfo* a_TakeDamageInfo );
+ virtual bool OnKilled (cPawn* a_Killed, cEntity* a_Killer );
+ virtual void OnChunkGenerated (cWorld * a_World, int a_ChunkX, int a_ChunkZ);
+ virtual bool OnChunkGenerating (cWorld * a_World, int a_ChunkX, int a_ChunkZ, cLuaChunk * a_pLuaChunk);
+ virtual bool OnPreCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe);
+ virtual bool OnCraftingNoRecipe(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe);
+ virtual bool OnPostCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe);
+ virtual bool OnBlockToPickup (BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cPlayer * a_Player, const cItem & a_EquippedItem, cItems & a_Pickups);
+ virtual bool OnWeatherChanged (cWorld * a_World);
+ virtual bool OnUpdatingSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4);
+ virtual bool OnUpdatedSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
// Accessors
const char* GetName() const { return m_Name.c_str(); }
@@ -83,8 +83,9 @@ public:
std::string Permission;
};
- void AddCommand( std::string & a_Command, std::string & a_Description, std::string & a_Permission );
+ void AddCommand(const AString & a_Command, const AString & a_Description, const AString & a_Permission);
// tolua_end
+
typedef bool (FuncCommandHandler)( std::string & a_Command, std::vector< std::string > & a_Split );
void BindCommand( FuncCommandHandler* a_Function, std::string & a_Command ); // >> EXPORTED IN MANUALBINDINGS <<
const std::vector< CommandStruct > & GetCommands() const { return m_Commands; } // >> EXPORTED IN MANUALBINDINGS <<