Files
DeltaZern/paper-api/src/main/java/org/bukkit/entity/Player.java
T
Bukkit/Spigot 7b32aee768 Exposes the recently added updateInventory method.
We've decided to expose updateInventory as a temporary work-around for
 the inventory not updating issue we're aware of. The reasoning behind
 this is that addressing it properly will take some time and work and
 as this is clearly a roadblock for some plugin authors, the delay is
 not really acceptable.

By: EvilSeph <evilseph@unaligned.org>
2011-02-13 00:22:00 -05:00

89 lines
2.2 KiB
Java

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, CommandSender {
/**
* Checks if this player is currently online
*
* @return true if they are online
*/
public boolean isOnline();
/**
* Gets the "friendly" name to display of this player. This may include color.
*
* Note that this name will not be displayed in game, only in chat and places
* defined by plugins
*
* @return String containing a color formatted name to display for this player
*/
public String getDisplayName();
/**
* Sets the "friendly" name to display of this player. This may include color.
*
* Note that this name will not be displayed in game, only in chat and places
* defined by plugins
*
* @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
*/
public InetSocketAddress getAddress();
/**
* Kicks player with custom kick message.
*
* @return
*/
public void kickPlayer(String message);
/**
* Makes the player perform the given command
*
* @param command Command to perform
* @return true if the command was successful, otherwise false
*/
public boolean performCommand(String command);
/**
* Returns if the player is in sneak mode
* @return true if player is in sneak mode
*/
public boolean isSneaking();
/**
* Sets the sneak mode the player
* @param sneak true if player should appear sneaking
*/
public void setSneaking(boolean sneak);
/**
* Forces an update of the player's entire inventory.
*
* @return
*
* @deprecated This method should not be relied upon as it is a temporary work-around for a larger, more complicated issue.
*/
public void updateInventory();
}