Package com.loohp.limbo.player
Class Player
java.lang.Object
com.loohp.limbo.entity.Entity
com.loohp.limbo.entity.LivingEntity
com.loohp.limbo.player.Player
- All Implemented Interfaces:
CommandSender
,InventoryHolder
,net.kyori.adventure.audience.Audience
,net.kyori.adventure.pointer.Pointered
,net.kyori.adventure.sound.Sound.Emitter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
static final String
final ClientConnection
protected org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode
protected final InventoryView
protected byte
final PlayerInteractManager
protected final PlayerInventory
protected int
protected byte
protected byte
protected final String
protected DataWatcher
Fields inherited from class com.loohp.limbo.entity.LivingEntity
absorption, activeHand, arrowsInEntity, handActive, health, inRiptideSpinAttack, potionEffectAmbient, potionEffectColor, sleepingLocation
-
Constructor Summary
ConstructorsConstructorDescriptionPlayer
(ClientConnection clientConnection, String username, UUID uuid, int entityId, Location location, PlayerInteractManager playerInteractManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
disconnect
(String reason) void
disconnect
(net.kyori.adventure.text.Component reason) float
org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode
byte
getName()
int
getScore()
byte
byte
boolean
hasPermission
(String permission) void
hideBossBar
(@NotNull net.kyori.adventure.bossbar.BossBar bar) Deprecated.boolean
isValid()
protected int
void
openBook
(net.kyori.adventure.inventory.Book book) void
openInventory
(Inventory inventory) void
playSound
(@NotNull net.kyori.adventure.sound.Sound sound) void
playSound
(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) void
playSound
(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) void
remove()
void
void
sendActionBar
(@NotNull net.kyori.adventure.text.Component message) void
sendMessage
(String message) void
sendMessage
(String message, UUID uuid) void
sendPlayerListHeaderAndFooter
(@NotNull net.kyori.adventure.text.Component header, @NotNull net.kyori.adventure.text.Component footer) void
sendPluginMessage
(String channel, byte[] data) Deprecated.void
sendPluginMessage
(net.kyori.adventure.key.Key channel, byte[] data) <T> void
sendTitlePart
(net.kyori.adventure.title.TitlePart<T> part, T value) void
setAdditionalHearts
(float additionalHearts) protected void
setEntityId
(int entityId) Deprecated.void
setGamemode
(org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode gamemode) protected void
setLocation
(Location location) void
setMainHand
(byte mainHand) void
setPlayerListHeaderFooter
(String header, String footer) void
setResourcePack
(String url, String hash, boolean forced, net.kyori.adventure.text.Component prompt) void
setScore
(int score) void
setSelectedSlot
(byte slot) void
setSkinLayers
(byte skinLayers) void
setSubTitle
(String subTitle) void
void
setTitleSubTitle
(String title, String subTitle, int fadeIn, int stay, int fadeOut) void
setTitleTimer
(int fadeIn, int stay, int fadeOut) void
showBossBar
(@NotNull net.kyori.adventure.bossbar.BossBar bar) Deprecated.void
stopSound
(net.kyori.adventure.sound.SoundStop stop) void
void
Methods inherited from class com.loohp.limbo.entity.LivingEntity
getAbsorption, getActiveHand, getArrowsInEntity, getHealth, getPotionEffectColor, getSleepingLocation, isHandActive, isInRiptideSpinAttack, isPotionEffectAmbient, setAbsorption, setActiveHand, setArrowsInEntity, setHandActive, setHealth, setInRiptideSpinAttack, setPotionEffectAmbient, setPotionEffectColor, setSleepingLocation
Methods inherited from class com.loohp.limbo.entity.Entity
getAir, getCustomName, getEntityId, getLocation, getPitch, getPose, getType, getUniqueId, getWorld, getX, getY, getYaw, getZ, hasGravity, isCrouching, isCustomNameVisible, isElytraFlying, isGlowing, isInvisible, isOnFire, isSilent, isSprinting, isSwimming, setAir, setCrouching, setCustomName, setCustomName, setCustomNameVisible, setElytraFlying, setGlowing, setGravity, setInvisible, setOnFire, setPitch, setPose, setSilent, setSprinting, setSwimming, setWorld, setX, setY, setYaw, setZ
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, deleteMessage, deleteMessage, filterAudience, forEachAudience, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, showTitle, stopSound
Methods inherited from interface com.loohp.limbo.inventory.InventoryHolder
getLocation
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Field Details
-
CHAT_DEFAULT_FORMAT
- See Also:
-
clientConnection
-
playerInteractManager
-
username
-
gamemode
protected org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode gamemode -
watcher
-
selectedSlot
protected byte selectedSlot -
playerInventory
-
inventoryView
-
additionalHearts
protected float additionalHearts -
score
protected int score -
skinLayers
protected byte skinLayers -
mainHand
protected byte mainHand
-
-
Constructor Details
-
Player
public Player(ClientConnection clientConnection, String username, UUID uuid, int entityId, Location location, PlayerInteractManager playerInteractManager)
-
-
Method Details
-
nextContainerId
protected int nextContainerId() -
getSelectedSlot
public byte getSelectedSlot() -
setSelectedSlot
public void setSelectedSlot(byte slot) -
getGamemode
public org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode getGamemode() -
setGamemode
public void setGamemode(org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode gamemode) -
setEntityId
Deprecated. -
getAdditionalHearts
public float getAdditionalHearts() -
setAdditionalHearts
public void setAdditionalHearts(float additionalHearts) -
getScore
public int getScore() -
setScore
public void setScore(int score) -
getSkinLayers
public byte getSkinLayers() -
setSkinLayers
public void setSkinLayers(byte skinLayers) -
getMainHand
public byte getMainHand() -
setMainHand
public void setMainHand(byte mainHand) -
getDataWatcher
- Overrides:
getDataWatcher
in classEntity
-
isValid
public boolean isValid() -
remove
public void remove() -
getName
- Specified by:
getName
in interfaceCommandSender
-
hasPermission
- Specified by:
hasPermission
in interfaceCommandSender
-
teleport
-
setLocation
-
sendPluginMessage
- Throws:
IOException
-
sendPluginMessage
Deprecated.- Throws:
IOException
-
sendMessage
- Specified by:
sendMessage
in interfaceCommandSender
-
sendMessage
- Specified by:
sendMessage
in interfaceCommandSender
-
disconnect
public void disconnect() -
disconnect
-
disconnect
public void disconnect(net.kyori.adventure.text.Component reason) -
chat
-
chat
-
chat
-
setResourcePack
-
setTitle
-
setSubTitle
-
setTitleTimer
public void setTitleTimer(int fadeIn, int stay, int fadeOut) -
setTitleSubTitle
-
openBook
public void openBook(net.kyori.adventure.inventory.Book book) - Specified by:
openBook
in interfacenet.kyori.adventure.audience.Audience
-
stopSound
public void stopSound(net.kyori.adventure.sound.SoundStop stop) - Specified by:
stopSound
in interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound, @NotNull @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) - Specified by:
playSound
in interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) - Specified by:
playSound
in interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound) - Specified by:
playSound
in interfacenet.kyori.adventure.audience.Audience
-
sendActionBar
public void sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendActionBar
in interfacenet.kyori.adventure.audience.Audience
-
sendTitlePart
public <T> void sendTitlePart(net.kyori.adventure.title.TitlePart<T> part, @NotNull T value) - Specified by:
sendTitlePart
in interfacenet.kyori.adventure.audience.Audience
-
clearTitle
public void clearTitle()- Specified by:
clearTitle
in interfacenet.kyori.adventure.audience.Audience
-
resetTitle
public void resetTitle()- Specified by:
resetTitle
in interfacenet.kyori.adventure.audience.Audience
-
showBossBar
Deprecated.UseKeyedBossBar.showPlayer(Player)
instead- Specified by:
showBossBar
in interfacenet.kyori.adventure.audience.Audience
-
hideBossBar
Deprecated.UseKeyedBossBar.hidePlayer(Player)
instead- Specified by:
hideBossBar
in interfacenet.kyori.adventure.audience.Audience
-
getInventory
- Specified by:
getInventory
in interfaceInventoryHolder
-
getInventoryView
-
updateInventory
public void updateInventory() -
openInventory
-
closeInventory
public void closeInventory() -
getEquipment
-
getHolder
- Specified by:
getHolder
in interfaceInventoryHolder
-
KeyedBossBar.showPlayer(Player)
instead