Class NationAllyNationInvite

java.lang.Object
com.palmergames.bukkit.towny.object.inviteobjects.NationAllyNationInvite
All Implemented Interfaces:
Invite

public class NationAllyNationInvite extends Object
  • Constructor Details

    • NationAllyNationInvite

      public NationAllyNationInvite(org.bukkit.command.CommandSender directSender, Nation receiver, Nation sender)
  • Method Details

    • accept

      public void accept() throws TownyException
      Description copied from interface: Invite
      Runs the accept code for the given invitation.
      Throws:
      TownyException - Sends errors back up to be processed by the caller.
    • decline

      public void decline(boolean fromSender)
      Description copied from interface: Invite
      Runs the reject code for the given invitation.
      Parameters:
      fromSender - Tells if invite was revoked (true) or declined (false).
    • getDirectSender

      @Nullable public @Nullable org.bukkit.command.CommandSender getDirectSender()
      Description copied from interface: Invite
      Gets the sender of the invitation
      Specified by:
      getDirectSender in interface Invite
      Returns:
      The CommandSender of the invitation, or null if the sender is a player and not online.
    • getSenderName

      @NotNull public @NotNull String getSenderName()
      Specified by:
      getSenderName in interface Invite
      Returns:
      The sender's name, or 'CONSOLE' if the invitation was sent by console.
    • getSenderUUID

      @Nullable public @Nullable UUID getSenderUUID()
      Specified by:
      getSenderUUID in interface Invite
      Returns:
      The sender's uuid, or null if the invitation was sent by console.
    • getReceiver

      public Nation getReceiver()
      Description copied from interface: Invite
      Gets the receiver of the invitation.
      Specified by:
      getReceiver in interface Invite
      Returns:
      The InviteReceiver object receiving the invite.
    • getSender

      public Nation getSender()
      Description copied from interface: Invite
      Gets the sender of the invitation.
      Specified by:
      getSender in interface Invite
      Returns:
      The InviteSender object that sent the invite.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object