1
0
Fork 0
Commit Graph

89 Commits

Author SHA1 Message Date
Feyo Korenhof 1be14ebf7f
Added ExperienceAmount variable to HOOK_PLAYER_FISHING and HOOK_PLAYER_FISHED (#5345)
* Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks()

* Fixed formatting and added ScheduleTask to APIDesc

* Added feyokorenhof to contributors

* Added ExperienceAmount variable to all the hook calls.

* Made ExperienceAmount int reference instead of int in HOOK_PLAYER_FISHING. Fixed bug: a_Reward is now a reference

* Add documentation, change ItemFishingRod to pass in experience

Co-authored-by: Alexander Harkness <me@bearbin.net>
2021-11-29 12:53:58 +00:00
Tiger Wang 8b62245dfb Remove LUA_PLUGIN_NAME_VAR_NAME 2021-06-28 21:54:21 +01:00
Tiger Wang eeb63b8901
zlib -> libdeflate (#5085)
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
2021-01-11 16:39:43 +00:00
Tiger Wang 3edcafdf8b TABS OUT OF BED! TABS IN THE CORRIDORS! 2020-09-23 14:34:15 +01:00
Tiger Wang 71b96ab921 Limit fortune level, style fixes 2020-09-23 14:34:15 +01:00
KrystilizeNevaDies 23bca00831
Implement Dropspenser Hook (#4903)
* Implement Dropspenser Hook

Implemented a hook for dropspensing.
HOOK_DROPSPENSE

When plugin callback returns true then dropspense is cancelled

* Update src/Bindings/PluginManager.h

Co-authored-by: peterbell10 <peterbell10@live.co.uk>

* Create OnDropSpense.lua

* Fix indent

* Forgot include

Forgot to include the plugin manager. Although now im confused why it was working on my end without including the plugin manager

* Update plugins.lua with dropspense

* fix typos

* haha notepad++ go brr

Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-09-21 15:31:45 +00:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Alexander Harkness 0a68994f48 Manual merge of #4498.
Credit to @MeMuXin

Closes #4498
2020-03-23 12:18:12 +00:00
Mattes D 221cc4ec5c
Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
satoshinm 6bc5031517 Implement Forge protocol handshake support (#3869) 2017-08-27 23:10:20 +02:00
Lane Kolbly 1ec85a2b2c Add cLuaWindow OnClicked Callback (#3901) 2017-08-17 16:27:43 +02:00
Lukas Pioch 0397535fa7 Removed unused forward declarations (#3888) 2017-08-03 15:10:29 +02:00
Lukas Pioch e35ac1bfb9 Clang 5.0 fixes
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Mattes D 7cc3fb098d DeadlockDetect now lists some tracked CS's stats. 2017-01-18 09:03:05 +01:00
Mattes D bf88312a16 Converted cLuaState::cCallbackPtr into a UniquePtr. 2016-06-27 20:51:53 +02:00
Mattes D 7a6670d1d1 Removed dead code related to callbacks. 2016-06-27 20:51:52 +02:00
Mattes D 257c5a1a54 cPluginManager: Use a callback for command handler registration. 2016-06-27 20:51:52 +02:00
Mattes D 24853397ef LuaState: Implemented proper locking for cCallback. 2016-06-27 20:51:51 +02:00
Mattes D a473725121 Removed the cPluginLua::cResettable class.
The functionality provided by that class has been superseded by cLuaState::cCallback, with better multithreading support.
2016-06-27 20:51:50 +02:00
Mattes D 4489a89fde Changed plugin hook registrations to use cLuaState::cCallback. 2016-06-27 20:51:49 +02:00
Mattes D af8c96026d Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-06-27 20:51:48 +02:00
Mattes D e3d34d9917 Revert "Lua callback" 2016-03-21 09:58:15 +01:00
Mattes D 5dfcc15d1f Removed the cPluginLua::cResettable class.
The functionality provided by that class has been superseded by cLuaState::cCallback, with better multithreading support.
2016-03-17 19:29:02 +01:00
Mattes D eb044e140e Changed plugin hook registrations to use cLuaState::cCallback. 2016-03-17 19:29:01 +01:00
Mattes D 62d81eb763 Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-03-17 19:29:01 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Lukas Pioch 9749c3aac9 Implemented brewing 2015-11-03 18:00:55 +01:00
Mattes D 82d9ac1e1c Namechange to Cuberite 2015-09-25 10:14:17 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Nounours Heureux d79f601d5a Added HOOK_KILLED 2015-06-13 10:00:31 +02:00
Lukas Pioch e30b2ed487 Fixed missing overrides and added a ignore flag for reserved macro for clang version 3.6 and higher. 2015-05-23 16:28:37 +02:00
Lukas Pioch bc838e5bd2 Renamed hook HOOK_ENTITY_CHANGE_WORLD 2015-05-21 12:27:54 +02:00
Lukas Pioch 4d4d1e9c69 Added hooks HOOK_ENTITY_CHANGE_WORLD and HOOK_ENTITY_CHANGED_WORLD
Fixes #1435.
2015-05-18 22:29:39 +02:00
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 c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +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 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
Mattes D eeb580a74e Functions in cPluginManager get references instead of pointers. 2014-10-15 19:09:09 +02:00
Mattes D 2dfcd678c4 Fixed cPlugin::OnPlayerMoving signature. 2014-08-22 10:33:53 +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