1
0
Commit Graph

78 Commits

Author SHA1 Message Date
Mattes D
dd10ffb63a OnExecuteCommand hook can override the command result (crXXX). 2015-05-10 23:11:30 +02:00
Mattes D
cbb1eff17a Added the EntireCommand parameter to HOOK_EXECUTE_COMMAND.
Fixes #1996.
2015-05-10 21:37:46 +02:00
Mattes D
b7d1d701b9 Plugin removes its command registrations and webtabs when unloaded.
Fixes #1890.
2015-04-25 18:11:14 +02:00
Mattes D
288d2280fa Refactored cWebPlugin for C++11 style and proper WebTab clearing. 2015-04-19 14:35:04 +02:00
Mattes D
a9b5a6c3a6 Split the plugin names and plugin folders to avoid confusing them.
Ref.: http://forum.mc-server.org/showthread.php?tid=1877
2015-04-19 10:57:41 +02:00
Mattes D
38d666432d Fixed plugin hook calls when unloading plugins.
If a plugin installs any hooks in its Initialize method and then causes the Lua runtime to abort, the server asserted because the hooks were called while the plugin was being unloaded.
2015-04-10 22:31:23 +02:00
Mattes D
0f45d1fbe2 cPluginLua:cResettable no longer shares CS with plugin.
This fixes locking the resettable while the plugin is already gone. Hopefully no deadlocks.
2015-03-20 16:51:49 +01:00
Mattes D
781c8683f7 Added cPluginLua::cResettable interface, used for scheduled tasks.
This allows plugins to register objects that can "survive" the plugin unloading - they will simply bail out if the plugin is already unloaded, instead of referencing bad plugin data.
Fixes #1556.
2015-03-20 15:13:33 +01:00
flx5
f6912bd01c Fixed coding conventions for Pull Request #1807 2015-03-11 20:02:11 +01:00
flx5
d130696e95 Fixes #493 and #490 2015-03-11 04:14:17 +01:00
joshi07
f71b1fe799 Added OnTeleportEntity hook for plugins.
Plugins may or may not allow teleport to the new position.
Updated the HookNotify plugin with it.
2015-03-05 11:52:42 +01:00
Tycho
2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Mattes D
ccdf03daaf Refactored all player block placing to go through hooks.
Fixes #1618.
2014-12-24 07:20:17 +01:00
Mattes D
34807248e2 Fixed the CRAFTING_NO_RECIPE hook call.
It used a pointer-to-pointer-to-cCraftingRecipe, which the Lua bindings didn't know how to handle, and emitted a warning message at runtime.
Fixes #1641.
2014-12-04 09:21:57 +01:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Mattes D
eeb580a74e Functions in cPluginManager get references instead of pointers. 2014-10-15 19:09:09 +02:00
Tycho
6ffb7835e7 Removed a few unnessicary includes 2014-09-26 16:26:03 +01:00
Mattes D
2dfcd678c4 Fixed cPlugin::OnPlayerMoving signature. 2014-08-22 10:33:53 +02:00
Mattes D
1e5d770d7f Fixed a compile-time warning in MSVC. 2014-08-21 21:37:52 +02:00
STRWarrior
3a113e3a75 Merge pull request #1339 from mc-server/Hooks
Added HOOK_SERVER_PING
2014-08-20 22:57:48 +02:00
Howaner
4da61e67d7 Renamed a_Motd to a_ServerDescription. 2014-08-20 22:22:38 +02:00
Howaner
cf5ab14ca5 Added a_ClientHandle to the HOOK_SERVER_PING hook. 2014-08-20 22:19:50 +02:00
Howaner
228dd61995 Added HOOK_SERVER_PING 2014-08-20 16:01:30 +02:00
Howaner
a68c70c900 Better OnPlayerMoving hook. 2014-08-16 18:44:14 +02:00
Howaner
9395cf0bca First implementation of HOOK_SERVER_PING. 2014-08-16 18:02:16 +02:00
madmaxoft
93d29555e5 Style: Normalized to no spaces before closing parenthesis. 2014-07-21 17:40:43 +02:00
madmaxoft
5e198c6730 Basic style fixes. 2014-07-17 22:50:58 +02:00
madmaxoft
2423fbf2ef Normalized comments.
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17 22:15:34 +02:00
madmaxoft
7d0fc85d00 Merge branch 'master' into potions 2014-07-17 11:01:26 +02:00
Mattes D
98244e96d1 Merge pull request #1193 from mc-server/deathmessages
Death messages
2014-07-17 10:12:22 +02:00
Tiger Wang
2189f37c20 Resolved backwards compatibility issues 2014-07-16 11:38:52 +01:00
archshift
4e6395d6ff For now, removed creator member from Entity Effect for pointer safety 2014-07-11 17:27:29 -07:00
archshift
e824cd09b3 Merge remote-tracking branch 'origin/master' into potions
Conflicts:
	src/Entities/Player.cpp
	src/Entities/ProjectileEntity.cpp
2014-07-09 23:28:27 -07:00
Tiger Wang
a0d2df9327 Tailored death messages 2014-07-04 10:55:09 +01:00
madmaxoft
2dbed03cbc Changed OnWeatherChanging hook to always read the returned weather.
Ref.: http://forum.mc-server.org/showthread.php?tid=1512
2014-07-03 17:49:21 +02:00
Mattes D
9204c8a124 Merge pull request #1139 from Howaner/Hooks
Add hook HOOK_PLAYER_FOOD_LEVEL_CHANGE
2014-07-02 16:33:24 +02:00
Howaner
4a9002045b Removed foodlevel-change possibility. Plugins can cancel the event and use cPlayer:SetFoodLevel() 2014-07-02 14:46:00 +02:00
madmaxoft
0dfaad4123 Fixed a possibly unused variable. 2014-07-01 22:28:58 +02:00
Howaner
8e11f7a1f6 Fixes. 2014-06-30 21:50:40 +02:00
Howaner
aa753a92c0 Add new hook: HOOK_PLAYER_FOOD_LEVEL_CHANGE 2014-06-30 15:12:56 +02:00
archshift
e8143de01b Nullify deleted pointers. 2014-06-19 01:49:56 -07:00
madmaxoft
fa1d85feca Added the OnEntityAddEffect hook. 2014-06-17 11:39:22 -07:00
madmaxoft
d92520016d Fixed OnProjectileHitBlock bindings.
Also sorted the various cLuaState::Push() functions.
2014-06-03 19:29:23 +02:00
Mattes D
61edb83ce5 Merge pull request #844 from mc-server/ProjectileHitBlock
OnProjectileHitBlock tweak.
2014-06-01 20:10:03 +02:00
STRWarrior
319169eafb Made a_BlockHitPos a reference 2014-06-01 14:06:47 +02:00
STRWarrior
d1b23060ad Used recommendations 2014-05-31 14:14:55 +02:00
madmaxoft
4d704255de HOOK_DISCONNECT has cClientHandle as its first parameter.
Ref.: #655.
2014-05-02 12:35:34 +02:00
Tycho
ee354a405b Fixed OnPluginMessage hook not exiting early.
OnPluginMessage hook would call all plugins even after one returned true.
Fixes CID 43512
2014-04-27 12:37:08 -07:00
Tycho
b449ad8613 Merge branch 'MacFixes'
Conflicts:
	src/DeadlockDetect.cpp
	src/World.cpp
2014-04-02 06:54:57 -07:00
STRWarrior
36e1e57d03 Using recommendations (I think) 2014-03-30 17:21:13 +02:00