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:
Bukkit/Spigot
2011-01-29 16:23:56 +00:00
parent 9755073204
commit df05c36540
18 changed files with 534 additions and 361 deletions

View File

@@ -3,12 +3,13 @@ package org.bukkit.entity;
import java.net.InetSocketAddress;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
/**
* Represents a player, connected or not
*
*
*/
public interface Player extends HumanEntity {
public interface Player extends HumanEntity, CommandSender {
/**
* Checks if this player is currently online
*
@@ -16,20 +17,6 @@ public interface Player extends HumanEntity {
*/
public boolean isOnline();
/**
* Checks if this player is currently op
*
* @return true if they are online
*/
public boolean isOp();
/**
* Sends this player a message, which will be displayed in their chat
*
* @param message Message to be displayed
*/
public void sendMessage(String message);
/**
* Gets the "friendly" name to display of this player. This may include color.
*
@@ -49,14 +36,14 @@ public interface Player extends HumanEntity {
* @return String containing a color formatted name to display for this player
*/
public void setDisplayName(String name);
/**
* Set the target of the player's compass.
*
*
* @param loc
*/
public void setCompassTarget(Location loc);
/**
* Gets the socket address of this player
* @return the player's address