Interface Invite
- All Known Implementing Classes:
NationAllyNationInvite
,PlayerJoinTownInvite
,TownJoinNationInvite
public interface Invite
An object that represents an invitation.
- Author:
- Articdive
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept()
Runs the accept code for the given invitation.void
decline
(boolean fromSender) Runs the reject code for the given invitation.@Nullable org.bukkit.command.CommandSender
Gets 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
CommandSender
of 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
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
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).
-