summaryrefslogblamecommitdiffstats
path: root/src/Plugin.hpp
blob: e108c4f83071d44f4b733efbd9ae94df8cf7a376 (plain) (tree)
1
2
3
4
5
6
7
8
9



                 


                     
                 
           
 


                        

                                 
                                                                      

                                                     

                                          

                                                    

                                                               

                                                           
 
#pragma once

#include <string>

#include "Vector.hpp"

class BlockInfo;
struct lua_State;
class Chat;

namespace PluginSystem {
	void Init();

	lua_State* GetLuaState();

	void Execute(const std::string &luaCode, bool except = false);

	void CallOnChangeState(std::string newState);

	void CallOnTick(double deltaTime);

	BlockInfo RequestBlockInfo(Vector blockPos);

	void CallOnChatMessage(const Chat& chat, int position);

	void CallOnDisconnected(const std::string &reason);
}