Refactored event calling so its front loading avoiding the lookup for each event call.
This now uses an annoymous class implementing IExecutor that facilitates direct event method handler calling Changed commands from being executed exclusively by a player to by a CommandSender to facilitate external command callers such as rcon Fixed CustomEventListener Merged in additional events Added getFullName to PluginDescriptionFile which returns the combination of Name and Version There's also a few bits of reformatting as it seems someones been editing with either tabs or dos eol :( By: stevenh <steven.hartland@multiplay.co.uk>
This commit is contained in:
@@ -4,7 +4,7 @@ package org.bukkit.plugin;
|
||||
import java.io.File;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
|
||||
/**
|
||||
@@ -14,21 +14,21 @@ public interface Plugin {
|
||||
/**
|
||||
* Returns the folder that the plugin data's files are located in. The
|
||||
* folder may not yet exist.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public File getDataFolder();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the plugin.yaml file containing the details for this plugin
|
||||
*
|
||||
* @return Contents of the plugin.yaml file
|
||||
*/
|
||||
public PluginDescriptionFile getDescription();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the main configuration file. It should be loaded.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Configuration getConfiguration();
|
||||
@@ -63,11 +63,11 @@ public interface Plugin {
|
||||
* Called when this plugin is enabled
|
||||
*/
|
||||
public void onEnable();
|
||||
|
||||
|
||||
/**
|
||||
* Called when a command registered by this plugin is received.
|
||||
* @param commandLabel
|
||||
* @param commandLabel
|
||||
* @return TODO
|
||||
*/
|
||||
public boolean onCommand(Player player, Command command, String commandLabel, String[] args);
|
||||
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user