Interface Invite
- All Known Implementing Classes:
NationAllyNationInvite,PlayerJoinTownInvite,TownJoinNationInvite
public interface Invite
An object that represents an invitation.
- Author:
- Articdive
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()Runs the accept code for the given invitation.voiddecline(boolean fromSender) Runs the reject code for the given invitation.@Nullable org.bukkit.command.CommandSenderGets the sender of the invitationGets the receiver of the invitation.Gets the sender of the invitation.@NotNull String@Nullable UUID
-
Method Details
-
getDirectSender
@Nullable @Nullable org.bukkit.command.CommandSender getDirectSender()Gets the sender of the invitation- Returns:
- The
CommandSenderof the invitation, or null if the sender is a player and not online.
-
getSenderName
- Returns:
- The sender's name, or 'CONSOLE' if the invitation was sent by console.
-
getSenderUUID
- Returns:
- The sender's uuid, or
nullif the invitation was sent by console.
-
getReceiver
InviteReceiver getReceiver()Gets the receiver of the invitation.- Returns:
- The
InviteReceiverobject receiving the invite.
-
getSender
InviteSender getSender()Gets the sender of the invitation.- Returns:
- The
InviteSenderobject that sent the invite.
-
accept
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).
-