Package net.md_5.bungee.api.chat
Class ObjectComponent
java.lang.Object
net.md_5.bungee.api.chat.BaseComponent
net.md_5.bungee.api.chat.ObjectComponent
An object component that can be used to display objects.
It can either display a player's head or an object by a specific sprite and an atlas.
Note: this was added in Minecraft 1.21.9.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.md_5.bungee.api.chat.BaseComponent
BaseComponent.LimitedStringVisitor, BaseComponent.StringVisitor -
Constructor Summary
ConstructorsConstructorDescriptionObjectComponent(@NonNull ChatObject object) Creates a ObjectComponent from a given ChatObject.ObjectComponent(ObjectComponent original) Creates an object component from the original to clone it. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanClones the BaseComponent and returns the clone.booleaninthashCode()voidsetObject(ChatObject object) protected voidtoLegacyText(BaseComponent.StringVisitor builder) protected voidtoPlainText(BaseComponent.StringVisitor builder) toString()Methods inherited from class net.md_5.bungee.api.chat.BaseComponent
addExtra, addExtra, applyStyle, copyFormatting, copyFormatting, copyFormatting, duplicateWithoutFormatting, getClickEvent, getColor, getColorRaw, getExtra, getFont, getFontRaw, getHoverEvent, getInsertion, getShadowColor, getShadowColorRaw, getStyle, hasFormatting, hasStyle, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isReset, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, retain, setBold, setClickEvent, setColor, setExtra, setFont, setHoverEvent, setInsertion, setItalic, setObfuscated, setReset, setShadowColor, setStrikethrough, setStyle, setUnderlined, toLegacyText, toLegacyText, toPlainText, toPlainText
-
Constructor Details
-
ObjectComponent
Creates a ObjectComponent from a given ChatObject. SeePlayerObjectandSpriteObject.- Parameters:
object- the ChatObject
-
ObjectComponent
Creates an object component from the original to clone it.- Parameters:
original- the original for the new score component
-
-
Method Details
-
duplicate
Description copied from class:BaseComponentClones the BaseComponent and returns the clone.- Specified by:
duplicatein classBaseComponent- Returns:
- The duplicate of this BaseComponent
-
toPlainText
-
toLegacyText
-
getObject
-
setObject
-
toString
- Overrides:
toStringin classBaseComponent
-
equals
- Overrides:
equalsin classBaseComponent
-
canEqual
- Overrides:
canEqualin classBaseComponent
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseComponent
-