1
0
Fork 0
Commit Graph

121 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 4cd49d7eca Fix sending incorrect date values on world change
Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
2021-04-12 22:35:07 +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
[IPSA] Chris de Claverie 9a548b3b3e
Plugin reload <plugin_name> feature (#4942)
+ Add `reload <pluginname>`
* Fixes #365

Co-authored-by: Alexander Harkness <me@bearbin.net>
Co-authored-by: pwnOrbitals <c.de-claverie@pm.me>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-27 23:15:03 +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
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* Avoid inefficient AString -> c_str() -> AString round trip

* Avoid redundant string init expressions

* Avoid unnecessary return, continue, etc.

* Add .clang-format to help with clang-tidy fix-its

* Avoid unnecessary passing by value

* Avoid unnecessary local copying

* Avoid copying in range-for loops

* Avoid over-complicated boolean expressions

* Some violations missed by my local clang-tidy

* Allow unnecessary continue statements

* Add brackets

* Another expression missed locally

* Move BindingsProcessor call into clang-tidy.sh and add space

* Fix pushd not found error

* Different grouping of CheckBlockInteractionRate
2020-05-14 22:15:35 +00:00
Mat 7d8da81b92
Updated plugin list format (#4557) 2020-03-27 13:47:04 +01: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
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10 4f26f653e1
Add cPluginManager::GenericCallHook (#4027)
Replace repetitive CallHook functions with a generic implementation.
Also converts some loops to range-based for.

Related to #1134
2018-03-02 10:40:48 +00:00
peterbell10 e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot 49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10 496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +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
mathiascode 4656be19b7 Removed development plugins from settings file 2017-03-19 21:54:01 +01:00
Lukas Pioch 4b1bc1cc5c Removed unnecessary check for lower and upper folder 2017-03-16 17:50:19 +01:00
mathiascode 330d66097f Removed a few default plugins (#3580) 2017-02-24 10:11:38 +01:00
Gareth Nelson 1c31cb7eec Add support for alternate config file locations (#3578) 2017-02-22 14:10:32 +01:00
Mattes D 7cc3fb098d DeadlockDetect now lists some tracked CS's stats. 2017-01-18 09:03:05 +01:00
Mattes D a52de8e8cd DeadlockDetect: Provide more information for debugging. 2017-01-17 18:35:12 +01:00
Mattes D 257c5a1a54 cPluginManager: Use a callback for command handler registration. 2016-06-27 20:51:52 +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 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
Marvin Kopf 9840cc8218 Fix TabAutoComplete
For tab on '/command s' the server now returns 'subcommand' instead of '/command subcommand'.
2016-02-02 18:59:50 +01: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
worktycho 6735b0d534 Only add default plugins if there are not any plugins
Fixes #2082
2015-05-25 18:43:18 +01:00
Lukas Pioch bc838e5bd2 Renamed hook HOOK_ENTITY_CHANGE_WORLD 2015-05-21 12:27:54 +02:00
Alexander Harkness fff5efedc3 Merge pull request #2019 from mc-server/OverrideArgs
Initial Implementation of command line arguments
2015-05-19 10:53:44 +01: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
tycho b9efa02c80 Initial implementation of IniFile overloading 2015-05-16 10:46:51 +01:00
Mattes D f36b00f4d4 All in-game commands go through the OnExecuteCommand hook.
Everything that has a slash at the beginning, doesn't matter if it is a registered command or not.
2015-05-13 18:31:01 +02:00
Mattes D dd10ffb63a OnExecuteCommand hook can override the command result (crXXX). 2015-05-10 23:11:30 +02:00
Mattes D 6c53abed23 Call HOOK_EXECUTE_COMMAND even for unknown console commands.
This allows plugins such as Aliases to intercept even unknown commands.
2015-05-10 21:46:25 +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 4a946aa8c4 Added cPluginManager:IsPluginLoaded() API, better load error msgs. 2015-04-19 17:20:15 +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
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
Mattes D e38f41d32f Merge pull request #1702 from mc-server/chrono
Started to convert more of MCServer to std::chrono
2015-01-18 11:21:36 +01:00
Kirill Kirilenko 2ce2741968 Fixed CppCheck: (performance) Function parameter should be passed by reference. 2015-01-17 15:19:23 +03: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 e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00