public class NukkitPlayerSession extends LivingEntity implements com.nukkitx.protocol.PlayerSession, Player, ContainerContentListener
Player.Animation| Modifier and Type | Field and Description |
|---|---|
static System |
SYSTEM |
metadataFlags| Constructor and Description |
|---|
NukkitPlayerSession(com.nukkitx.protocol.bedrock.session.BedrockSession<NukkitPlayerSession> session,
NukkitLevel level) |
| Modifier and Type | Method and Description |
|---|---|
PermissionAttachment |
addAttachment(PluginContainer plugin) |
PermissionAttachment |
addAttachment(PluginContainer plugin,
String name) |
PermissionAttachment |
addAttachment(PluginContainer plugin,
String name,
Boolean value) |
boolean |
canOpenContainer() |
boolean |
canSee(Entity entity) |
void |
chat(String message) |
void |
close() |
com.nukkitx.protocol.bedrock.BedrockPacket |
createAddEntityPacket() |
void |
disconnect() |
void |
disconnect(String reason) |
boolean |
drop(ItemStack item) |
boolean |
drop(ItemStack item,
boolean drop) |
void |
executeCommand(String command) |
Optional<String> |
getActiveDirectoryRole() |
com.nukkitx.protocol.bedrock.session.BedrockSession<NukkitPlayerSession> |
getBedrockSession() |
CompletableFuture<List<Chunk>> |
getChunksForRadius(int radius) |
Optional<ContainerManager> |
getContainerManager() |
Optional<ItemStack> |
getCursorSelectedItem() |
String |
getDeviceModel() |
DeviceOS |
getDeviceOS() |
Optional<String> |
getDisplayName() |
Map<String,PermissionAttachmentInfo> |
getEffectivePermissions() |
int |
getExperienceLevel() |
GameMode |
getGameMode() |
String |
getGameVersion() |
NukkitPlayerInventory |
getInventory() |
Locale |
getLocale() |
String |
getName() |
com.nukkitx.protocol.bedrock.handler.BedrockPacketHandler |
getNetworkPacketHandler() |
Optional<Container> |
getOpenContainer() |
Optional<InetSocketAddress> |
getRemoteAddress() |
boolean |
getRemoveFormat() |
String |
getServerAddress() |
Skin |
getSkin() |
int |
getSleepTicks() |
UUID |
getUniqueId() |
int |
getViewDistance() |
Optional<String> |
getXuid() |
boolean |
hasCommandsEnabled() |
boolean |
hasPermission(Permission permission) |
boolean |
hasPermission(String name) |
void |
hideEntity(Entity entity) |
boolean |
isBanned() |
boolean |
isBreakingBlock() |
boolean |
isChunkInView(int x,
int z) |
boolean |
isClosed() |
boolean |
isEducationEdition() |
boolean |
isOnGround() |
boolean |
isOp() |
boolean |
isPermissionSet(Permission permission) |
boolean |
isPermissionSet(String name) |
boolean |
isSleeping() |
boolean |
isSpawned() |
boolean |
isTeleported() |
boolean |
isWhitelisted() |
boolean |
isXboxAuthenticated() |
void |
onAttributeUpdate(com.nukkitx.protocol.bedrock.data.Attribute attribute) |
void |
onContainerContentChange(ItemStack[] contents,
Container container)
Called when the entire contents of the inventory is changed within the observed inventory.
|
void |
onDisconnect(com.nukkitx.network.util.DisconnectReason reason) |
void |
onDisconnect(String reason) |
boolean |
onItemPickup(ItemStack item) |
protected void |
onMetadataUpdate(com.nukkitx.protocol.bedrock.data.MetadataDictionary metadata) |
void |
onSlotChange(int slot,
ItemStack oldItem,
ItemStack newItem,
Container container,
NukkitPlayerSession session)
Called when a single slot is changed within the observed inventory.
|
boolean |
openAnvil(com.flowpowered.math.vector.Vector3i blockPosition) |
void |
recalculatePermissions() |
void |
remove()
Deprecated.
|
void |
removeAttachment(PermissionAttachment attachment) |
void |
resetTitle() |
void |
save() |
void |
sendActionBar(String message) |
void |
sendActionBar(String message,
int fadein,
int duration,
int fadeout) |
void |
sendMessage(Message message) |
void |
sendMessage(String message) |
void |
sendNetworkPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet) |
CompletableFuture<List<Chunk>> |
sendNewChunks() |
void |
sendTitle(String title,
String subtitle) |
void |
sendTitle(String title,
String subtitle,
int fadeIn,
int stay,
int fadeOut) |
void |
setBanned(boolean value) |
void |
setCommandsEnabled(boolean commandsEnabled) |
void |
setCursorSelectedItem(ItemStack item) |
void |
setDisplayName(String name) |
void |
setLocale(Locale locale) |
void |
setOp(boolean value) |
void |
setPosition(com.flowpowered.math.vector.Vector3f position) |
boolean |
setRemoveFormat(boolean value) |
void |
setRotation(Rotation rotation) |
void |
setSkin(Skin skin) |
boolean |
setUntrackedInterationItem(int slot,
ItemStack item) |
void |
setViewDistance(int viewDistance) |
void |
setWhitelisted(boolean value) |
void |
showEntity(Entity entity) |
void |
showXboxProfile(Player player) |
void |
showXboxProfile(String xuid) |
void |
sleepOn(com.flowpowered.math.vector.Vector3i pos) |
void |
stopSleep() |
String |
toString() |
boolean |
transfer(InetSocketAddress address) |
boolean |
transfer(String address,
int port) |
void |
updatePlayerList() |
void |
updateViewableEntities() |
checkIfAlive, get, getBoundingBox, getEntityId, getFlag, getGamePosition, getHeight, getLength, getLevel, getMetadata, getMetadataFlags, getMotion, getOffset, getPosition, getRotation, getServer, getTickCreated, getTicksLived, getVehicle, getWidth, isAffectedByGravity, isAlive, isCustomNameVisible, isInsideVehicle, isInvulnerable, isMovementStale, isRemoved, isSneaking, leaveVehicle, providedComponents, provides, push, registerComponent, resetStaleMovement, setAffectedByGravity, setCustomNameVisible, setEntityId, setFlag, setInvulnerable, setMotion, setPositionFromSystem, setSneaking, setTickCreated, setTicksLived, teleport, teleport, teleportclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetServerensureAndGet, get, getBoundingBox, getDirectionVector, getEntityId, getGamePosition, getHeight, getLevel, getMotion, getOffset, getPosition, getRotation, getServer, getTickCreated, getTicksLived, getVehicle, getWidth, isAffectedByGravity, isAlive, isCustomNameVisible, isInsideVehicle, isInvulnerable, isSneaking, leaveVehicle, providedComponents, provides, push, setAffectedByGravity, setCustomNameVisible, setInvulnerable, setMotion, setPositionFromSystem, setSneaking, setTickCreated, setTicksLived, teleport, teleport, teleportpublic static final System SYSTEM
public NukkitPlayerSession(com.nukkitx.protocol.bedrock.session.BedrockSession<NukkitPlayerSession> session, NukkitLevel level)
public com.nukkitx.protocol.bedrock.session.BedrockSession<NukkitPlayerSession> getBedrockSession()
public boolean isChunkInView(int x,
int z)
public void sendNetworkPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)
public CompletableFuture<List<Chunk>> sendNewChunks()
public void updateViewableEntities()
public void save()
save in class BaseEntitypublic CompletableFuture<List<Chunk>> getChunksForRadius(int radius)
public boolean setUntrackedInterationItem(int slot,
ItemStack item)
public boolean isOnGround()
isOnGround in interface EntityisOnGround in class BaseEntitypublic Optional<Container> getOpenContainer()
getOpenContainer in interface Playerpublic Optional<ContainerManager> getContainerManager()
public boolean openAnvil(com.flowpowered.math.vector.Vector3i blockPosition)
public boolean canOpenContainer()
public void updatePlayerList()
public boolean isTeleported()
isTeleported in class BaseEntity@Nonnull public String getName()
getName in interface CommandSendergetName in interface OfflinePlayer@Nonnull public UUID getUniqueId()
getUniqueId in interface OfflinePlayer@Nonnull public Optional<String> getXuid()
getXuid in interface OfflinePlayerpublic boolean isBanned()
isBanned in interface OfflinePlayerpublic void setBanned(boolean value)
setBanned in interface OfflinePlayerpublic boolean isWhitelisted()
isWhitelisted in interface OfflinePlayerpublic void setWhitelisted(boolean value)
setWhitelisted in interface OfflinePlayerpublic com.nukkitx.protocol.bedrock.BedrockPacket createAddEntityPacket()
createAddEntityPacket in class BaseEntitypublic boolean transfer(@Nonnull InetSocketAddress address)
public boolean transfer(@Nonnull String address, @Nonnegative int port)
public boolean isBreakingBlock()
isBreakingBlock in interface Playerpublic void showXboxProfile(String xuid)
showXboxProfile in interface Playerpublic void showXboxProfile(Player player)
showXboxProfile in interface Playerpublic boolean getRemoveFormat()
getRemoveFormat in interface Playerpublic boolean setRemoveFormat(boolean value)
setRemoveFormat in interface Playerpublic boolean hasCommandsEnabled()
hasCommandsEnabled in interface Playerpublic void setCommandsEnabled(boolean commandsEnabled)
setCommandsEnabled in interface Playerpublic void sleepOn(com.flowpowered.math.vector.Vector3i pos)
public boolean isSleeping()
isSleeping in interface Playerpublic int getSleepTicks()
getSleepTicks in interface Playerpublic int getViewDistance()
getViewDistance in interface Playerpublic void setViewDistance(int viewDistance)
setViewDistance in interface Playerpublic void sendActionBar(String message)
sendActionBar in interface Playerpublic void sendActionBar(String message, int fadein, int duration, int fadeout)
sendActionBar in interface Playerpublic boolean drop(ItemStack item, boolean drop)
@Nonnull public Optional<String> getDisplayName()
getDisplayName in interface Playerpublic void setDisplayName(@Nullable String name)
setDisplayName in interface Player@Nonnull public Optional<InetSocketAddress> getRemoteAddress()
getRemoteAddress in interface PlayergetRemoteAddress in interface Sessionpublic boolean isXboxAuthenticated()
isXboxAuthenticated in interface Session@Nonnull public DeviceOS getDeviceOS()
getDeviceOS in interface Sessionpublic boolean isEducationEdition()
isEducationEdition in interface Session@Nonnull public String getDeviceModel()
getDeviceModel in interface Session@Nonnull public String getGameVersion()
getGameVersion in interface Session@Nonnull public String getServerAddress()
getServerAddress in interface Session@Nonnull public Optional<String> getActiveDirectoryRole()
getActiveDirectoryRole in interface Sessionpublic int getExperienceLevel()
getExperienceLevel in interface Playerpublic GameMode getGameMode()
getGameMode in interface Playerpublic void disconnect()
disconnect in interface Playerpublic void disconnect(@Nullable String reason)
disconnect in interface Playerpublic void executeCommand(String command)
executeCommand in interface Playerpublic void hideEntity(@Nonnull Entity entity)
hideEntity in interface Playerpublic void showEntity(@Nonnull Entity entity)
showEntity in interface Playerpublic void resetTitle()
resetTitle in interface Playerpublic Locale getLocale()
getLocale in interface CommandSendergetLocale in interface Playerpublic boolean onItemPickup(ItemStack item)
onItemPickup in class BaseEntitypublic com.nukkitx.protocol.bedrock.handler.BedrockPacketHandler getNetworkPacketHandler()
public void onSlotChange(int slot,
@Nullable
ItemStack oldItem,
@Nullable
ItemStack newItem,
@Nonnull
Container container,
@Nullable
NukkitPlayerSession session)
ContainerContentListeneronSlotChange in interface ContainerContentListenerslot - slot in questionoldItem - old item in slotnewItem - new item in slotcontainer - inventory being observedsession - session which caused the changepublic void onContainerContentChange(@Nonnull ItemStack[] contents, @Nonnull Container container)
ContainerContentListeneronContainerContentChange in interface ContainerContentListenercontents - new contents of the inventorycontainer - inventory being observedpublic void sendMessage(@Nonnull String message)
sendMessage in interface MessageRecipientpublic void sendMessage(@Nonnull Message message)
sendMessage in interface MessageRecipientpublic boolean isPermissionSet(String name)
isPermissionSet in interface Permissiblepublic boolean isPermissionSet(Permission permission)
isPermissionSet in interface Permissiblepublic boolean hasPermission(String name)
hasPermission in interface Permissiblepublic boolean hasPermission(Permission permission)
hasPermission in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin)
addAttachment in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin, String name)
addAttachment in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin, String name, Boolean value)
addAttachment in interface Permissiblepublic void removeAttachment(PermissionAttachment attachment)
removeAttachment in interface Permissiblepublic void recalculatePermissions()
recalculatePermissions in interface Permissiblepublic Map<String,PermissionAttachmentInfo> getEffectivePermissions()
getEffectivePermissions in interface Permissiblepublic boolean isOp()
isOp in interface ServerOperatorpublic void setOp(boolean value)
setOp in interface ServerOperatorpublic void setPosition(@Nonnull com.flowpowered.math.vector.Vector3f position)
setPosition in interface EntitysetPosition in class BaseEntitypublic void setRotation(@Nonnull Rotation rotation)
setRotation in class BaseEntitypublic void onAttributeUpdate(com.nukkitx.protocol.bedrock.data.Attribute attribute)
onAttributeUpdate in class BaseEntityprotected void onMetadataUpdate(com.nukkitx.protocol.bedrock.data.MetadataDictionary metadata)
onMetadataUpdate in class BaseEntity@Deprecated public void remove()
remove in interface Entityremove in class BaseEntitypublic NukkitPlayerInventory getInventory()
getInventory in interface Playerpublic void close()
close in interface com.nukkitx.protocol.PlayerSessionpublic boolean isClosed()
isClosed in interface com.nukkitx.protocol.PlayerSessionpublic void onDisconnect(@Nonnull com.nukkitx.network.util.DisconnectReason reason)
onDisconnect in interface com.nukkitx.protocol.PlayerSessionpublic void onDisconnect(@Nonnull String reason)
onDisconnect in interface com.nukkitx.protocol.PlayerSessionCopyright © 2017–2019 NukkitX. All rights reserved.