You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2018. It is now read-only.
The Evil Man edited this page Jun 25, 2015
·
4 revisions
**Before the plugin system really working, the plugin structure CAN ALWAYS CHANGE! **
Dragonet also support PHP interface.
Example script:
<?php/**@Name: ExamplePlugin@Author: Developer's Name@MainClass: MainClass*///There must be a description section like the code before this line. classMainClass{ //Define the main class/* * PHPPlugin is a Java class extends PluginAdapter which implements Bukkit's Plugin interface. *//** @var PHPPlugin plugin */private$plugin;
publicfunctiononLoad($plugin){
$this->plugin = $plugin;
}
publicfunctiononEnable(){
$plugin->getLogger()->info("Plugin enabled! ");
}
publicfunctiononDisable(){
$plugin->getLogger()->info("Plugin disabled! ");
}
/** @Listener: org.bukkit.event.player.PlayerJoinEvent */publicfunctiononPlayerJoin($event){
$event->getPlayer()->sendMessage("You have joined this cool server! ");
}
}
?>