Hey everyone, As you may or not know, I'm working on BlockServer and PocketBukkit, alternate MCPE server software written in Java. PocketBukkit is an API wrapper for BlockServer, while BlockServer is the core of the server. @PEMapModder and I would like to see ideas for our API to implement, maybe some things that are too late to change in PocketMine. I know this is getting a little astray from the idea of PHP, but It is Plugin/API related, and I would like to keep this on topic as much as possible. Don't be afraid to share your ideas, some may be implemented! Visit our github. Thanks guys! - jython234
BTW, I just finished simple JavaScript plugin support. It looks like this: Code: /*** name: ExamplePlugin version: 1.0-SNAPSHOT mainClass: ExamplePlugin */ var plugin = null; function init(wrapper){ plugin = wrapper; } function onEnable(){ plugin.getLogger().info("I've been enabled!"); } function onDisable(){ plugin.getLogger().info("I've been enabled!"); } If you have any suggestions, please comment below.
It won't - PocketMine will probably always be the top Pocket Edition server implementation because it's stable and pretty much the only one. Anyways, competition is always good because then we get better products from both sides.
Actually, we are looking for ideas on improvements in the plugin API. As some developers may feel, PocketMine is actually not perfect at its plugin API. There may be some limitations. Nevertheless, it is too late to change on PocketMine. I am going to start working on PocketBukkit global API (we will support different types of plugins in PocketBukkit, from Bukkit plugins to JavaScript plugins (but not PHP ) by different APIs, and we combine these APIs using a global API) soon, and I would like to listen to the community about different things before we actually start. We particularly want to know about different opinions on designing the structure of the event API, as it is something that cannot be changed once it is started (unless we rewrite). Please stay on-topic. We thank you all for your valuable opinions.
Well, as @PEMapModder said, we should stay on topic. But, I will give some information on how this works. First of all, you create a new javascript file in the "plugins" folder. The first line MUST be "/***". The next required items are the plugin's name, version, and main class (not needed right now, just put something random). For example: Code: /*** name: HelloPlugin version: 1.0 mainClass: PutSomethingRandomHere */ Make sure to end that section with "*/". After that you will need 3 javascript functions: init, onEnable, and onDisable. Init takes one argument, a JavaScriptPlugin object. Because of how oracle's script engine works, you can access java classes from the javascript file. Pretty cool huh? Anyway, you should store that object in a variable that you would use (that variable is the key to the entire API). A finished plugin would look something like this: Code: /*** name: ExamplePlugin version: 1.0-SNAPSHOT mainClass: ExamplePlugin */ var plugin = null; function init(wrapper){ plugin = wrapper; } function onEnable(){ plugin.getLogger().info("I've been enabled!"); } function onDisable(){ plugin.getLogger().info("I've been enabled!"); } You can look at the pocketbukkit docs here.
If anyone wants to try it out, head over to http://builds.blockserver.org and use the guest account. Select the PocketBukkit project, find the latest build and click on artifacts. Download the jar, and try it out for yourself .
This global API is very interesting. I think it is a great idea. Especially for people who know Java or JavaScript.