public abstract class AbstractPlayer extends Object implements Player
| Modifier and Type | Field and Description |
|---|---|
protected Location |
location |
protected Version |
playerVersion |
protected int |
protocolVersion |
protected Vector |
velocity |
protected CompensatedWorld |
world |
| Constructor and Description |
|---|
AbstractPlayer() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTheoricVelocity() |
boolean |
equals(Object obj) |
Location |
getLocation()
Get the entity location
|
Version |
getPlayerVersion()
Get player version
(Compatible with ViaVersion and ProtocolSupport for multiple client version)
|
int |
getProtocolVersion() |
List<Block> |
getTargetBlock(int maxDistance) |
Vector |
getVelocity()
Get current entity velocity
|
CompensatedWorld |
getWorld()
Get player world
|
protected void |
init() |
void |
setInternalWorld(CompensatedWorld world)
This does NOT change the platform world (aka teleport)
|
void |
setLocation(Location location) |
void |
setPlayerVersion(Version version) |
void |
setProtocolVersion(int protocolVersion) |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPotionEffect, addPotionEffect, closeInventory, damage, getActivePotionEffect, getAddress, getAllowFlight, getFallDistance, getFlySpeed, getFoodLevel, getGameMode, getHealth, getInventory, getIP, getItemInHand, getItemInOffHand, getLevel, getMaxHealth, getNearbyEntities, getOpenInventory, getPing, getPotionEffect, getServerName, getTheoricVelocity, getVehicle, getWalkSpeed, hasElytra, hasLineOfSight, hasOpenInventory, hasPermission, hasPlayedBefore, hasPotionEffect, hasThorns, isDead, isFlying, isInBoat, isInsideVehicle, isSamePlayer, isSleeping, isSneaking, isSprinting, isSwimming, isUsingRiptide, kick, openInventory, queuePacket, removePotionEffect, sendPacket, sendPluginMessage, sendPluginMessage, sendToServer, setAllowFlight, setFlying, setFoodLevel, setGameMode, setHealth, setSleeping, setSneaking, setSprinting, setVanished, setVelocity, teleport, teleport, updateInventorygetBoundingBox, getEntityId, getEyeHeight, getType, getUniqueId, isOnGround, isOnline, sendMessagegetEyeLocation, getRotation, isOp, isSameId, isSameId, isSameIdgetNamegetDefaultprotected int protocolVersion
protected Version playerVersion
protected Location location
protected Vector velocity
protected CompensatedWorld world
protected void init()
public Version getPlayerVersion()
PlayergetPlayerVersion in interface Playerpublic void setPlayerVersion(Version version)
setPlayerVersion in interface Playerpublic int getProtocolVersion()
getProtocolVersion in interface Playerpublic void setProtocolVersion(int protocolVersion)
setProtocolVersion in interface Playerpublic Location getLocation()
EntitygetLocation in interface EntitygetLocation in interface OfflinePlayerpublic void setLocation(Location location)
setLocation in interface Playerpublic List<Block> getTargetBlock(int maxDistance)
getTargetBlock in interface Playerpublic void applyTheoricVelocity()
applyTheoricVelocity in interface Playerpublic Vector getVelocity()
PlayergetVelocity in interface Playerpublic CompensatedWorld getWorld()
Playerpublic void setInternalWorld(CompensatedWorld world)
PlayersetInternalWorld in interface Playerworld - the new world