Commit Graph

20 Commits

Author SHA1 Message Date
f624871b3f strip extra blank lines (php-cs-fixer) 2020-01-22 14:50:29 +00:00
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
1cc7027f92 plugin: populate missing return type information 2020-01-19 17:09:33 +00:00
45c9caa38c Fixup some formatting issues 2018-10-21 18:15:25 +01:00
10fa74b417 Make clear that Plugin->setEnabled() is @internal
Use of this by plugins will produce a lot of undefined behaviour, such as event handlers not being unregistered, scheduled tasks not being removed, and registered permissions causing memory leaks.
2018-10-07 17:48:11 +01:00
5a55d434ab Nuke plugin loaders from orbit
This features a near-total rewrite of PluginLoaders and some code associated with them.

Highlights:
- PluginManager->registerInterface() does not return anything, and now accepts a PluginLoader instance instead of a string.
- PluginLoader itself is drastically simplified. getPluginFilters(), enablePlugin() and disablePlugin() are now removed. loadPlugin() responsibilities are now solely confined to doing whatever is necessary to make the plugin's classes visible by the server, and does not emit log messages or check for data directories.
- PluginBase->init() and PluginBase->isInitialized() have been removed.
- Plugin interface now declares a signature for the constructor which implementations must comply with.
- Plugin interface now declares setEnabled().
2018-06-12 10:23:49 +01:00
51f43fb375 Removed global ServerScheduler - plugins now get their own isolated schedulers
This change breaks pretty much all API pertaining to synchronous task scheduling.

Significant changes:
- Server->getScheduler() has been removed
- Plugin->getScheduler() has been added - every plugin now has its own scheduler
- Because schedulers are now per-plugin, it is now unnecessary for PluginTask to exist because stopping plugin tasks on plugin disable is as simple as destroying the plugin's scheduler. Therefore PluginTask has now been removed and it is expected for things to now use the base Task class instead.

For the most part, plugins will simply need to change Plugin->getServer()->getScheduler()->... to Plugin->getScheduler()->...
Another highlight is that plugin tasks now no longer have global IDs - they are unique to each scheduler.
2018-05-30 14:11:11 +01:00
c7ac5dfd4b Fixed the doc comment in Plugin::getResources()
It returns SplFileInfo[] not string[]
2018-05-21 17:24:12 +08:00
99c55ac889 Plugin: Fixed return type documentation for getResource() 2017-12-30 12:40:50 +00:00
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
a73c6f1861 Fixed some unnecessary FQNs in docs 2017-06-25 12:43:04 +01:00
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
1cb96d24ce Some fixes, thanks PhpStorm 2017-01-04 11:29:24 +00:00
ae9a3dbd81 Added additional information to Plugin::getDataFolder() 2015-10-06 20:32:33 +08:00
ebb844fa52 Removed unused code, fixed undefined variables 2014-10-11 22:22:51 +02:00
53749483c3 Implemented new Inventory windows on Player, Chest and Furnace 2014-05-23 20:53:06 +02:00
4098252ec7 Use CommandExecutor by default on plugins :P 2014-04-05 21:44:29 +02:00
6d58f32c91 Added PluginLogger 2014-04-05 00:20:09 +02:00
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00