public class PlayerSession extends LivingEntity implements Player, ContainerContentListener
Player.Animation| Modifier and Type | Field and Description |
|---|---|
static System |
SYSTEM |
metadataFlags| Constructor and Description |
|---|
PlayerSession(LoginSession session,
NukkitLevel level) |
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 PlayerSession(LoginSession session, NukkitLevel level)
public com.nukkitx.protocol.bedrock.BedrockServerSession 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 void onSlotChange(int slot,
@Nullable
ItemStack oldItem,
@Nullable
ItemStack newItem,
@Nonnull
Container container,
@Nullable
PlayerSession 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()
public boolean isClosed()
Copyright © 2017–2020 NukkitX. All rights reserved.