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 floatfinal ClientConnectionprotected org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameModeprotected final InventoryViewprotected bytefinal PlayerInteractManagerprotected final PlayerInventoryprotected intprotected byteprotected byteprotected final Stringprotected DataWatcherFields 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 TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoiddisconnect(String reason) voiddisconnect(net.kyori.adventure.text.Component reason) floatorg.geysermc.mcprotocollib.protocol.data.game.entity.player.GameModebytegetName()intgetScore()bytebytebooleanhasPermission(String permission) voidhideBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) Deprecated.booleanisValid()protected intvoidopenBook(net.kyori.adventure.inventory.Book book) voidopenInventory(Inventory inventory) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) voidremove()voidvoidsendActionBar(@NotNull net.kyori.adventure.text.Component message) voidsendMessage(@NotNull net.kyori.adventure.identity.Identity source, @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.audience.MessageType type) voidsendMessage(String message) voidsendMessage(String message, UUID uuid) voidsendPlayerListHeaderAndFooter(@NotNull net.kyori.adventure.text.Component header, @NotNull net.kyori.adventure.text.Component footer) voidsendPluginMessage(String channel, byte[] data) Deprecated.voidsendPluginMessage(net.kyori.adventure.key.Key channel, byte[] data) <T> voidsendTitlePart(net.kyori.adventure.title.TitlePart<T> part, T value) voidsetAdditionalHearts(float additionalHearts) protected voidsetEntityId(int entityId) Deprecated.voidsetGamemode(org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode gamemode) protected voidsetLocation(Location location) voidsetMainHand(byte mainHand) voidsetPlayerListHeaderFooter(String header, String footer) voidsetResourcePack(String url, String hash, boolean forced, net.kyori.adventure.text.Component prompt) voidsetScore(int score) voidsetSelectedSlot(byte slot) voidsetSkinLayers(byte skinLayers) voidsetSubTitle(String subTitle) voidvoidsetTitleSubTitle(String title, String subTitle, int fadeIn, int stay, int fadeOut) voidsetTitleTimer(int fadeIn, int stay, int fadeOut) voidshowBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) Deprecated.voidstopSound(net.kyori.adventure.sound.SoundStop stop) voidvoidMethods 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, setSleepingLocationMethods 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, setZMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, closeDialog, 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, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, showDialog, showTitle, stopSoundMethods inherited from interface com.loohp.limbo.inventory.InventoryHolder
getLocationMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Field Details
-
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:
getDataWatcherin classEntity
-
isValid
public boolean isValid() -
remove
public void remove() -
getName
- Specified by:
getNamein interfaceCommandSender
-
hasPermission
- Specified by:
hasPermissionin interfaceCommandSender
-
teleport
-
setLocation
-
sendPluginMessage
- Throws:
IOException
-
sendPluginMessage
Deprecated.- Throws:
IOException
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.identity.Identity source, @NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull net.kyori.adventure.audience.MessageType type) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
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:
openBookin interfacenet.kyori.adventure.audience.Audience
-
stopSound
public void stopSound(net.kyori.adventure.sound.SoundStop stop) - Specified by:
stopSoundin 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:
playSoundin 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:
playSoundin interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience
-
sendActionBar
public void sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendActionBarin interfacenet.kyori.adventure.audience.Audience
-
sendTitlePart
public <T> void sendTitlePart(net.kyori.adventure.title.TitlePart<T> part, @NotNull T value) - Specified by:
sendTitlePartin interfacenet.kyori.adventure.audience.Audience
-
clearTitle
public void clearTitle()- Specified by:
clearTitlein interfacenet.kyori.adventure.audience.Audience
-
resetTitle
public void resetTitle()- Specified by:
resetTitlein interfacenet.kyori.adventure.audience.Audience
-
showBossBar
Deprecated.UseKeyedBossBar.showPlayer(Player)instead- Specified by:
showBossBarin interfacenet.kyori.adventure.audience.Audience
-
hideBossBar
Deprecated.UseKeyedBossBar.hidePlayer(Player)instead- Specified by:
hideBossBarin interfacenet.kyori.adventure.audience.Audience
-
getInventory
- Specified by:
getInventoryin interfaceInventoryHolder
-
getInventoryView
-
updateInventory
public void updateInventory() -
openInventory
-
closeInventory
public void closeInventory() -
getEquipment
-
getHolder
- Specified by:
getHolderin interfaceInventoryHolder
-
KeyedBossBar.showPlayer(Player)instead