public interface Player extends Session, CommandSender, Entity, Permissible
| Modifier and Type | Interface and Description |
|---|---|
static class |
Player.Animation |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSee(Entity entity) |
void |
chat(String message) |
void |
disconnect() |
void |
disconnect(String reason) |
boolean |
drop(ItemStack item) |
void |
executeCommand(String command) |
Optional<String> |
getDisplayName() |
int |
getExperienceLevel() |
GameMode |
getGameMode() |
Inventory |
getInventory() |
Locale |
getLocale() |
Optional<Container> |
getOpenContainer() |
Optional<InetSocketAddress> |
getRemoteAddress() |
boolean |
getRemoveFormat() |
Skin |
getSkin() |
int |
getSleepTicks() |
int |
getViewDistance() |
boolean |
hasCommandsEnabled() |
void |
hideEntity(Entity entity) |
boolean |
isBreakingBlock() |
default boolean |
isOnline()
Check whether the player is online or not.
|
boolean |
isSleeping() |
boolean |
isSpawned() |
void |
resetTitle() |
void |
sendActionBar(String message) |
void |
sendActionBar(String message,
int fadein,
int duration,
int fadeout) |
void |
sendTitle(String title,
String subtitle) |
void |
sendTitle(String title,
String subtitle,
int fadeIn,
int stay,
int fadeOut) |
void |
setCommandsEnabled(boolean value) |
void |
setDisplayName(String name) |
void |
setLocale(Locale locale) |
boolean |
setRemoveFormat(boolean value) |
void |
setSkin(Skin skin) |
void |
setViewDistance(int distance) |
void |
showEntity(Entity entity) |
void |
showXboxProfile(Player player) |
void |
showXboxProfile(String xuid) |
void |
sleepOn(com.flowpowered.math.vector.Vector3i position) |
void |
stopSleep() |
boolean |
transfer(InetSocketAddress address) |
boolean |
transfer(String address,
int port) |
getActiveDirectoryRole, getDeviceModel, getDeviceOS, getGameVersion, getServer, getServerAddress, isEducationEdition, isXboxAuthenticatedgetName, getUniqueId, getXuid, isBanned, isWhitelisted, setBanned, setWhitelistedgetName, getServeraddAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentisOp, setOpsendMessage, sendMessageensureAndGet, get, getBoundingBox, getDirectionVector, getEntityId, getGamePosition, getHeight, getLevel, getMotion, getOffset, getPosition, getRotation, getServer, getTickCreated, getTicksLived, getVehicle, getWidth, isAffectedByGravity, isAlive, isCustomNameVisible, isInsideVehicle, isInvulnerable, isOnGround, isSneaking, leaveVehicle, providedComponents, provides, push, remove, setAffectedByGravity, setCustomNameVisible, setInvulnerable, setMotion, setPosition, setPositionFromSystem, setSneaking, setTickCreated, setTicksLived, teleport, teleport, teleport@Nonnull Optional<InetSocketAddress> getRemoteAddress()
getRemoteAddress in interface Sessionint getExperienceLevel()
GameMode getGameMode()
void disconnect()
void disconnect(String reason)
void chat(String message)
void executeCommand(String command)
void hideEntity(Entity entity)
void showEntity(Entity entity)
boolean canSee(Entity entity)
void resetTitle()
Locale getLocale()
getLocale in interface CommandSendervoid setLocale(Locale locale)
boolean transfer(@Nonnull InetSocketAddress address)
boolean transfer(@Nonnull String address, @Nonnegative int port)
boolean isBreakingBlock()
void showXboxProfile(String xuid)
void showXboxProfile(Player player)
boolean getRemoveFormat()
boolean setRemoveFormat(boolean value)
boolean hasCommandsEnabled()
void setCommandsEnabled(boolean value)
Skin getSkin()
void setSkin(Skin skin)
void sleepOn(com.flowpowered.math.vector.Vector3i position)
boolean isSleeping()
int getSleepTicks()
void stopSleep()
void setViewDistance(int distance)
int getViewDistance()
void sendActionBar(String message)
void sendActionBar(String message, int fadein, int duration, int fadeout)
boolean isSpawned()
Inventory getInventory()
default boolean isOnline()
OfflinePlayerisOnline in interface OfflinePlayerCopyright © 2017–2019 NukkitX. All rights reserved.