Package org.cloudburstmc.server.player
Class CloudPlayer
java.lang.Object
org.cloudburstmc.server.entity.BaseEntity
org.cloudburstmc.server.entity.EntityLiving
org.cloudburstmc.server.entity.EntityCreature
org.cloudburstmc.server.entity.EntityHuman
org.cloudburstmc.server.player.CloudPlayer
- All Implemented Interfaces:
org.cloudburstmc.api.command.CommandSender,org.cloudburstmc.api.entity.Creature,org.cloudburstmc.api.entity.Damageable,org.cloudburstmc.api.entity.Entity,org.cloudburstmc.api.entity.Human,org.cloudburstmc.api.entity.Living,org.cloudburstmc.api.inventory.InventoryHolder,org.cloudburstmc.api.level.ChunkLoader,org.cloudburstmc.api.permission.Permissible,org.cloudburstmc.api.permission.ServerOperator,org.cloudburstmc.api.player.Player
public class CloudPlayer
extends EntityHuman
implements org.cloudburstmc.api.command.CommandSender, org.cloudburstmc.api.inventory.InventoryHolder, org.cloudburstmc.api.level.ChunkLoader, org.cloudburstmc.api.player.Player
- Author:
- MagicDroidX & Box Nukkit Project
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CloudAdventureSettingsorg.cloudburstmc.api.block.Blockprotected intprotected booleanlongstatic floatprotected Stringprotected Map<Long,DummyBossBar>protected booleanorg.cloudburstmc.api.entity.projectile.FishingHookprotected PlayerFoodprotected com.nukkitx.math.vector.Vector3fprotected AtomicIntegerprotected Map<UUID,CloudPlayer>protected intprotected Stringlongprotected intprotected intlongbooleanstatic floatprotected intprotected com.nukkitx.math.vector.Vector3fintprotected it.unimi.dsi.fastutil.bytes.ByteSetintprotected PlayerDataprotected longprotected booleanprotected CustomFormprotected intprotected com.nukkitx.protocol.bedrock.BedrockServerSessionprotected com.nukkitx.math.vector.Vector3ibooleanprotected org.cloudburstmc.api.level.Locationprotected intcom.nukkitx.math.vector.Vector3fprotected intprotected intprotected floatprotected com.nukkitx.math.vector.Vector3fprotected Stringprotected intprotected byteprotected com.google.common.collect.BiMap<Byte,org.cloudburstmc.api.inventory.Inventory>protected com.google.common.collect.BiMap<org.cloudburstmc.api.inventory.Inventory,Byte>Fields inherited from class org.cloudburstmc.server.entity.EntityHuman
identity, skinFields inherited from class org.cloudburstmc.server.entity.EntityLiving
attackTime, invisible, movementSpeed, turtleTicksFields inherited from class org.cloudburstmc.server.entity.BaseEntity
absorption, age, blocksAround, boundingBox, chunk, closed, collisionBlockStates, data, deadTicks, effects, entityCollisionReduction, fallDistance, fireProof, fireTicks, firstMove, hasSpawned, health, highestPosition, inBlock, inPortalTicks, invulnerable, isCollided, isCollidedHorizontally, isCollidedVertically, isPlayer, isStatic, justCreated, keepMovement, lastDamageCause, lastMotion, lastPitch, lastPosition, lastUpdate, lastYaw, level, maxFireTicks, motion, motionChanged, noDamageTicks, onGround, passengers, pitch, pitchDelta, position, positionChanged, scale, server, tag, ticksLived, timing, vehicle, yaw, yawDelta, ySize -
Constructor Summary
ConstructorsConstructorDescriptionCloudPlayer(com.nukkitx.protocol.bedrock.BedrockServerSession session, ClientChainData chainData) -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.api.permission.PermissionAttachmentaddAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin)org.cloudburstmc.api.permission.PermissionAttachmentaddAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin, String name)org.cloudburstmc.api.permission.PermissionAttachmentaddAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin, String name, Boolean value)protected voidvoidaddExperience(int add)voidaddMovement(double x, double y, double z, double yaw, double pitch, double headYaw)bytebooleanattack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)booleanawardAchievement(String achievementId)static intcalculateRequireExperience(int level)booleancanCollideWith(org.cloudburstmc.api.entity.Entity entity)booleancanInteract(com.nukkitx.math.vector.Vector3f pos, double maxDistance)booleancanInteract(com.nukkitx.math.vector.Vector3f pos, double maxDistance, double maxDiff)booleanbooleancanSee(CloudPlayer player)booleanSends a chat message as this player.protected voidprotected voidprotected voidcheckGroundState(double movX, double movY, double movZ, double dx, double dy, double dz)voidprotected voidvoidprotected booleanvoidvoidclose()voidvoidvoidvoidclose(org.cloudburstmc.api.locale.TextContainer message)voidvoidvoidcloseInventory(CloudPlayer who)voidprotected com.nukkitx.protocol.bedrock.BedrockPacketlongcreateBossBar(String text, int length)Deprecated.longcreateBossBar(DummyBossBar dummyBossBar)Creates and sends a BossBar to the playerprotected voidbooleandropItem(org.cloudburstmc.api.item.ItemStack item)Drops an item on the ground in front of the player.booleanbooleanDeprecated.intDeprecated.@Nullable CraftItemStackTransactionorg.cloudburstmc.api.item.ItemStack[]getDrops()getDummyBossBar(long bossBarId)Get a DummyBossBar objectGet all DummyBossBar objectsorg.cloudburstmc.api.entity.InteractablegetEntityPlayerLookingAt(int maxDistance)Returns the Entity the player is looking at currentlyintintcom.nukkitx.math.vector.Vector3forg.cloudburstmc.api.player.GameModeintorg.cloudburstmc.api.entity.Entityintintintorg.cloudburstmc.api.util.LoginChainDatagetName()com.nukkitx.math.vector.Vector3fcom.nukkitx.math.vector.Vector3flonggetPing()intgetPort()booleancom.nukkitx.protocol.bedrock.data.skin.SerializedSkinintorg.cloudburstmc.api.player.skin.SkingetSkin()org.cloudburstmc.api.level.LocationgetSpawn()intcom.nukkitx.math.vector.Vector3fOptional<org.cloudburstmc.api.inventory.Inventory>org.cloudburstmc.api.blockentity.EnderChestorg.cloudburstmc.api.inventory.InventorygetWindowById(int id)bytegetWindowId(org.cloudburstmc.api.inventory.Inventory inventory)getXuid()voidhandleDataPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)booleanhasAchievement(String achievementId)booleanDeprecated.inthashCode()booleanhasPermission(String name)booleanhasPermission(org.cloudburstmc.api.permission.Permission permission)booleanvoidhidePlayer(CloudPlayer player)protected voidbooleanbooleanisBanned()booleanbooleanisChunkInView(int x, int z)booleanbooleanbooleanbooleanbooleanbooleanbooleanisOnline()booleanisOp()booleanisPermissionSet(String name)booleanisPermissionSet(org.cloudburstmc.api.permission.Permission permission)booleanisPlayer()booleanbooleanbooleanbooleanbooleanReturns whether the player is currently using an item (right-click and hold).booleanbooleankick()booleanbooleanbooleankick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason)booleankick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason, boolean isAdmin)booleanbooleankick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason, String reasonString, boolean isAdmin)voidkill()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidvoidonChunkChanged(org.cloudburstmc.api.level.chunk.Chunk chunk)voidonChunkLoaded(org.cloudburstmc.api.level.chunk.Chunk chunk)voidonChunkUnloaded(org.cloudburstmc.api.level.chunk.Chunk chunk)voidbooleanonUpdate(int currentTick)voidopenInventory(CloudPlayer who)booleanpickupEntity(org.cloudburstmc.api.entity.Entity entity, boolean near)voidprotected voidprocessMovement(int tickDiff)voidvoidremoveAchievement(String achievementId)voidvoidremoveAllWindows(boolean permanent)voidremoveAttachment(org.cloudburstmc.api.permission.PermissionAttachment attachment)voidremoveBossBar(long bossBarId)Removes a BossBarForm<?>removeFormWindow(int id)voidremoveWindow(org.cloudburstmc.api.inventory.Inventory inventory)org.cloudburstmc.api.inventory.InventoryremoveWindowById(byte id)voidvoidvoidResets both title animation times and subtitle for the next shown titlevoidsave()voidsave(boolean async)voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsendActionBar(String title)voidsendActionBar(String title, int fadein, int duration, int fadeout)voidvoidvoidvoidvoidvoidvoidsendExperience(int exp)voidvoidsendExperienceLevel(int level)voidsendMessage(String message)voidsendMessage(org.cloudburstmc.api.locale.TextContainer message)booleansendPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)0 is true -1 is false other is identiferbooleansendPacketImmediately(com.nukkitx.protocol.bedrock.BedrockPacket packet)0 is true -1 is false other is identifervoidsendPacketInternal(com.nukkitx.protocol.bedrock.BedrockPacket packet)protected voidsendPlayStatus(com.nukkitx.protocol.bedrock.packet.PlayStatusPacket.Status status)protected voidsendPlayStatus(com.nukkitx.protocol.bedrock.packet.PlayStatusPacket.Status status, boolean immediate)voidvoidvoidsendPosition(com.nukkitx.math.vector.Vector3f pos)voidsendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw)voidsendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch)voidsendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch, com.nukkitx.protocol.bedrock.packet.MovePlayerPacket.Mode mode)voidsendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch, com.nukkitx.protocol.bedrock.packet.MovePlayerPacket.Mode mode, Set<CloudPlayer> targets)voidDeprecated.voidsendSignChange(com.nukkitx.math.vector.Vector3i position, String[] lines)Sends a sign change.voidvoidvoidvoidvoidsendTranslation(String message, Object... parameters)voidsetAdventureSettings(CloudAdventureSettings adventureSettings)voidsetAllowFlight(boolean value)Deprecated.voidsetAllowInteract(boolean value)voidsetAllowInteract(boolean value, boolean containers)voidsetAllowModifyWorld(boolean value)voidsetAttribute(org.cloudburstmc.api.entity.Attribute attr)voidsetAutoJump(boolean value)Deprecated.voidsetBanned(boolean value)voidsetButtonText(String text)voidsetChunkRadius(int chunkRadius)voidsetCraftingTransaction(@Nullable CraftItemStackTransaction craftingTransaction)voidsetDisplayName(String displayName)voidsetEnableClientCommand(boolean enable)voidsetExperience(int exp)voidsetExperience(int exp, int level)voidsetFoodEnabled(boolean foodEnabled)voidsetForceMovement(com.nukkitx.math.vector.Vector3f forceMovement)booleansetGamemode(org.cloudburstmc.api.player.GameMode gamemode)booleansetGamemode(org.cloudburstmc.api.player.GameMode gamemode, boolean clientSide)voidsetHealth(float health)voidsetInitialized(boolean initialized)voidvoidsetLoginChainData(org.cloudburstmc.api.util.LoginChainData loginChainData)voidsetMaxHealth(int maxHealth)booleansetMotion(com.nukkitx.math.vector.Vector3f motion)voidsetMovementSpeed(float speed)voidsetMovementSpeed(float speed, boolean send)voidsetNewPosition(com.nukkitx.math.vector.Vector3f newPosition)voidsetOp(boolean value)voidvoidsetRemoveFormat(boolean remove)intsetServerSettings(CustomForm window)Shows a new setting page in game settings You can find out settings result by listening to PlayerFormRespondedEventvoidsetSkin(com.nukkitx.protocol.bedrock.data.skin.SerializedSkin skin)voidsetSkin(org.cloudburstmc.api.player.skin.Skin skin)voidsetSpawn(org.cloudburstmc.api.level.Location location)voidsetSprinting(boolean value)voidsetSubtitle(String subtitle)voidsetTeleportPosition(com.nukkitx.math.vector.Vector3f teleportPosition)voidsetTitleAnimationTimes(int fadein, int duration, int fadeout)voidsetUsingItem(boolean value)voidsetViewingEnderChest(org.cloudburstmc.api.blockentity.EnderChest chest)voidsetWhitelisted(boolean value)intshowFormWindow(Form<?> window)Shows a new FormWindow to the player You can find out FormWindow result by listening to PlayerFormRespondedEventintshowFormWindow(Form<?> window, int id)Shows a new FormWindow to the player You can find out FormWindow result by listening to PlayerFormRespondedEventvoidshowPlayer(CloudPlayer player)voidshowXboxProfile(String xuid)Show a window of a XBOX account's profilebooleansleepOn(com.nukkitx.math.vector.Vector3i pos)voidspawnTo(CloudPlayer player)voidvoidstartFishing(org.cloudburstmc.api.item.ItemStack fishingRod)voidvoidstopFishing(boolean click)voidbooleanswitchLevel(CloudLevel level)booleanteleport(org.cloudburstmc.api.level.Location location, org.cloudburstmc.api.event.player.PlayerTeleportEvent.TeleportCause cause)voidteleportImmediate(org.cloudburstmc.api.level.Location location)voidteleportImmediate(org.cloudburstmc.api.level.Location location, org.cloudburstmc.api.event.player.PlayerTeleportEvent.TeleportCause cause)toString()voidtransfer(InetSocketAddress address)voidupdateBossBar(String text, int length, long bossBarId)Deprecated.Methods inherited from class org.cloudburstmc.server.entity.EntityHuman
calculateEnchantmentProtectionFactor, despawnFrom, getBaseOffset, getEyeHeight, getHeight, getLength, getWidth, isGliding, isSneaking, isSprinting, isSwimming, setGliding, setGliding, setOnFire, setServerId, setSneaking, setSneaking, setSprinting, setSwimming, setSwimmingMethods inherited from class org.cloudburstmc.server.entity.EntityLiving
collidingWith, entityBaseTick, entityBaseTick, getAirTicks, getDrag, getGravity, getLineOfSight, getLineOfSight, getLineOfSight, getMovementSpeed, getTargetBlock, getTargetBlock, hasLineOfSight, knockBack, setAirTicksMethods inherited from class org.cloudburstmc.server.entity.BaseEntity
addEffect, addMotion, attack, broadcastLinkPacket, canBeMovedByCurrents, canClimb, canClimbWalls, canCollide, canPassThrough, canTriggerPressurePlate, canTriggerWalking, checkObstruction, checkObstruction, despawnFrom, despawnFromAll, dismount, extinguish, fall, fastMove, getAbsorption, getAir, getBlocksAround, getBoundingBox, getCardinalDirection, getChunk, getCollisionBlocks, getData, getDirection, getDirectionPlane, getDirectionVector, getEffect, getEffect, getEffects, getFireTicks, getHealth, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLevel, getLocation, getMaxHealth, getMotion, getMountedOffset, getNameTag, getNoDamageTicks, getOwner, getPassenger, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getScoreTag, getSeatPosition, getStepHeight, getTag, getType, getUniqueId, getVehicle, getViewers, getX, getY, getYaw, getZ, handleLavaMovement, hasControllingPassenger, hasEffect, hasEffect, hasNameTag, heal, heal, init, isAlive, isClosed, isControlling, isImmobile, isInsideOfFire, isInsideOfSolid, isInsideOfWater, isInvulnerable, isNameTagAlwaysVisible, isNameTagVisible, isOnGround, isPassenger, mount, move, move, onCollideWithPlayer, onDismount, onEntityCollision, onInteract, onInteract, onMount, onStruckByLightning, recalculateBoundingBox, recalculateEffectColor, removeAllEffects, removeEffect, removeEffect, respawnToAll, scheduleUpdate, sendData, sendData, sendFlags, sendPotionEffects, setAbsorption, setAir, setCanClimb, setCanClimb, setCanClimbWalls, setCanClimbWalls, setFallDistance, setHighestPosition, setImmobile, setImmobile, setInvulnerable, setLastDamageCause, setNameTag, setNameTagAlwaysVisible, setNameTagAlwaysVisible, setNameTagVisible, setNameTagVisible, setNoDamageTicks, setOnGround, setOwner, setPosition, setPositionAndRotation, setRotation, setScale, setScoreTag, setSeatPosition, spawnTo, spawnToAll, teleport, teleport, teleport, updateFallState, updateMovement, updatePassengerPosition, updatePassengersMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.level.ChunkLoader
getLevel, getPosition, getX, getZMethods inherited from interface org.cloudburstmc.api.entity.Entity
addEffect, attack, canBeMovedByCurrents, canCollide, canPassThrough, canTriggerPressurePlate, despawnFrom, despawnFromAll, dismount, extinguish, fall, getAbsorption, getBoundingBox, getChunk, getDirection, getDirectionPlane, getDirectionVector, getDrag, getEffect, getEffect, getEffects, getEyeHeight, getFireTicks, getGravity, getHealth, getHeight, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLength, getLocation, getMaxHealth, getMotion, getNameTag, getNoDamageTicks, getOwner, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getSeatPosition, getType, getUniqueId, getVehicle, getViewers, getWidth, getX, getY, getYaw, getZ, hasControllingPassenger, hasEffect, hasEffect, hasNameTag, heal, heal, isAlive, isClosed, isControlling, isNameTagVisible, isOnFire, isPassenger, isUndead, mount, mount, onDismount, onEntityCollision, onInteract, onMount, onStruckByLightning, removeAllEffects, removeEffect, removeEffect, setAbsorption, setHighestPosition, setNameTag, setNameTagVisible, setNoDamageTicks, setOnFire, setOnGround, setOwner, setPosition, setPositionAndRotation, setRotation, setScale, setSeatPosition, spawnTo, spawnToAll, teleport, teleport, teleportMethods inherited from interface org.cloudburstmc.api.player.Player
addWindow, addWindow, getCardinalDirection, getLevel, getMovementSpeed, isInsideOfWater, isOnGround, isSneaking
-
Field Details
-
DEFAULT_SPEED
public static final float DEFAULT_SPEED- See Also:
- Constant Field Values
-
MAXIMUM_SPEED
public static final float MAXIMUM_SPEED- See Also:
- Constant Field Values
-
session
protected final com.nukkitx.protocol.bedrock.BedrockServerSession session -
spawned
public boolean spawned -
loggedIn
public boolean loggedIn -
lastBreak
public long lastBreak -
speed
public com.nukkitx.math.vector.Vector3f speed -
windows
protected final com.google.common.collect.BiMap<org.cloudburstmc.api.inventory.Inventory,Byte> windows -
windowIndex
protected final com.google.common.collect.BiMap<Byte,org.cloudburstmc.api.inventory.Inventory> windowIndex -
permanentWindows
protected final it.unimi.dsi.fastutil.bytes.ByteSet permanentWindows -
windowCnt
protected byte windowCnt -
playerData
-
messageCounter
protected int messageCounter -
forceMovement
protected com.nukkitx.math.vector.Vector3f forceMovement -
creationTime
public long creationTime -
randomClientId
protected long randomClientId -
teleportPosition
protected com.nukkitx.math.vector.Vector3f teleportPosition -
foodData
-
connected
protected boolean connected -
removeFormat
protected boolean removeFormat -
username
-
iusername
-
displayName
-
startAction
protected int startAction -
newPosition
protected com.nukkitx.math.vector.Vector3f newPosition -
stepHeight
protected float stepHeight -
viewDistance
protected int viewDistance -
chunksPerTick
protected final int chunksPerTick -
spawnThreshold
protected final int spawnThreshold -
inAirTicks
protected int inAirTicks -
startAirTicks
protected int startAirTicks -
adventureSettings
-
sleeping
protected com.nukkitx.math.vector.Vector3i sleeping -
spawnLocation
protected org.cloudburstmc.api.level.Location spawnLocation -
enableClientCommand
protected boolean enableClientCommand -
lastEnderPearl
protected int lastEnderPearl -
lastChorusFruitTeleport
protected int lastChorusFruitTeleport -
breakingBlock
public org.cloudburstmc.api.block.Block breakingBlock -
pickedXPOrb
public int pickedXPOrb -
formWindowCount
-
formWindows
-
serverSettings
-
serverSettingsId
protected int serverSettingsId -
dummyBossBars
-
fishing
public org.cloudburstmc.api.entity.projectile.FishingHook fishing -
packetsRecieved
public int packetsRecieved -
lastSkinChange
public long lastSkinChange
-
-
Constructor Details
-
CloudPlayer
public CloudPlayer(com.nukkitx.protocol.bedrock.BedrockServerSession session, ClientChainData chainData)
-
-
Method Details
-
getStartActionTick
public int getStartActionTick() -
startAction
public void startAction() -
stopAction
public void stopAction() -
getLastEnderPearlThrowingTick
public int getLastEnderPearlThrowingTick() -
onThrowEnderPearl
public void onThrowEnderPearl() -
getLastChorusFruitTeleport
public int getLastChorusFruitTeleport() -
onChorusFruitTeleport
public void onChorusFruitTeleport() -
getViewingEnderChest
public org.cloudburstmc.api.blockentity.EnderChest getViewingEnderChest()- Specified by:
getViewingEnderChestin interfaceorg.cloudburstmc.api.player.Player
-
setViewingEnderChest
public void setViewingEnderChest(org.cloudburstmc.api.blockentity.EnderChest chest)- Specified by:
setViewingEnderChestin interfaceorg.cloudburstmc.api.player.Player
-
getCraftingInventory
- Specified by:
getCraftingInventoryin interfaceorg.cloudburstmc.api.player.Player
-
getLeaveMessage
-
getClientSecret
-
getClientId
Deprecated.This might disappear in the future. Please use getUniqueId() instead (IP + clientId + name combo, in the future it'll change to real UUID for online auth)- Returns:
- random client id
-
isBanned
public boolean isBanned()- Specified by:
isBannedin interfaceorg.cloudburstmc.api.player.Player
-
setBanned
public void setBanned(boolean value)- Specified by:
setBannedin interfaceorg.cloudburstmc.api.player.Player
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelistedin interfaceorg.cloudburstmc.api.player.Player
-
setWhitelisted
public void setWhitelisted(boolean value)- Specified by:
setWhitelistedin interfaceorg.cloudburstmc.api.player.Player
-
isInitialized
public boolean isInitialized() -
setInitialized
public void setInitialized(boolean initialized) -
getFirstPlayed
- Specified by:
getFirstPlayedin interfaceorg.cloudburstmc.api.player.Player
-
getAdventureSettings
-
setAdventureSettings
-
resetInAirTicks
public void resetInAirTicks()- Specified by:
resetInAirTicksin interfaceorg.cloudburstmc.api.player.Player
-
setAllowFlight
Deprecated. -
getAllowFlight
Deprecated. -
setAllowModifyWorld
public void setAllowModifyWorld(boolean value) -
setAllowInteract
public void setAllowInteract(boolean value) -
setAllowInteract
public void setAllowInteract(boolean value, boolean containers) -
setAutoJump
Deprecated. -
hasAutoJump
Deprecated. -
getLastPlayed
- Specified by:
getLastPlayedin interfaceorg.cloudburstmc.api.player.Player
-
getServer
- Specified by:
getServerin interfaceorg.cloudburstmc.api.command.CommandSender- Specified by:
getServerin interfaceorg.cloudburstmc.api.entity.Entity- Specified by:
getServerin interfaceorg.cloudburstmc.api.player.Player- Overrides:
getServerin classBaseEntity
-
getRemoveFormat
public boolean getRemoveFormat() -
setRemoveFormat
public void setRemoveFormat() -
setRemoveFormat
public void setRemoveFormat(boolean remove) -
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBeforein interfaceorg.cloudburstmc.api.player.Player
-
canSee
-
hidePlayer
-
canCollideWith
public boolean canCollideWith(org.cloudburstmc.api.entity.Entity entity)- Specified by:
canCollideWithin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
canCollideWithin classBaseEntity
-
spawnTo
- Overrides:
spawnToin classEntityHuman
-
createAddEntityPacket
protected com.nukkitx.protocol.bedrock.BedrockPacket createAddEntityPacket()- Overrides:
createAddEntityPacketin classEntityHuman
-
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceorg.cloudburstmc.api.player.Player
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.cloudburstmc.api.player.Player- Specified by:
isOpin interfaceorg.cloudburstmc.api.permission.ServerOperator
-
setOp
public void setOp(boolean value)- Specified by:
setOpin interfaceorg.cloudburstmc.api.player.Player- Specified by:
setOpin interfaceorg.cloudburstmc.api.permission.ServerOperator
-
isSpawned
public boolean isSpawned()- Specified by:
isSpawnedin interfaceorg.cloudburstmc.api.player.Player
-
isPermissionSet
- Specified by:
isPermissionSetin interfaceorg.cloudburstmc.api.permission.Permissible
-
isPermissionSet
public boolean isPermissionSet(org.cloudburstmc.api.permission.Permission permission)- Specified by:
isPermissionSetin interfaceorg.cloudburstmc.api.permission.Permissible
-
hasPermission
- Specified by:
hasPermissionin interfaceorg.cloudburstmc.api.permission.Permissible
-
hasPermission
public boolean hasPermission(org.cloudburstmc.api.permission.Permission permission)- Specified by:
hasPermissionin interfaceorg.cloudburstmc.api.permission.Permissible
-
addAttachment
public org.cloudburstmc.api.permission.PermissionAttachment addAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin)- Specified by:
addAttachmentin interfaceorg.cloudburstmc.api.permission.Permissible
-
addAttachment
public org.cloudburstmc.api.permission.PermissionAttachment addAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin, String name)- Specified by:
addAttachmentin interfaceorg.cloudburstmc.api.permission.Permissible
-
addAttachment
public org.cloudburstmc.api.permission.PermissionAttachment addAttachment(org.cloudburstmc.api.plugin.PluginContainer plugin, String name, Boolean value)- Specified by:
addAttachmentin interfaceorg.cloudburstmc.api.permission.Permissible
-
removeAttachment
public void removeAttachment(org.cloudburstmc.api.permission.PermissionAttachment attachment)- Specified by:
removeAttachmentin interfaceorg.cloudburstmc.api.permission.Permissible
-
recalculatePermissions
public void recalculatePermissions()- Specified by:
recalculatePermissionsin interfaceorg.cloudburstmc.api.permission.Permissible
-
isEnableClientCommand
public boolean isEnableClientCommand() -
resetFallDistance
public void resetFallDistance()- Specified by:
resetFallDistancein interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
resetFallDistancein classBaseEntity
-
setEnableClientCommand
public void setEnableClientCommand(boolean enable) -
getEffectivePermissions
public Map<String,org.cloudburstmc.api.permission.PermissionAttachmentInfo> getEffectivePermissions()- Specified by:
getEffectivePermissionsin interfaceorg.cloudburstmc.api.permission.Permissible
-
showPlayer
-
initEntity
protected void initEntity()- Overrides:
initEntityin classEntityHuman
-
isPlayer
public boolean isPlayer()- Specified by:
isPlayerin interfaceorg.cloudburstmc.api.command.CommandSender
-
sendCommandData
public void sendCommandData() -
removeAchievement
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceorg.cloudburstmc.api.player.Player
-
getDisplayName
- Specified by:
getDisplayNamein interfaceorg.cloudburstmc.api.player.Player
-
setDisplayName
-
hasAchievement
-
getSkin
public org.cloudburstmc.api.player.skin.Skin getSkin()- Specified by:
getSkinin interfaceorg.cloudburstmc.api.player.Player- Overrides:
getSkinin classEntityHuman
-
setSkin
public void setSkin(org.cloudburstmc.api.player.skin.Skin skin)- Specified by:
setSkinin interfaceorg.cloudburstmc.api.player.Player- Overrides:
setSkinin classEntityHuman
-
getSerializedSkin
public com.nukkitx.protocol.bedrock.data.skin.SerializedSkin getSerializedSkin() -
setSkin
public void setSkin(com.nukkitx.protocol.bedrock.data.skin.SerializedSkin skin) -
getServerId
- Specified by:
getServerIdin interfaceorg.cloudburstmc.api.player.Player- Overrides:
getServerIdin classEntityHuman
-
getAddress
-
getSocketAddress
-
getPort
public int getPort() -
isSleeping
public boolean isSleeping()- Specified by:
isSleepingin interfaceorg.cloudburstmc.api.player.Player
-
getInAirTicks
public int getInAirTicks() -
getNextPosition
public com.nukkitx.math.vector.Vector3f getNextPosition() -
isUsingItem
public boolean isUsingItem()Returns whether the player is currently using an item (right-click and hold).- Returns:
- bool
-
getButtonText
-
setUsingItem
public void setUsingItem(boolean value) -
setButtonText
-
getSpawn
public org.cloudburstmc.api.level.Location getSpawn()- Specified by:
getSpawnin interfaceorg.cloudburstmc.api.player.Player
-
setSpawn
public void setSpawn(org.cloudburstmc.api.level.Location location)- Specified by:
setSpawnin interfaceorg.cloudburstmc.api.player.Player
-
doFirstSpawn
protected void doFirstSpawn() -
getPing
public long getPing() -
sleepOn
public boolean sleepOn(com.nukkitx.math.vector.Vector3i pos)- Specified by:
sleepOnin interfaceorg.cloudburstmc.api.player.Player
-
stopSleep
public void stopSleep()- Specified by:
stopSleepin interfaceorg.cloudburstmc.api.player.Player
-
awardAchievement
-
getGamemode
public org.cloudburstmc.api.player.GameMode getGamemode()- Specified by:
getGamemodein interfaceorg.cloudburstmc.api.player.Player
-
setGamemode
public boolean setGamemode(org.cloudburstmc.api.player.GameMode gamemode) -
sendPacket
public boolean sendPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)0 is true -1 is false other is identifer- Parameters:
packet- packet to send- Returns:
- packet successfully sent
-
sendPacketInternal
public void sendPacketInternal(com.nukkitx.protocol.bedrock.BedrockPacket packet) -
sendSettings
Deprecated. -
isSurvival
public boolean isSurvival()- Specified by:
isSurvivalin interfaceorg.cloudburstmc.api.player.Player
-
isCreative
public boolean isCreative()- Specified by:
isCreativein interfaceorg.cloudburstmc.api.player.Player
-
isSpectator
public boolean isSpectator()- Specified by:
isSpectatorin interfaceorg.cloudburstmc.api.player.Player
-
isAdventure
public boolean isAdventure()- Specified by:
isAdventurein interfaceorg.cloudburstmc.api.player.Player
-
getDrops
public org.cloudburstmc.api.item.ItemStack[] getDrops()- Overrides:
getDropsin classEntityHuman
-
sendPacketImmediately
public boolean sendPacketImmediately(com.nukkitx.protocol.bedrock.BedrockPacket packet)0 is true -1 is false other is identifer- Parameters:
packet- packet to send- Returns:
- packet successfully sent
-
checkBlockCollision
protected void checkBlockCollision()- Overrides:
checkBlockCollisionin classBaseEntity
-
checkNearEntities
protected void checkNearEntities() -
setGamemode
public boolean setGamemode(org.cloudburstmc.api.player.GameMode gamemode, boolean clientSide) -
canOpenInventory
public boolean canOpenInventory() -
openInventory
-
closeInventory
-
setMotion
public boolean setMotion(com.nukkitx.math.vector.Vector3f motion)- Specified by:
setMotionin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
setMotionin classBaseEntity
-
sendAttributes
public void sendAttributes() -
checkGroundState
protected void checkGroundState(double movX, double movY, double movZ, double dx, double dy, double dz)- Overrides:
checkGroundStatein classBaseEntity
-
checkInteractNearby
public void checkInteractNearby() -
processMovement
protected void processMovement(int tickDiff) -
addMovement
public void addMovement(double x, double y, double z, double yaw, double pitch, double headYaw)- Overrides:
addMovementin classBaseEntity
-
onUpdate
public boolean onUpdate(int currentTick)- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
onUpdatein classBaseEntity
-
getEntityPlayerLookingAt
public org.cloudburstmc.api.entity.Interactable getEntityPlayerLookingAt(int maxDistance)Returns the Entity the player is looking at currently- Parameters:
maxDistance- the maximum distance to check for entities- Returns:
- Entity|null either NULL if no entity is found or an instance of the entity
-
canInteract
public boolean canInteract(com.nukkitx.math.vector.Vector3f pos, double maxDistance) -
canInteract
public boolean canInteract(com.nukkitx.math.vector.Vector3f pos, double maxDistance, double maxDiff) -
completeLoginSequence
public void completeLoginSequence() -
checkNetwork
public void checkNetwork() -
processLogin
public void processLogin() -
chat
Sends a chat message as this player. If the message begins with a / (forward-slash) it will be treated as a command.- Parameters:
message- message to send- Returns:
- successful
-
kick
public boolean kick() -
kick
-
kick
-
kick
public boolean kick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason) -
kick
public boolean kick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason, String reasonString) -
kick
public boolean kick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason, boolean isAdmin) -
kick
public boolean kick(org.cloudburstmc.api.event.player.PlayerKickEvent.Reason reason, String reasonString, boolean isAdmin) -
handleDataPacket
public void handleDataPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet) -
getChunkRadius
public int getChunkRadius() -
getXuid
- Specified by:
getXuidin interfaceorg.cloudburstmc.api.player.Player
-
sendMessage
- Specified by:
sendMessagein interfaceorg.cloudburstmc.api.command.CommandSender
-
sendMessage
public void sendMessage(org.cloudburstmc.api.locale.TextContainer message)- Specified by:
sendMessagein interfaceorg.cloudburstmc.api.command.CommandSender
-
sendTranslation
-
sendChat
-
sendChat
-
sendPopup
-
sendPopup
-
sendTip
-
clearTitle
public void clearTitle() -
resetTitleSettings
public void resetTitleSettings()Resets both title animation times and subtitle for the next shown title -
setSubtitle
-
setTitleAnimationTimes
public void setTitleAnimationTimes(int fadein, int duration, int fadeout) -
sendTitle
-
sendTitle
-
sendTitle
-
sendActionBar
-
sendActionBar
-
close
public void close()- Specified by:
closein interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
closein classEntityHuman
-
close
-
close
-
close
-
close
public void close(org.cloudburstmc.api.locale.TextContainer message) -
close
-
setChunkRadius
public void setChunkRadius(int chunkRadius) -
save
public void save()- Specified by:
savein interfaceorg.cloudburstmc.api.player.Player
-
getChunkManager
-
getName
- Specified by:
getNamein interfaceorg.cloudburstmc.api.command.CommandSender- Specified by:
getNamein interfaceorg.cloudburstmc.api.entity.Entity- Specified by:
getNamein interfaceorg.cloudburstmc.api.player.Player- Overrides:
getNamein classEntityHuman
-
getTeleportPosition
public com.nukkitx.math.vector.Vector3f getTeleportPosition() -
setTeleportPosition
public void setTeleportPosition(com.nukkitx.math.vector.Vector3f teleportPosition) -
getForceMovement
public com.nukkitx.math.vector.Vector3f getForceMovement() -
setForceMovement
public void setForceMovement(com.nukkitx.math.vector.Vector3f forceMovement) -
getNewPosition
public com.nukkitx.math.vector.Vector3f getNewPosition() -
setNewPosition
public void setNewPosition(com.nukkitx.math.vector.Vector3f newPosition) -
close
public void close(org.cloudburstmc.api.locale.TextContainer message, String reason, boolean notify) -
setHealth
public void setHealth(float health)- Specified by:
setHealthin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
setHealthin classEntityLiving
-
setMaxHealth
public void setMaxHealth(int maxHealth)- Specified by:
setMaxHealthin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
setMaxHealthin classBaseEntity
-
getExperience
public int getExperience() -
getExperienceLevel
public int getExperienceLevel() -
addExperience
public void addExperience(int add) -
calculateRequireExperience
public static int calculateRequireExperience(int level) -
setExperience
public void setExperience(int exp) -
setExperience
public void setExperience(int exp, int level) -
sendExperience
public void sendExperience() -
sendExperience
public void sendExperience(int exp) -
sendExperienceLevel
public void sendExperienceLevel() -
sendExperienceLevel
public void sendExperienceLevel(int level) -
setAttribute
public void setAttribute(org.cloudburstmc.api.entity.Attribute attr) -
setMovementSpeed
public void setMovementSpeed(float speed)- Specified by:
setMovementSpeedin interfaceorg.cloudburstmc.api.player.Player- Overrides:
setMovementSpeedin classEntityLiving
-
setMovementSpeed
public void setMovementSpeed(float speed, boolean send) -
getKiller
public org.cloudburstmc.api.entity.Entity getKiller() -
attack
public boolean attack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)- Specified by:
attackin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
attackin classEntityHuman
-
dropItem
public boolean dropItem(org.cloudburstmc.api.item.ItemStack item)Drops an item on the ground in front of the player. Returns if the item drop was successful.- Parameters:
item- to drop- Returns:
- bool if the item was dropped or if the item was null
-
sendPosition
public void sendPosition(com.nukkitx.math.vector.Vector3f pos) -
sendPosition
public void sendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw) -
sendPosition
public void sendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch) -
sendPosition
public void sendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch, com.nukkitx.protocol.bedrock.packet.MovePlayerPacket.Mode mode) -
sendPosition
public void sendPosition(com.nukkitx.math.vector.Vector3f pos, double yaw, double pitch, com.nukkitx.protocol.bedrock.packet.MovePlayerPacket.Mode mode, Set<CloudPlayer> targets) -
loadAdditionalData
public void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)- Overrides:
loadAdditionalDatain classEntityHuman
-
saveAdditionalData
public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveAdditionalDatain classEntityHuman
-
save
public void save(boolean async)- Specified by:
savein interfaceorg.cloudburstmc.api.player.Player
-
kill
public void kill()- Specified by:
killin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
killin classEntityLiving
-
sendPlayStatus
protected void sendPlayStatus(com.nukkitx.protocol.bedrock.packet.PlayStatusPacket.Status status) -
sendPlayStatus
protected void sendPlayStatus(com.nukkitx.protocol.bedrock.packet.PlayStatusPacket.Status status, boolean immediate) -
checkChunks
protected void checkChunks()- Overrides:
checkChunksin classBaseEntity
-
teleportImmediate
public void teleportImmediate(org.cloudburstmc.api.level.Location location) -
teleportImmediate
public void teleportImmediate(org.cloudburstmc.api.level.Location location, org.cloudburstmc.api.event.player.PlayerTeleportEvent.TeleportCause cause) -
showFormWindow
Shows a new FormWindow to the player You can find out FormWindow result by listening to PlayerFormRespondedEvent- Parameters:
window- to show- Returns:
- form id
-
showFormWindow
Shows a new FormWindow to the player You can find out FormWindow result by listening to PlayerFormRespondedEvent- Parameters:
window- to showid- form id- Returns:
- form id
-
removeFormWindow
-
getServerSettings
-
getServerSettingsId
public int getServerSettingsId() -
setServerSettings
Shows a new setting page in game settings You can find out settings result by listening to PlayerFormRespondedEvent- Parameters:
window- to show on settings page- Returns:
- form id
-
createBossBar
Deprecated.Creates and sends a BossBar to the player- Parameters:
text- The BossBar messagelength- The BossBar percentage- Returns:
- bossBarId The BossBar ID, you should store it if you want to remove or update the BossBar later
-
createBossBar
Creates and sends a BossBar to the player- Parameters:
dummyBossBar- DummyBossBar Object (Instantiate it by the Class Builder)- Returns:
- bossBarId The BossBar ID, you should store it if you want to remove or update the BossBar later
- See Also:
DummyBossBar.Builder
-
getDummyBossBar
Get a DummyBossBar object- Parameters:
bossBarId- The BossBar ID- Returns:
- DummyBossBar object
- See Also:
Set BossBar text,Set BossBar length,Set BossBar color
-
getDummyBossBars
Get all DummyBossBar objects- Returns:
- DummyBossBars Map
-
updateBossBar
Deprecated.Updates a BossBar- Parameters:
text- The new BossBar messagelength- The new BossBar lengthbossBarId- The BossBar ID
-
removeBossBar
public void removeBossBar(long bossBarId)Removes a BossBar- Parameters:
bossBarId- The BossBar ID
-
getWindowId
public byte getWindowId(org.cloudburstmc.api.inventory.Inventory inventory)- Specified by:
getWindowIdin interfaceorg.cloudburstmc.api.player.Player
-
getWindowById
public org.cloudburstmc.api.inventory.Inventory getWindowById(int id) -
addWindow
public byte addWindow(org.cloudburstmc.api.inventory.Inventory inventory, Byte forceId, boolean isPermanent)- Specified by:
addWindowin interfaceorg.cloudburstmc.api.player.Player
-
getTopWindow
-
removeWindow
public void removeWindow(org.cloudburstmc.api.inventory.Inventory inventory)- Specified by:
removeWindowin interfaceorg.cloudburstmc.api.player.Player
-
removeWindowById
public org.cloudburstmc.api.inventory.Inventory removeWindowById(byte id) -
sendAllInventories
public void sendAllInventories() -
addDefaultWindows
protected void addDefaultWindows() -
getInventory
- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.inventory.InventoryHolder- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.player.Player- Overrides:
getInventoryin classEntityCreature
-
getEnderChestInventory
- Specified by:
getEnderChestInventoryin interfaceorg.cloudburstmc.api.player.Player
-
getCursorInventory
-
getInventoryManager
-
getCraftingTransaction
-
setCraftingTransaction
-
removeAllWindows
public void removeAllWindows() -
removeAllWindows
public void removeAllWindows(boolean permanent) -
checkTeleportPosition
protected boolean checkTeleportPosition() -
teleport
public boolean teleport(org.cloudburstmc.api.level.Location location, org.cloudburstmc.api.event.player.PlayerTeleportEvent.TeleportCause cause)- Specified by:
teleportin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
teleportin classBaseEntity
-
isChunkInView
public boolean isChunkInView(int x, int z) -
onChunkChanged
public void onChunkChanged(org.cloudburstmc.api.level.chunk.Chunk chunk)- Specified by:
onChunkChangedin interfaceorg.cloudburstmc.api.level.ChunkLoader
-
getLoaderId
public int getLoaderId()- Specified by:
getLoaderIdin interfaceorg.cloudburstmc.api.level.ChunkLoader
-
isLoaderActive
public boolean isLoaderActive()- Specified by:
isLoaderActivein interfaceorg.cloudburstmc.api.level.ChunkLoader
-
isFoodEnabled
public boolean isFoodEnabled() -
setFoodEnabled
public void setFoodEnabled(boolean foodEnabled) -
getFoodData
-
setLocale
-
getLocale
-
setSprinting
public void setSprinting(boolean value)- Overrides:
setSprintingin classEntityHuman
-
transfer
-
getLoginChainData
public org.cloudburstmc.api.util.LoginChainData getLoginChainData() -
setLoginChainData
public void setLoginChainData(org.cloudburstmc.api.util.LoginChainData loginChainData) -
onChunkUnloaded
public void onChunkUnloaded(org.cloudburstmc.api.level.chunk.Chunk chunk)- Specified by:
onChunkUnloadedin interfaceorg.cloudburstmc.api.level.ChunkLoader
-
onChunkLoaded
public void onChunkLoaded(org.cloudburstmc.api.level.chunk.Chunk chunk)- Specified by:
onChunkLoadedin interfaceorg.cloudburstmc.api.level.ChunkLoader
-
hashCode
public int hashCode() -
equals
-
isBreakingBlock
public boolean isBreakingBlock() -
showXboxProfile
Show a window of a XBOX account's profile- Parameters:
xuid- XUID
-
sendSignChange
Sends a sign change. Sends "fake" sign contents by sending a sign change packet. This does not actually modify the sign lines and is only temporary.- Parameters:
position- the position of the signlines- the lines to send
-
startFishing
public void startFishing(org.cloudburstmc.api.item.ItemStack fishingRod) -
stopFishing
public void stopFishing(boolean click) -
switchLevel
- Overrides:
switchLevelin classBaseEntity
-
pickupEntity
public boolean pickupEntity(org.cloudburstmc.api.entity.Entity entity, boolean near) -
toString
- Overrides:
toStringin classBaseEntity
-