diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-03 13:53:11 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-03 13:53:11 +0200 |
commit | 2a72c5c8384d23cad054058ba0066ef5b163694e (patch) | |
tree | 035c11a464a7e1a6c3ce3d5caf01ccdbd9e62aa7 /source/cPlugin.cpp | |
parent | Removed the DeNotcher project, as it's no longer needed and won't even compile (diff) | |
download | cuberite-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.cpp')
-rw-r--r-- | source/cPlugin.cpp | 240 |
1 files changed, 220 insertions, 20 deletions
diff --git a/source/cPlugin.cpp b/source/cPlugin.cpp index 61471d8f0..9a963f3f2 100644 --- a/source/cPlugin.cpp +++ b/source/cPlugin.cpp @@ -24,57 +24,253 @@ cPlugin::~cPlugin() // return false; // } + + + + void cPlugin::Tick(float a_Dt) { - (void)a_Dt; + UNUSED(a_Dt); } -bool cPlugin::OnBlockPlace( cPacket_BlockPlace* a_PacketData, cPlayer* a_Player ) + + + + +bool cPlugin::OnBlockPlace(cPacket_BlockPlace * a_PacketData, cPlayer * a_Player) { - (void)a_PacketData; - (void)a_Player; + UNUSED(a_PacketData); + UNUSED(a_Player); return false; } -bool cPlugin::OnCollectItem( cPickup* a_Pickup, cPlayer* a_Player ) + + + + +bool cPlugin::OnBlockDig(cPacket_BlockDig * a_PacketData, cPlayer * a_Player, cItem * a_PickupItem) { - (void)a_Pickup; - (void)a_Player; + UNUSED(a_PacketData); + UNUSED(a_Player); + UNUSED(a_PickupItem); return false; } -bool cPlugin::OnDisconnect(const AString & a_Reason, cPlayer* a_Player ) + + + + +bool cPlugin::OnCollectItem(cPickup * a_Pickup, cPlayer * a_Player) { - (void)a_Reason; - (void)a_Player; + UNUSED(a_Pickup); + UNUSED(a_Player); return false; } -bool cPlugin::OnChat( const char* a_Chat, cPlayer* a_Player ) + + + + +bool cPlugin::OnDisconnect(const AString & a_Reason, cPlayer * a_Player) { - (void)a_Chat; - (void)a_Player; + UNUSED(a_Reason); + UNUSED(a_Player); return false; } -bool cPlugin::OnLogin( cPacket_Login* a_PacketData ) + + + + +bool cPlugin::OnChat(const char * a_Chat, cPlayer * a_Player) { - (void)a_PacketData; + UNUSED(a_Chat); + UNUSED(a_Player); return false; } -void cPlugin::OnPlayerSpawn( cPlayer* a_Player ) + + + + +bool cPlugin::OnLogin(cPacket_Login * a_PacketData) { - (void)a_Player; + UNUSED(a_PacketData); + return false; } -bool cPlugin::OnPlayerJoin( cPlayer* a_Player ) + + + + +void cPlugin::OnPlayerSpawn(cPlayer * a_Player) { - (void)a_Player; + UNUSED(a_Player); +} + + + + + +bool cPlugin::OnPlayerJoin(cPlayer * a_Player) +{ + UNUSED(a_Player); return false; } -void cPlugin::AddCommand( std::string & a_Command, std::string & a_Description, std::string & a_Permission ) + + + + +void cPlugin::OnPlayerMove(cPlayer * a_Player) +{ + UNUSED(a_Player); +} + + + + + +void cPlugin::OnTakeDamage(cPawn * a_Pawn, TakeDamageInfo * a_TakeDamageInfo) +{ + UNUSED(a_Pawn); + UNUSED(a_TakeDamageInfo); +} + + + + + +bool cPlugin::OnKilled(cPawn * a_Killed, cEntity * a_Killer) +{ + UNUSED(a_Killed); + UNUSED(a_Killer); + return false; +} + + + + + +void cPlugin::OnChunkGenerated(cWorld * a_World, int a_ChunkX, int a_ChunkZ) +{ + UNUSED(a_World); + UNUSED(a_ChunkX); + UNUSED(a_ChunkZ); +} + + + + + +bool cPlugin::OnChunkGenerating(cWorld * a_World, int a_ChunkX, int a_ChunkZ, cLuaChunk * a_pLuaChunk) +{ + UNUSED(a_World); + UNUSED(a_ChunkX); + UNUSED(a_ChunkZ); + UNUSED(a_pLuaChunk); + return false; +} + + + + + +bool cPlugin::OnPreCrafting(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) +{ + UNUSED(a_Player); + UNUSED(a_Grid); + UNUSED(a_Recipe); + return false; +} + + + + + +bool cPlugin::OnCraftingNoRecipe(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) +{ + UNUSED(a_Player); + UNUSED(a_Grid); + UNUSED(a_Recipe); + return false; +} + + + + + +bool cPlugin::OnPostCrafting(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) +{ + UNUSED(a_Player); + UNUSED(a_Grid); + UNUSED(a_Recipe); + return false; +} + + + + + +bool cPlugin::OnBlockToPickup(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cPlayer * a_Player, const cItem & a_EquippedItem, cItems & a_Pickups) +{ + UNUSED(a_BlockType); + UNUSED(a_BlockMeta); + UNUSED(a_Player); + UNUSED(a_EquippedItem); + UNUSED(a_Pickups); + return false; +} + + + + + +bool cPlugin::OnWeatherChanged(cWorld * a_World) +{ + UNUSED(a_World); + return false; +} + + + + + +bool cPlugin::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) +{ + UNUSED(a_World); + UNUSED(a_BlockX); + UNUSED(a_BlockY); + UNUSED(a_BlockZ); + UNUSED(a_Line1); + UNUSED(a_Line2); + UNUSED(a_Line3); + UNUSED(a_Line4); + return false; +} + + + + + +bool cPlugin::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) +{ + UNUSED(a_World); + UNUSED(a_BlockX); + UNUSED(a_BlockY); + UNUSED(a_BlockZ); + UNUSED(a_Line1); + UNUSED(a_Line2); + UNUSED(a_Line3); + UNUSED(a_Line4); + return false; +} + + + + + +void cPlugin::AddCommand(const AString & a_Command, const AString & a_Description, const AString & a_Permission) { CommandStruct Command; Command.Command = a_Command; @@ -82,3 +278,7 @@ void cPlugin::AddCommand( std::string & a_Command, std::string & a_Description, Command.Permission = a_Permission; m_Commands.push_back( Command ); } + + + + |