Record Class OffsetCommandSender
java.lang.Object
java.lang.Record
com.jtprince.coordinateoffset.command.OffsetCommandSender
- Record Components:
audience- An audience that can be used to respond to this sender.name- String to represent the sender in various verbose messages.player- The player who sent this command, ornullif the sender is not a player (console, command block, etc.)
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,net.kyori.adventure.pointer.Pointered
@NullMarked
public record OffsetCommandSender(net.kyori.adventure.audience.Audience audience, String name, @Nullable OffsetPlayer player)
extends Record
implements net.kyori.adventure.audience.ForwardingAudience
Adapter interface representing a command sender in a Minecraft server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.Single -
Constructor Summary
ConstructorsConstructorDescriptionOffsetCommandSender(net.kyori.adventure.audience.Audience audience, String name, @Nullable OffsetPlayer player) Creates an instance of aOffsetCommandSenderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.audience.Audienceaudience()Returns the value of theaudiencerecord component.Iterable<? extends net.kyori.adventure.audience.Audience> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisPlayer(OffsetPlayer player) name()Returns the value of thenamerecord component.@Nullable OffsetPlayerplayer()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearResourcePacks, clearTitle, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Constructor Details
-
OffsetCommandSender
public OffsetCommandSender(net.kyori.adventure.audience.Audience audience, String name, @Nullable OffsetPlayer player) Creates an instance of aOffsetCommandSenderrecord class.
-
-
Method Details
-
audiences
- Specified by:
audiencesin interfacenet.kyori.adventure.audience.ForwardingAudience
-
isPlayer
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
audience
public net.kyori.adventure.audience.Audience audience()Returns the value of theaudiencerecord component.- Returns:
- the value of the
audiencerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-