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, or null if 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

    Constructors
    Constructor
    Description
    OffsetCommandSender(net.kyori.adventure.audience.Audience audience, String name, @Nullable OffsetPlayer player)
    Creates an instance of a OffsetCommandSender record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.kyori.adventure.audience.Audience
    Returns the value of the audience record component.
    Iterable<? extends net.kyori.adventure.audience.Audience>
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    Returns the value of the name record component.
    @Nullable OffsetPlayer
    Returns the value of the player record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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, stopSound

    Methods 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, stopSound

    Methods 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 a OffsetCommandSender record class.
      Parameters:
      audience - the value for the audience record component
      name - the value for the name record component
      player - the value for the player record component
  • Method Details

    • audiences

      public Iterable<? extends net.kyori.adventure.audience.Audience> audiences()
      Specified by:
      audiences in interface net.kyori.adventure.audience.ForwardingAudience
    • isPlayer

      public boolean isPlayer(OffsetPlayer player)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • audience

      public net.kyori.adventure.audience.Audience audience()
      Returns the value of the audience record component.
      Returns:
      the value of the audience record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • player

      public @Nullable OffsetPlayer player()
      Returns the value of the player record component.
      Returns:
      the value of the player record component