Interface Invite

All Known Implementing Classes:
NationAllyNationInvite, PlayerJoinTownInvite, TownJoinNationInvite

public interface Invite
An object that represents an invitation.
Author:
Articdive
  • Method Details

    • getDirectSender

      @Nullable @Nullable org.bukkit.command.CommandSender getDirectSender()
      Gets the sender of the invitation
      Returns:
      The CommandSender of the invitation, or null if the sender is a player and not online.
    • getSenderName

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

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

      InviteReceiver getReceiver()
      Gets the receiver of the invitation.
      Returns:
      The InviteReceiver object receiving the invite.
    • getSender

      InviteSender getSender()
      Gets the sender of the invitation.
      Returns:
      The InviteSender object that sent the invite.
    • accept

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

      void decline(boolean fromSender)
      Runs the reject code for the given invitation.
      Parameters:
      fromSender - Tells if invite was revoked (true) or declined (false).