Skip to content
This repository has been archived by the owner on May 3, 2018. It is now read-only.

Dragonet PHP Plugin Scripting

The Evil Man edited this page Jun 25, 2015 · 4 revisions

Dragonet also support PHP interface. Example script:

<?php
/**
@Name: ExamplePlugin
@Author: Developer's Name
@MainClass: MainClass
*/
class MainClass{
    /*
     * PHPPlugin is a Java class extends PluginAdapter which implements Bukkit's Plugin interface.
    */
    /** @var PHPPlugin plugin */
    private $plugin;

    function onLoad($plugin){
        $this->plugin = $plugin;
    }

    function onEnable(){
        $plugin->getLogger()->info("Plugin enabled! ");
    }

    function onDisable(){
        $plugin->getLogger()->info("Plugin disabled! ");
    }
}
?>
Clone this wiki locally