Record Class ResourcePackPushPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.common.ResourcePackPushPacket
- All Implemented Interfaces:
net.minestom.server.adventure.ComponentHolder<ServerPacket>,NetworkBuffer.Writer,SendablePacket,ServerPacket,ServerPacket.ComponentHolding,ServerPacket.Configuration,ServerPacket.Play
public record ResourcePackPushPacket(@NotNull UUID id, @NotNull String url, @NotNull String hash, boolean forced, @Nullable Component prompt)
extends Record
implements ServerPacket.Configuration, ServerPacket.Play, ServerPacket.ComponentHolding
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Constructor Summary
ConstructorsConstructorDescriptionResourcePackPushPacket(@NotNull UUID id, @NotNull String url, @NotNull String hash, boolean forced, @Nullable Component prompt) Creates an instance of aResourcePackPushPacketrecord class.ResourcePackPushPacket(@NotNull ResourcePackInfo resourcePackInfo, boolean required, @Nullable Component prompt) ResourcePackPushPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<Component> int@NotNull ServerPacketcopyWithOperator(@NotNull UnaryOperator<Component> operator) final booleanIndicates whether some other object is "equal to" this one.booleanforced()Returns the value of theforcedrecord component.@NotNull Stringhash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.@NotNull UUIDid()Returns the value of theidrecord component.intplayId()@Nullable Componentprompt()Returns the value of thepromptrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringurl()Returns the value of theurlrecord component.voidwrite(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.adventure.ComponentHolder
visitComponentsMethods inherited from interface net.minestom.server.network.packet.server.ServerPacket
getId
-
Constructor Details
-
ResourcePackPushPacket
-
ResourcePackPushPacket
public ResourcePackPushPacket(@NotNull @NotNull ResourcePackInfo resourcePackInfo, boolean required, @Nullable @Nullable Component prompt) -
ResourcePackPushPacket
public ResourcePackPushPacket(@NotNull @NotNull UUID id, @NotNull @NotNull String url, @NotNull @NotNull String hash, boolean forced, @Nullable @Nullable Component prompt) Creates an instance of aResourcePackPushPacketrecord class.- Parameters:
id- the value for theidrecord componenturl- the value for theurlrecord componenthash- the value for thehashrecord componentforced- the value for theforcedrecord componentprompt- the value for thepromptrecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
configurationId
public int configurationId()- Specified by:
configurationIdin interfaceServerPacket.Configuration
-
playId
public int playId()- Specified by:
playIdin interfaceServerPacket.Play
-
components
- Specified by:
componentsin interfacenet.minestom.server.adventure.ComponentHolder<ServerPacket>
-
copyWithOperator
@NotNull public @NotNull ServerPacket copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) - Specified by:
copyWithOperatorin interfacenet.minestom.server.adventure.ComponentHolder<ServerPacket>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
hash
Returns the value of thehashrecord component.- Returns:
- the value of the
hashrecord component
-
forced
public boolean forced()Returns the value of theforcedrecord component.- Returns:
- the value of the
forcedrecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-