Cuberite
A lightweight, fast and extensible game server for Minecraft
Plugin.h
Go to the documentation of this file.
1 
2 // Plugin.h
3 
4 // Declares the cPlugin class representing an interface that a plugin implementation needs to expose, with some helping functions
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "../Defines.h"
13 #include "PluginManager.h"
14 
15 
16 
17 
18 // tolua_begin
19 class cPlugin
20 {
21 public:
22  // tolua_end
23 
27  cPlugin(const AString & a_FolderName);
28 
29  virtual ~cPlugin();
30 
32  virtual void OnDisable(void) {}
33 
36  virtual bool Load(void) = 0;
37 
40  virtual void Unload(void);
41 
42  // Called each tick
43  virtual void Tick(float a_Dt) = 0;
44 
46  virtual bool OnBlockSpread (cWorld & a_World, int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) = 0;
47  virtual bool OnBlockToPickups (cWorld & a_World, Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool, cItems & a_Pickups) = 0;
48  virtual bool OnBrewingCompleting (cWorld & a_World, cBrewingstandEntity & a_BrewingstandEntity) = 0;
49  virtual bool OnBrewingCompleted (cWorld & a_World, cBrewingstandEntity & a_BrewingstandEntity) = 0;
50  virtual bool OnChat (cPlayer & a_Player, AString & a_Message) = 0;
51  virtual bool OnChunkAvailable (cWorld & a_World, int a_ChunkX, int a_ChunkZ) = 0;
52  virtual bool OnChunkGenerated (cWorld & a_World, int a_ChunkX, int a_ChunkZ, cChunkDesc * a_ChunkDesc) = 0;
53  virtual bool OnChunkGenerating (cWorld & a_World, int a_ChunkX, int a_ChunkZ, cChunkDesc * a_ChunkDesc) = 0;
54  virtual bool OnChunkUnloaded (cWorld & a_World, int a_ChunkX, int a_ChunkZ) = 0;
55  virtual bool OnChunkUnloading (cWorld & a_World, int a_ChunkX, int a_ChunkZ) = 0;
56  virtual bool OnCollectingPickup (cPlayer & a_Player, cPickup & a_Pickup) = 0;
57  virtual bool OnCraftingNoRecipe (cPlayer & a_Player, cCraftingGrid & a_Grid, cCraftingRecipe & a_Recipe) = 0;
58  virtual bool OnDisconnect (cClientHandle & a_Client, const AString & a_Reason) = 0;
59  virtual bool OnEntityAddEffect (cEntity & a_Entity, int a_EffectType, int a_EffectDurationTicks, int a_EffectIntensity, double a_DistanceModifier) = 0;
60  virtual bool OnEntityTeleport (cEntity & a_Entity, const Vector3d & a_OldPosition, const Vector3d & a_NewPosition) = 0;
61  virtual bool OnEntityChangingWorld (cEntity & a_Entity, cWorld & a_World) = 0;
62  virtual bool OnEntityChangedWorld (cEntity & a_Entity, cWorld & a_World) = 0;
63  virtual bool OnExecuteCommand (cPlayer * a_Player, const AStringVector & a_Split, const AString & a_EntireCommand, cPluginManager::CommandResult & a_Result) = 0;
64  virtual bool OnExploded (cWorld & a_World, double a_ExplosionSize, bool a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void * a_SourceData) = 0;
65  virtual bool OnExploding (cWorld & a_World, double & a_ExplosionSize, bool & a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void * a_SourceData) = 0;
66  virtual bool OnHandshake (cClientHandle & a_Client, const AString & a_Username) = 0;
67  virtual bool OnHopperPullingItem (cWorld & a_World, cHopperEntity & a_Hopper, int a_DstSlotNum, cBlockEntityWithItems & a_SrcEntity, int a_SrcSlotNum) = 0;
68  virtual bool OnHopperPushingItem (cWorld & a_World, cHopperEntity & a_Hopper, int a_SrcSlotNum, cBlockEntityWithItems & a_DstEntity, int a_DstSlotNum) = 0;
69  virtual bool OnDropSpense (cWorld & a_World, cDropSpenserEntity & a_DropSpenser, int a_SlotNum) = 0;
70  virtual bool OnKilled (cEntity & a_Victim, TakeDamageInfo & a_TDI, AString & a_DeathMessage) = 0;
71  virtual bool OnKilling (cEntity & a_Victim, cEntity * a_Killer, TakeDamageInfo & a_TDI) = 0;
72  virtual bool OnLogin (cClientHandle & a_Client, UInt32 a_ProtocolVersion, const AString & a_Username) = 0;
73  virtual bool OnLoginForge (cClientHandle & a_Client, const AStringMap & a_Mods) = 0;
74  virtual bool OnPlayerAnimation (cPlayer & a_Player, int a_Animation) = 0;
75  virtual bool OnPlayerBreakingBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
76  virtual bool OnPlayerBrokenBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
77  virtual bool OnPlayerDestroyed (cPlayer & a_Player) = 0;
78  virtual bool OnPlayerEating (cPlayer & a_Player) = 0;
79  virtual bool OnPlayerFished (cPlayer & a_Player, const cItems & a_Reward, const int ExperienceAmount) = 0;
80  virtual bool OnPlayerFishing (cPlayer & a_Player, cItems & a_Reward, int & ExperienceAmount) = 0;
81  virtual bool OnPlayerFoodLevelChange (cPlayer & a_Player, int a_NewFoodLevel) = 0;
82  virtual bool OnPlayerJoined (cPlayer & a_Player) = 0;
83  virtual bool OnPlayerLeftClick (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, char a_Status) = 0;
84  virtual bool OnPlayerMoving (cPlayer & a_Player, const Vector3d & a_OldPosition, const Vector3d & a_NewPosition, bool a_PreviousIsOnGround) = 0;
85  virtual bool OnPlayerOpeningWindow (cPlayer & a_Player, cWindow & a_Window) = 0;
86  virtual bool OnPlayerPlacedBlock (cPlayer & a_Player, const sSetBlock & a_BlockChange) = 0;
87  virtual bool OnPlayerPlacingBlock (cPlayer & a_Player, const sSetBlock & a_BlockChange) = 0;
88  virtual bool OnPlayerCrouched (cPlayer & a_Player) = 0;
89  virtual bool OnPlayerRightClick (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) = 0;
90  virtual bool OnPlayerRightClickingEntity(cPlayer & a_Player, cEntity & a_Entity) = 0;
91  virtual bool OnPlayerShooting (cPlayer & a_Player) = 0;
92  virtual bool OnPlayerSpawned (cPlayer & a_Player) = 0;
93  virtual bool OnPlayerTossingItem (cPlayer & a_Player) = 0;
94  virtual bool OnPlayerUsedBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
95  virtual bool OnPlayerUsedItem (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) = 0;
96  virtual bool OnPlayerUsingBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
97  virtual bool OnPlayerUsingItem (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) = 0;
98  virtual bool OnPluginMessage (cClientHandle & a_Client, const AString & a_Channel, ContiguousByteBufferView a_Message) = 0;
99  virtual bool OnPluginsLoaded (void) = 0;
100  virtual bool OnPostCrafting (cPlayer & a_Player, cCraftingGrid & a_Grid, cCraftingRecipe & a_Recipe) = 0;
101  virtual bool OnPreCrafting (cPlayer & a_Player, cCraftingGrid & a_Grid, cCraftingRecipe & a_Recipe) = 0;
102  virtual bool OnProjectileHitBlock (cProjectileEntity & a_Projectile, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Face, const Vector3d & a_BlockHitPos) = 0;
103  virtual bool OnProjectileHitEntity (cProjectileEntity & a_Projectile, cEntity & a_HitEntity) = 0;
104  virtual bool OnServerPing (cClientHandle & a_ClientHandle, AString & a_ServerDescription, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon) = 0;
105  virtual bool OnSpawnedEntity (cWorld & a_World, cEntity & a_Entity) = 0;
106  virtual bool OnSpawnedMonster (cWorld & a_World, cMonster & a_Monster) = 0;
107  virtual bool OnSpawningEntity (cWorld & a_World, cEntity & a_Entity) = 0;
108  virtual bool OnSpawningMonster (cWorld & a_World, cMonster & a_Monster) = 0;
109  virtual bool OnTakeDamage (cEntity & a_Receiver, TakeDamageInfo & a_TakeDamageInfo) = 0;
110  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, cPlayer * a_Player) = 0;
111  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, cPlayer * a_Player) = 0;
112  virtual bool OnWeatherChanged (cWorld & a_World) = 0;
113  virtual bool OnWeatherChanging (cWorld & a_World, eWeather & a_NewWeather) = 0;
114  virtual bool OnWorldStarted (cWorld & a_World) = 0;
115  virtual bool OnWorldTick (cWorld & a_World, std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_LastTickDurationMSec) = 0;
116 
117  // tolua_begin
118  const AString & GetName(void) const { return m_Name; }
119  void SetName(const AString & a_Name) { m_Name = a_Name; }
120 
121  int GetVersion(void) const { return m_Version; }
122  void SetVersion(int a_Version) { m_Version = a_Version; }
123 
125  const AString & GetFolderName(void) const {return m_FolderName; }
126 
128  AString GetLocalFolder(void) const;
129 
131  const AString & GetLoadError(void) const { return m_LoadError; }
132 
134 
135  bool IsLoaded(void) const { return (m_Status == cPluginManager::psLoaded); }
136  // tolua_end
137 
138  // Needed for ManualBindings' tolua_ForEach<>
139  static const char * GetClassStatic(void) { return "cPlugin"; }
140 
141 protected:
142  friend class cPluginManager;
143 
145 
148 
150 
153 
157 
158 
160  void SetLoadError(const AString & a_LoadError);
161 }; // tolua_export
162 
163 
164 
165 
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
eWeather
Definition: Defines.h:160
eExplosionSource
The source of an explosion.
Definition: Defines.h:309
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Definition: Defines.h:38
eSpreadSource
Definition: Defines.h:339
unsigned int UInt32
Definition: Globals.h:157
std::basic_string_view< std::byte > ContiguousByteBufferView
Definition: Globals.h:376
std::vector< AString > AStringVector
Definition: StringUtils.h:12
std::string AString
Definition: StringUtils.h:11
std::map< AString, AString > AStringMap
A string dictionary, used for key-value pairs.
Definition: StringUtils.h:16
Definition: Plugin.h:20
virtual bool OnPostCrafting(cPlayer &a_Player, cCraftingGrid &a_Grid, cCraftingRecipe &a_Recipe)=0
virtual bool OnSpawningMonster(cWorld &a_World, cMonster &a_Monster)=0
AString m_Name
The name of the plugin, used to identify the plugin in the system and for inter-plugin calls.
Definition: Plugin.h:147
AString m_FolderName
Name of the folder (in the Plugins folder) from which the plugin is loaded.
Definition: Plugin.h:152
virtual bool OnEntityAddEffect(cEntity &a_Entity, int a_EffectType, int a_EffectDurationTicks, int a_EffectIntensity, double a_DistanceModifier)=0
virtual bool OnPlayerBreakingBlock(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool OnPlayerPlacedBlock(cPlayer &a_Player, const sSetBlock &a_BlockChange)=0
virtual bool OnPlayerEating(cPlayer &a_Player)=0
virtual bool OnPlayerFishing(cPlayer &a_Player, cItems &a_Reward, int &ExperienceAmount)=0
virtual bool OnWorldStarted(cWorld &a_World)=0
virtual bool OnPlayerFished(cPlayer &a_Player, const cItems &a_Reward, const int ExperienceAmount)=0
virtual bool OnEntityTeleport(cEntity &a_Entity, const Vector3d &a_OldPosition, const Vector3d &a_NewPosition)=0
AString GetLocalFolder(void) const
Returns the folder relative to the MCS Executable, from which the plugin is loaded.
Definition: Plugin.cpp:46
virtual bool OnPlayerBrokenBlock(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool OnChunkUnloading(cWorld &a_World, int a_ChunkX, int a_ChunkZ)=0
const AString & GetLoadError(void) const
Returns the error encountered while loading the plugin.
Definition: Plugin.h:131
virtual bool OnChunkGenerating(cWorld &a_World, int a_ChunkX, int a_ChunkZ, cChunkDesc *a_ChunkDesc)=0
virtual bool OnEntityChangingWorld(cEntity &a_Entity, cWorld &a_World)=0
virtual bool OnPlayerUsingItem(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)=0
virtual bool OnBrewingCompleting(cWorld &a_World, cBrewingstandEntity &a_BrewingstandEntity)=0
virtual bool OnServerPing(cClientHandle &a_ClientHandle, AString &a_ServerDescription, int &a_OnlinePlayersCount, int &a_MaxPlayersCount, AString &a_Favicon)=0
virtual ~cPlugin()
Definition: Plugin.cpp:22
virtual bool OnProjectileHitBlock(cProjectileEntity &a_Projectile, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Face, const Vector3d &a_BlockHitPos)=0
void SetVersion(int a_Version)
Definition: Plugin.h:122
virtual bool OnPlayerUsedItem(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)=0
virtual bool OnPlayerCrouched(cPlayer &a_Player)=0
virtual void OnDisable(void)
Called as the last call into the plugin before it is unloaded.
Definition: Plugin.h:32
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, cPlayer *a_Player)=0
AString m_LoadError
The error encountered while loading the plugin.
Definition: Plugin.h:156
virtual bool OnExploding(cWorld &a_World, double &a_ExplosionSize, bool &a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void *a_SourceData)=0
const AString & GetName(void) const
Definition: Plugin.h:118
cPlugin(const AString &a_FolderName)
Creates a new instance.
Definition: Plugin.cpp:10
virtual bool OnCollectingPickup(cPlayer &a_Player, cPickup &a_Pickup)=0
virtual bool OnEntityChangedWorld(cEntity &a_Entity, cWorld &a_World)=0
virtual bool OnPlayerSpawned(cPlayer &a_Player)=0
int GetVersion(void) const
Definition: Plugin.h:121
cPluginManager::ePluginStatus m_Status
Definition: Plugin.h:144
virtual bool OnSpawningEntity(cWorld &a_World, cEntity &a_Entity)=0
virtual bool OnSpawnedEntity(cWorld &a_World, cEntity &a_Entity)=0
virtual bool OnPlayerOpeningWindow(cPlayer &a_Player, cWindow &a_Window)=0
virtual bool OnHopperPullingItem(cWorld &a_World, cHopperEntity &a_Hopper, int a_DstSlotNum, cBlockEntityWithItems &a_SrcEntity, int a_SrcSlotNum)=0
virtual bool OnExecuteCommand(cPlayer *a_Player, const AStringVector &a_Split, const AString &a_EntireCommand, cPluginManager::CommandResult &a_Result)=0
virtual void Unload(void)
Unloads the plugin.
Definition: Plugin.cpp:31
virtual bool OnPluginsLoaded(void)=0
virtual bool OnWorldTick(cWorld &a_World, std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_LastTickDurationMSec)=0
virtual bool OnPluginMessage(cClientHandle &a_Client, const AString &a_Channel, ContiguousByteBufferView a_Message)=0
virtual bool OnChunkGenerated(cWorld &a_World, int a_ChunkX, int a_ChunkZ, cChunkDesc *a_ChunkDesc)=0
const AString & GetFolderName(void) const
Returns the name of the folder (in the Plugins folder) from which the plugin is loaded.
Definition: Plugin.h:125
virtual bool OnPlayerAnimation(cPlayer &a_Player, int a_Animation)=0
virtual bool OnBlockSpread(cWorld &a_World, int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source)=0
Calls the specified hook with the params given.
virtual bool OnPlayerRightClickingEntity(cPlayer &a_Player, cEntity &a_Entity)=0
virtual bool OnCraftingNoRecipe(cPlayer &a_Player, cCraftingGrid &a_Grid, cCraftingRecipe &a_Recipe)=0
virtual bool OnTakeDamage(cEntity &a_Receiver, TakeDamageInfo &a_TakeDamageInfo)=0
virtual bool OnPlayerPlacingBlock(cPlayer &a_Player, const sSetBlock &a_BlockChange)=0
virtual bool Load(void)=0
Loads and initializes the plugin.
virtual bool OnPlayerUsingBlock(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool OnKilled(cEntity &a_Victim, TakeDamageInfo &a_TDI, AString &a_DeathMessage)=0
static const char * GetClassStatic(void)
Definition: Plugin.h:139
virtual bool OnBrewingCompleted(cWorld &a_World, cBrewingstandEntity &a_BrewingstandEntity)=0
virtual bool OnDropSpense(cWorld &a_World, cDropSpenserEntity &a_DropSpenser, int a_SlotNum)=0
void SetName(const AString &a_Name)
Definition: Plugin.h:119
virtual bool OnPlayerMoving(cPlayer &a_Player, const Vector3d &a_OldPosition, const Vector3d &a_NewPosition, bool a_PreviousIsOnGround)=0
virtual bool OnKilling(cEntity &a_Victim, cEntity *a_Killer, TakeDamageInfo &a_TDI)=0
virtual bool OnPlayerRightClick(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)=0
virtual bool OnLogin(cClientHandle &a_Client, UInt32 a_ProtocolVersion, const AString &a_Username)=0
int m_Version
Definition: Plugin.h:149
virtual bool OnPlayerDestroyed(cPlayer &a_Player)=0
virtual bool OnPlayerLeftClick(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, char a_Status)=0
virtual bool OnHandshake(cClientHandle &a_Client, const AString &a_Username)=0
virtual bool OnProjectileHitEntity(cProjectileEntity &a_Projectile, cEntity &a_HitEntity)=0
virtual bool OnPlayerTossingItem(cPlayer &a_Player)=0
virtual bool OnLoginForge(cClientHandle &a_Client, const AStringMap &a_Mods)=0
virtual bool OnExploded(cWorld &a_World, double a_ExplosionSize, bool a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void *a_SourceData)=0
virtual bool OnWeatherChanged(cWorld &a_World)=0
virtual bool OnPlayerJoined(cPlayer &a_Player)=0
virtual bool OnChat(cPlayer &a_Player, AString &a_Message)=0
cPluginManager::ePluginStatus GetStatus(void) const
Definition: Plugin.h:133
virtual bool OnDisconnect(cClientHandle &a_Client, const AString &a_Reason)=0
virtual bool OnWeatherChanging(cWorld &a_World, eWeather &a_NewWeather)=0
virtual bool OnPlayerUsedBlock(cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool OnPreCrafting(cPlayer &a_Player, cCraftingGrid &a_Grid, cCraftingRecipe &a_Recipe)=0
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, cPlayer *a_Player)=0
virtual void Tick(float a_Dt)=0
virtual bool OnHopperPushingItem(cWorld &a_World, cHopperEntity &a_Hopper, int a_SrcSlotNum, cBlockEntityWithItems &a_DstEntity, int a_DstSlotNum)=0
virtual bool OnChunkAvailable(cWorld &a_World, int a_ChunkX, int a_ChunkZ)=0
void SetLoadError(const AString &a_LoadError)
Sets m_LoadError to the specified string and m_Status to psError.
Definition: Plugin.cpp:55
virtual bool OnSpawnedMonster(cWorld &a_World, cMonster &a_Monster)=0
bool IsLoaded(void) const
Definition: Plugin.h:135
virtual bool OnPlayerShooting(cPlayer &a_Player)=0
virtual bool OnChunkUnloaded(cWorld &a_World, int a_ChunkX, int a_ChunkZ)=0
virtual bool OnBlockToPickups(cWorld &a_World, Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool, cItems &a_Pickups)=0
virtual bool OnPlayerFoodLevelChange(cPlayer &a_Player, int a_NewFoodLevel)=0
ePluginStatus
Defines the status of a single plugin - whether it is loaded, disabled or errored.
Definition: PluginManager.h:60
@ psLoaded
The plugin has been loaded successfully.
Definition: PluginManager.h:62
Definition: Entity.h:76
Definition: Pickup.h:20
Definition: Player.h:29
Definition: Item.h:37
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:215
Represents a UI window.
Definition: Window.h:54
Definition: World.h:53