66 Commits

Author SHA1 Message Date
Dylan K. Taylor
9c07c206f6 Updated DevTools submodule to pmmp/DevTools@1606a4307b 2020-12-05 20:02:14 +00:00
Dylan K. Taylor
340881d590 remove superfluous newline 2020-10-26 15:59:57 +00:00
Dylan K. Taylor
e2e960e43d tests: add missing function imports 2020-10-26 15:59:42 +00:00
Dylan K. Taylor
b7578fef9c Fixup TesterPlugin to PHPStan standards 2020-08-28 21:17:21 +01:00
Dylan K. Taylor
1f9d672cfc Updated DevTools submodule to release 1.14.1 2020-08-20 16:49:49 +01:00
Dylan K. Taylor
691d92a959 moved tests/plugins/PocketMine-DevTools -> tests/plugins/DevTools 2020-08-10 17:29:44 +01:00
Dylan K. Taylor
303344783a CheckTestCompletionTask: use TaskHandler->cancel() 2020-07-08 10:57:20 +01:00
Dylan K. Taylor
1f2fb73297 updated DevTools submodule to 1.14.0 2020-02-02 10:21:32 +00:00
Dylan K. Taylor
35fabc7765 updated DevTools submodule to 1.13.5 2019-10-28 16:03:26 +00:00
Dylan K. Taylor
acaa0e33b0 update DevTools submodule to pmmp/PocketMine-DevTools@3fadb2c3f4 2019-10-22 10:16:44 +01:00
Dylan K. Taylor
2822465f33 Updated submodules 2019-02-07 16:20:45 +00:00
Dylan K. Taylor
23dc6e09d8 Sync DevTools submodule 2018-12-09 15:34:06 +00:00
Dylan K. Taylor
2858db430e Fixed AsyncTask publishProgress() race condition on task exit
It's possible for a progress update to be lost due to the task finishing before the main thread found the progress update.
2018-10-10 13:41:15 +01:00
Dylan K. Taylor
21e7b5ea43 TesterPlugin: removed usage of deprecated ServerCommandEvent 2018-08-19 14:05:26 +01:00
Dylan K. Taylor
0cdf4d0c55 Spoon the TesterPlugin into the main repository
I am eating my own words this once, because having the tester plugin as a separate repository makes no sense - it is just added barriers to writing proper tests with no actual benefit. Since the tester plugin is specifically intended for CI, it doesn't make sense for it to be in its own module.
2018-08-19 13:58:13 +01:00
Dylan K. Taylor
e6e28b74b5 Nuke the TesterPlugin submodule 2018-08-19 13:47:43 +01:00
Dylan K. Taylor
ad7787e13b PluginLoader: fixed access protocol, updated devtools 2018-06-13 17:22:29 +01:00
Dylan K. Taylor
c835c97aba Fixed phar plugins not reading resources correctly 2018-06-13 12:07:27 +01:00
Dylan K. Taylor
c3c360f589 Bump API to 3.0.0
This may raise a few eyebrows.

Does this mean that all the things that were planned for API 3.0.0 are done?
Not at all. The plans laid out in December 2016 for API 3.0.0 were far too ambitious, and as a result the ALPHA series dragged out forever (18 months now). This is a break away from those plans, to bring development and release flow back to some sort of sanity.

Does this mean that my plugins will stop breaking all the time now?
No, it does not! Development isn't going to stop, although breaking changes will be confined only to major API releases. It's anticipated that the major API version will be bumped as nearly as often as the ALPHA version was during the last 18 months. The reason for this return to 3.0.0 is to allow us to fine-tune our release flow so that plugin developers can get advantage of newer, non-breaking API features without having to bump the API in a breaking way.

What are the criteria for the API versions now?
- Major: This will be bumped for breaking changes, changes which will break plugins. it's expected that we'll roll out new major versions regularly.
- Minor: This will be bumped when non-breaking feature additions are made, such that API 3.0.0 plugins would still load on 3.1.0. However, plugins requiring 3.1.0 will not run on 3.0.0.
- Patch: This will be bumped for bugfix updates. Plugins requiring 3.0.0 will work on 3.0.1, but not vice versa.

TL;DR: This insanity has gone on far too long.
2018-06-12 10:39:49 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
9d16863b1a Convert some TesterPlugin tests into PHPUnit tests, add PHPUnit configuration 2018-06-05 19:33:21 +01:00
Dylan K. Taylor
0233ae1eb6 Updated TesterPlugin submodule 2018-06-04 21:17:48 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
d03f36ebee First look at splitting up AsyncPool and ServerScheduler
This commit contains quite a few breaking changes with respect to how AsyncTasks are handled. This is necessary to allow separation of the ServerScheduler and the AsyncPool, because in the future the ServerScheduler may be removed and instead there will be isolated per-plugin sync-task schedulers - but we cannot have every plugin with its own worker pool for memory usage reasons if nothing else.

The following things have changed:
- ServerScheduler: scheduleAsyncTask(), scheduleAsyncTaskToWorker(), getAsyncTaskPoolSize(), increaseAsyncTaskPoolSize() and similar methods have all been removed. Additionally the static \$WORKERS field has been removed.
- Server: added API method getAsyncPool(). This grants you direct access to the server's AsyncPool. Calls to getScheduler()->scheduleAsyncTask() and scheduleAsyncTaskToWorker() should be replaced with getAsyncPool()->submitTask() and submitTaskToWorker() respectively.
2018-05-30 12:20:10 +01:00
Dylan K. Taylor
b7ca045c51 updated TesterPlugin submodule 2018-05-29 20:11:29 +01:00
Dylan K. Taylor
5138bdc4bd Updated DevTools submodule 2018-04-13 17:38:51 +01:00
Dylan K. Taylor
a30a157d8c API bump to 3.0.0-ALPHA12
Yes, I am not happy about this either. new-versioning has issues, and there hasn't been enough development and testing on it.
I didn't want to delay release to cram in a half-baked new versioning system, and it's ended up delayed anyway and new-versioning is still half-baked.
we're overdue a new release, so here it is.
2018-04-13 13:31:15 +01:00
Dylan K. Taylor
5f52e00213 Fixed plugin loaders trying to load plugins they aren't able to load
closes #2125

This is an API break for things implementing the PluginLoader interface.
2018-04-09 15:54:20 +01:00
Dylan K. Taylor
af2435f199 Removed redundant checks from ItemFactory::init() and BlockFactory::init()
These are never called accidentally, or at least it's highly unlikely to do so. It might be reasonable to throw exceptions for this, but for the meantime they are redundant - extra indentation for no good reason.

This also removes the $force parameter from BlockFactory::init().
2018-02-15 17:42:03 +00:00
Dylan K. Taylor
07bf1c9e22 Bump API version for release 2018-02-04 18:06:02 +00:00
Dylan K. Taylor
0ee78d2416 Update DevTools submodule, fix build 2017-12-17 15:01:05 +00:00
Dylan K. Taylor
c301788864 API bump 2017-12-02 17:22:05 +00:00
Dylan K. Taylor
23bc97e098 Updated PocketMine-DevTools submodule 2017-11-07 09:36:58 +00:00
Dylan K. Taylor
4ed1a39638 Updated DevTools submodule 2017-10-30 17:06:33 +00:00
Dylan K. Taylor
93d60a9beb Updated DevTools submodule 2017-10-24 16:23:04 +01:00
Dylan K. Taylor
e6cecabf3f New skin API, add support for custom capes & custom geometry (#1416)
* Added support for changing skins ingame, custom capes & geometry
* Use PlayerSkinPacket for setting Human skin instead of PlayerList hack
2017-09-29 14:09:00 +01:00
Dylan K. Taylor
194278d986 Updated TesterPlugin submodule 2017-09-21 16:56:27 +01:00
Dylan K. Taylor
77241e14ce Bumped to ALPHA8 to account for AsyncTask API changes 2017-09-14 17:49:12 +01:00
Dylan K. Taylor
130a60f2b2 Fixed ItemFactory::isRegistered() returns false for blocks 2017-09-11 18:23:26 +01:00
Dylan K. Taylor
aaa3b6e59a Added explicit AsyncTask->storeLocal(), removed AsyncTask->__construct() object storage (#1322)
Far too often I see people using IDEs which generate the constructors for them and then accidentally unintentionally store things in the object store. This parent constructor behaviour is unexpected. If a developer wants to store something, they should now do so explicitly by calling storeLocal().
2017-09-10 20:31:28 +01:00
Dylan K. Taylor
f1ccee505b Submodule update (this is getting annoying) 2017-09-09 00:51:20 +01:00
Dylan K. Taylor
cae1a3bb4b Updated DevTools submodule 2017-09-08 21:38:14 +01:00
Dylan K. Taylor
38293913ee Updated DevTools submodule 2017-09-08 20:36:32 +01:00
Dylan K. Taylor
876659cc73 Item factory refactor and added capability to register custom items 2017-08-21 17:49:26 +01:00
Dylan K. Taylor
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
Dylan K. Taylor
be4f48a119 Updating submodules 2017-08-17 18:26:06 +01:00
Dylan K. Taylor
83f29e5639 Fixed tests failing since 83af4dcd 2017-08-17 17:02:13 +01:00
Dylan K. Taylor
0ad4a59d5a Added test for light filter levels (must always be >= 1) 2017-08-05 23:03:13 +01:00
Dylan K. Taylor
b912b9173c Changed how blocks are registered, add API to allow registering custom blocks 2017-08-03 16:46:48 +01:00
Dylan K. Taylor
b28128f835 Submodule updates 2017-07-15 09:43:33 +01:00