- Removed `Server->getScheduler()`. All plugins now have their own scheduler which is accessible using `Plugin->getScheduler()`. Aside from being syntactically more concise and pleasant, this also allows much more effective management of tasks when plugins are disabled. - Removed `PluginTask` class. Before this PR it was necessary for plugin tasks to descend from `PluginTask` to ensure that the server could clean them up correctly on plugin disable. This is no longer necessary, so the `PluginTask` class has been removed. Plugins may now utilize the `Task` class as a base if they like. - Added `Server->getAsyncPool()`. Since the global scheduler does not exist any more, it does not manage the server's `AsyncPool` any more. Additionally, `ServerScheduler` was previously bloated by a lot of `AsyncTask` related methods, which are now not necessary because direct access to `AsyncPool` is granted instead. - `ServerScheduler`: - `ServerScheduler` has been renamed to `TaskScheduler` since it is now a general-purpose task scheduler which is non-dependent on the user. This allows much greater flexibility and also makes it possible to unit-test. - All `AsyncTask`/`AsyncPool` related methods have been removed - the task scheduler does not manage the async pool anymore. - Calls to `Server->getScheduler()->scheduleAsyncTask()` should be replaced with `Server->getAsyncPool()->submitTask()`. - Calls to `Server->getScheduler()->scheduleAsyncTaskToWorker()` should be replaced with and `Server->getAsyncPool()->submitTaskToWorker()`. ## Backwards compatibility This poses significant backwards compatibility breaks for any plugins utilizing Tasks or AsyncTasks. These breaks are described above, along with basic upgrade steps. The upgrade process is quite straightforward. ## Follow-up A large part of the goal with this pull request is to modularize these parts of the code so that they can be reused and also unit-tested. I would like to remove the existing test set from TesterPlugin at some stage when the AsyncPool can operate without a Server. Because of the above, I am considering making further backwards incompatible changes directly to `AsyncTask` to remove the `Server` parameters from `onCompletion()` and `onProgressUpdate()`. These shouldn't be too difficult to upgrade from and can be prepared for in advance.
A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP
Setup, help & support, FAQs
Head over to the documentation site. If you don't find what you're looking for there, talk to a human. Please do not use our issue tracker for support requests.
Discussion
Plugins
There are a very wide range of already-written plugins available which you can use to customise your server. Check out Poggit, or just search GitHub.
For developers
- Latest API documentation - Doxygen documentation generated from development
- DevTools - A development tools plugin for creating plugins.
Can I contribute?
Yes you can! Contributions are welcomed provided that they comply with our Contributing Guidelines. Please ensure you read the relevant sections of the guidelines carefully before making a Pull Request or opening an Issue.
Where can I get the latest .phar?
- Latest release builds can be found in our GitHub releases.
- Latest bleeding-edge development builds (and other builds in the build job channels) can be found on our Jenkins server.
Note: Please avoid development builds unless there is no other alternative for what you need. Development builds are subject to changes at any time without notice, and it is likely that your server or plugins might break without warning.
Licensing information
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.