Documentation • Public addon integration
MailboxGUI Developer API
MailboxGUI 6.0.0 • Archived version-specific API
Getting started
Start here: version & boundaries
This guide covers the public MailboxGUI 6.0.0 API from its archived source. It is a version-specific synchronous delivery/helper API, not the newer 6.1.0 service/query API. Private companion integration is excluded.
Use this API with the published 6.0.0 Free build. References below show the supported local-release surface; dormant future-edition declarations are deliberately omitted.
Back to the 6.0.0 wikiGetting started
Compile locally & configure dependencies
- Obtain an authorized copy of the matching 6.0.0 source project, including the parent pom.xml and mailboxgui-api module. Do not substitute current main-branch code.
- Install a JDK compatible with the project’s Java 17 compiler target and Maven. Run the command below from the full archived project root.
- Use install, not deploy: this installs the parent POM/API jar into your local Maven cache. No public publishing account or repository upload is needed.
- Add the provided dependency below to your addon. Supply your own compatible Bukkit/Spigot compile dependency, because server classes are provided at runtime.
- Install the actual MailboxGUI 6.0.0 plugin jar on the server. The API artifact is a compile-time library, not a standalone mail plugin.
mvn -pl mailboxgui-api -am -DskipTests -Dgpg.skip=true installThe normal local cache is ~/.m2/repository/io/github/rismr1/mailboxgui-api/6.0.0/. Dependencies such as Spigot API and Maven build plugins may still need repository access. If signature generation is not configured, -Dgpg.skip=true skips signing for this local build; never add deploy or activate a publishing profile just to compile an addon.
<dependency>
<groupId>io.github.rismr1</groupId>
<artifactId>mailboxgui-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>Getting started
Plugin dependency & service discovery
name: ExampleAddon
version: 1.0.0
main: example.ExampleAddon
api-version: "1.18"
depend: [MailboxGUI]For optional integration use softdepend: [MailboxGUI] and isolate API-dependent classes behind a plugin-presence check so absent API classes are not loaded. Handle later disable/service removal deliberately. A soft dependency is not permission to ignore a null service.
com.rismr1.mailboxgui.api.MailboxGUIApi api =
getServer().getServicesManager().load(
com.rismr1.mailboxgui.api.MailboxGUIApi.class);
if (api == null) {
getLogger().warning("MailboxGUI API is unavailable; integration disabled.");
return;
}
// MailboxGUIApiProvider.get() is an equivalent convenience lookup.Use the Bukkit server thread for sends, item/economy access and notification mutations. These methods are synchronous and do not promise thread safety or async completion. If an HTTP/database task runs asynchronously, schedule its mail work back onto the server thread before calling the API.
Delivery requests
Recipients, lookup & policies
| Recipient factory / builder | Meaning |
|---|---|
| MailboxApiRecipient.of(uuid, name) | Known UUID with a name; prefer stable validated identities. |
| MailboxApiRecipient.uuid(uuid) | UUID-only recipient. |
| MailboxApiRecipient.name(name) | Name-only lookup against available MailboxGUI data. |
| recipient(uuid, name) / recipient(uuid) / recipient(name) | Add one recipient to a request. |
| recipients(list) | Append explicit MailboxApiRecipient entries. |
| RecipientPolicy | Behavior |
|---|---|
| KNOWN_MAILBOXGUI_PLAYER | Default: existing MailboxGUI data is sufficient; no physical registration is required. |
| REGISTERED_MAILBOX_ONLY | Existing data AND a registered physical mailbox are required. |
| CREATE_IF_MISSING | May create missing MailboxGUI data when a UUID is supplied. A name alone does not authorize manufacturing a new identity. |
var recipient = api.findRecipientByName("Alex");
if (recipient.isPresent()) {
var uuid = recipient.get().getUuid();
boolean hasData = api.hasMailboxData(uuid);
boolean registered = api.hasRegisteredMailbox(uuid);
}findRecipientByName returns Optional.empty for missing/blank names; it is not an external account lookup. A successful resolution does not guarantee successful serialization, economy access or delivery. Requests are evaluated per recipient; do not confuse isRegistered with data existence.
Delivery requests
Common request fields & defaults
| Builder field | Meaning |
|---|---|
| fromDisplayName | Display sender; blank/absent values use the relevant configured admin-server-name. Not proof of sender identity. |
| sourcePluginName | Integration name for diagnostics. Do not put secrets or personal payloads here. |
| deliveryDelaySeconds | Default -1 means configured type delay; 0 means immediate; a positive value queues that many seconds. |
| notifyRecipients | Default true; false suppresses the ordinary delivery notification route. It is not a deletion/ownership control. |
| recipientPolicy | Default KNOWN_MAILBOXGUI_PLAYER. |
| message / title / amount / contents | Type-specific payload; validation still applies at send time. |
Letter/book/money requests normalize text fields; package builders clone non-air ItemStacks and expose defensive content copies. Repeated recipient calls append recipients. contents(...) replaces the package contents list; do not confuse it with addItem(...).
Delivery requests
Send paper & book letters
sendLetter accepts LetterMailRequest. Paper messages must be nonblank and no longer than the archived API’s 256-character validation. sendBookLetter accepts BookLetterMailRequest with nonblank title and message; it does not impose the paper-letter 256-character check. Both need at least one recipient.
var request = com.rismr1.mailboxgui.api.request.LetterMailRequest.builder()
.recipient("Alex")
.fromDisplayName("Quest Rewards")
.message("Your quest reward is ready.")
.sourcePluginName("ExampleAddon")
.recipientPolicy(com.rismr1.mailboxgui.api.type.RecipientPolicy.KNOWN_MAILBOXGUI_PLAYER)
.deliveryDelaySeconds(0)
.notifyRecipients(true)
.expiresAfter(java.time.Duration.ofDays(7))
.build();
var result = api.sendLetter(request);var book = com.rismr1.mailboxgui.api.request.BookLetterMailRequest.builder()
.recipient("Alex")
.fromDisplayName("Town Office")
.title("Town Guide")
.message("Welcome! Visit the town hall to begin.")
.sourcePluginName("ExampleAddon")
.deliveryDelaySeconds(0)
.build();
var bookResult = api.sendBookLetter(book);letter.enabled controls API letter/book delivery; disabled letters return DISABLED_BY_CONFIG. Use the exact version’s configuration rather than assuming the newer split letter controls apply.
Delivery requests
Send packages & experience
sendPackage accepts PackageMailRequest. Use addItem or contents for items and experienceAmount for raw XP. Capacity comes from getPackageContentLimit(): 7, 14 or 21 content positions depending on the configured rows. XP contributes one payload position when included.
var reward = com.rismr1.mailboxgui.api.request.PackageMailRequest.builder()
.recipient("Alex")
.fromDisplayName("Quest Rewards")
.addItem(new org.bukkit.inventory.ItemStack(org.bukkit.Material.DIAMOND, 2))
.experienceAmount(100)
.sourcePluginName("ExampleAddon")
.deliveryDelaySeconds(0)
.build();
var packageResult = api.sendPackage(reward);Packages must not be empty. Null/air payloads are removed and item stacks are cloned. Nested MailboxGUI packages and blocked loaded shulkers fail validation. A package can be rejected before ANY recipient is delivered when its payload exceeds the limit or cannot serialize.
Custom item metadata is carried on ItemStacks; use the real server-supported item and its appropriate integration API. The public MailboxGUI API has no template-ID builder lookup or item-provider SPI in these versions. Templates are an administrator-command feature, not a request method you can invent.
Delivery requests
COD currency & return destinations
A PackageMailRequest with codAmount > 0 and/or codItemCurrencyContents is a COD package. Use addCodItemCurrency or codItemCurrencyContents for price items. Monetary prices need Vault/economy; item prices need the item-currency setting. Combined prices require both enabled routes.
CodReturnDestination.NONE is the default. SENDER needs a valid senderUuid. ADMIN_INBOX selects the Shared Admin Inbox; payment and declined/expired return switches must agree with that destination and the staff inbox must be enabled. Invalid combinations are reported, not silently converted.
var cod = com.rismr1.mailboxgui.api.request.PackageMailRequest.builder()
.recipient("Alex")
.fromDisplayName("Server Shop")
.addItem(new org.bukkit.inventory.ItemStack(org.bukkit.Material.DIAMOND, 2))
.codAmount(50.0)
.addCodItemCurrency(new org.bukkit.inventory.ItemStack(org.bukkit.Material.EMERALD, 5))
.codReturnDestination(com.rismr1.mailboxgui.api.type.CodReturnDestination.ADMIN_INBOX)
.returnCodPaymentToAdminInbox(true)
.returnDeclinedOrExpiredToAdminInbox(true)
.sourcePluginName("ExampleAddon")
.deliveryDelaySeconds(0)
.build();
var codResult = api.sendPackage(cod);The item-currency price has its own capacity and safety checks. Reject nested packages/blocked nonempty shulkers in the price as well as the payload. Raw XP price items must be legitimate MailboxGUI-generated experience items; a renamed bottle is not an XP currency API. Validate the real server settings before treating a built request as deliverable.
Delivery requests
Send money mail
var money = com.rismr1.mailboxgui.api.request.MoneyMailRequest.builder()
.recipient("Alex")
.fromDisplayName("Event Rewards")
.amount(125.50)
.sourcePluginName("ExampleAddon")
.deliveryDelaySeconds(0)
.build();
var moneyResult = api.sendMoney(money);sendMoney requires money.enabled, a positive amount and a working Vault economy provider. Pass finite, sensible amounts validated by your own integration. This is reward creation, not an automatic withdrawal from an addon account. Recipients claim the actual money mail through normal plugin handling.
Delivery requests
6.0.0 expiration & delivery identifiers
All four request builders support expirationDurationSeconds(long) and expiresAfter(Duration). Zero seconds means no expiration. A Duration must be positive and at least one whole second; negative values and arithmetic overflow are rejected. Validate external input before building a request.
Expiration begins at actual delivery. Queued requests retain the duration until arrival rather than consuming it while waiting. Immediate results can expose final mail IDs/expiration timestamps; queued results expose queue IDs and the stored expiration duration.
for (var entry : result.getRecipientResults()) {
if (entry.hasMailId()) getLogger().info("Committed mail ID: " + entry.getMailId());
if (entry.hasQueueId()) getLogger().info("Queued delivery ID: " + entry.getQueueId());
if (entry.hasExpiration()) {
var expiresAt = java.time.Instant.ofEpochMilli(entry.getExpirationTimestampMillis());
}
}
var deliveredIds = result.getDeliveredMailIds();
var queueIds = result.getQueuedDeliveryIds();
var recipientMailIds = result.getSuccessfulRecipientMailIds();
boolean anyExpiration = result.hasExpiringDeliveries();Results & helpers
Results, failure handling & retries
getLogger().info("Delivered=" + result.getDeliveredRecipients()
+ ", queued=" + result.getQueuedRecipients()
+ ", failed=" + result.getFailedRecipients());
for (var entry : result.getRecipientResults()) {
if (!entry.isSuccessful()) {
getLogger().warning("Mail outcome: " + entry.getStatus());
// Store only needed, private operation state; do not leak player mail.
}
}
for (var warning : result.getWarnings()) {
getLogger().warning(warning);
}MailboxSendResult contains the mail type, recipient results and warnings. getRequestedRecipients counts result entries, including validation-failure entries where appropriate. isSuccessful requires a nonempty result with every recipient successful. DELIVERED and QUEUED are successful statuses; a bulk request can have a mixture.
| Documented status | Meaning |
|---|---|
| DELIVERED | Mail committed to inbox. |
| QUEUED | Accepted for delayed delivery. |
| RECIPIENT_NOT_FOUND | No resolvable recipient data. |
| NO_REGISTERED_MAILBOX | Physical-registration policy failed. |
| MAILBOX_DATA_MISSING | Resolved identity has no usable data. |
| INVALID_REQUEST | Null/empty/invalid request or required fields. |
| INBOX_WRITE_FAILED | Inbox/queue write did not complete. |
| DISABLED_BY_CONFIG | A required type/currency/XP setting is disabled. |
| ECONOMY_UNAVAILABLE | Required Vault/provider route is unavailable. |
| TOO_MANY_CONTENTS | Payload or COD currency exceeds capacity. |
| EMPTY_PACKAGE | No usable contents/XP. |
| INVALID_EXPIRATION | Invalid expiration duration. |
| ADMIN_INBOX_DISABLED | Staff return inbox is unavailable. |
| INVALID_COD_RETURN_DESTINATION | Return destination is invalid. |
| INVALID_COD_RETURN_CONFIGURATION | Return switches/destination conflict. |
| NESTED_PACKAGE_BLOCKED | A MailboxGUI package was nested. |
| NON_EMPTY_SHULKER_BLOCKED | Loaded-shulker policy rejected contents. |
| SERIALIZATION_FAILED | Mail item could not be serialized/created. |
Results & helpers
Mailbox counts & notification helpers
| Method | Use |
|---|---|
| hasMailboxData(uuid) | Check stored player data separately from registration. |
| hasRegisteredMailbox(uuid) | Check physical registration separately from inbox contents. |
| getUncheckedMailCount(uuid) | Unchecked mail count, not total stored inventory occupancy. |
| getPendingLoginNotificationCount(uuid) | Pending login-summary notifications. |
| hasPendingMailNotification(uuid) | Whether notification state is pending. |
| refreshMailNotification(uuid) | Ask the supported notification/visual route to refresh. |
| clearMailNotification(uuid) | Clear notification state; does not delete the stored mail. |
| getPackageContentLimit() | Running package capacity, not a hardcoded newest-version limit. |
Helpers handle missing/null identities conservatively, but check a valid UUID yourself. Do not use notification clearing as a receipt, payment or authorization check. Directly rewriting plugin YAML/SQL bypasses validation and is not a supported API integration.
Events & reference
Delivery events & listener setup
MailboxMailDeliveredEvent describes an actual delivered item, with recipient/sender, origin, type, COD/money metadata, delayed flag and mass-delivery flag. MailboxMassMailDeliveredEvent aggregates a bulk delivery. Neither is a cancellable pre-send hook. Do not manually fire one to create mail.
@org.bukkit.event.EventHandler
public void onMail(com.rismr1.mailboxgui.api.event.MailboxMailDeliveredEvent event) {
if (event.isPartOfMassDelivery()) return; // Choose one bulk/single observation strategy.
getLogger().info("Mail delivered: " + event.getDeliveryType());
}getServer().getPluginManager().registerEvents(this, this);Use getMailId/hasMailId and getExpirationTimestampMillis/hasExpiration where available on the event. The mass event also provides a successful-recipient mail-ID map and an expiration timestamp. Handle absent metadata instead of assuming every constructor or source supplies it.
Choose whether your addon processes individual events or the aggregate mass event; processing both as independent rewards double-counts bulk deliveries. Keep event work small and do not recursively send the same mail from its own handler.
Events & reference
Complete public signature reference
The expandable reference lists public method signatures and enum values read from this version’s API module. Request Builder methods are shown alongside request getters. These are signature references, not replacement Java source files; compile the authorized original module. Event/result constructors are omitted because integrations observe real delivery results/events rather than constructing them.
Dormant future-edition declarations are excluded from this local-release reference. Do not use a declaration in an archive as proof that an unreleased capability was provided.
Service discovery
MailboxGUIApi
// MailboxGUIApi — public signatures (request Builder methods are included)
MailboxSendResult sendLetter(LetterMailRequest request);
MailboxSendResult sendBookLetter(BookLetterMailRequest request);
MailboxSendResult sendPackage(PackageMailRequest request);
MailboxSendResult sendMoney(MoneyMailRequest request);
Optional<MailboxApiRecipient> findRecipientByName(String playerName);
boolean hasMailboxData(UUID playerUuid);
boolean hasRegisteredMailbox(UUID playerUuid);
int getUncheckedMailCount(UUID playerUuid);
int getPendingLoginNotificationCount(UUID playerUuid);
boolean hasPendingMailNotification(UUID playerUuid);
boolean refreshMailNotification(UUID playerUuid);
boolean clearMailNotification(UUID playerUuid);
int getPackageContentLimit();MailboxGUIApiProvider
// MailboxGUIApiProvider — public signatures (request Builder methods are included)
public static MailboxGUIApi get();Requests
MailboxApiRecipient
// MailboxApiRecipient — public signatures (request Builder methods are included)
public static MailboxApiRecipient of(UUID uuid, String name);
public static MailboxApiRecipient uuid(UUID uuid);
public static MailboxApiRecipient name(String name);
public UUID getUuid();
public String getName();
public boolean hasUuid();
public boolean hasName();LetterMailRequest
// LetterMailRequest — public signatures (request Builder methods are included)
public static Builder builder();
public List<MailboxApiRecipient> getRecipients();
public String getFromDisplayName();
public String getMessage();
public int getDeliveryDelaySeconds();
public boolean isNotifyRecipients();
public RecipientPolicy getRecipientPolicy();
public String getSourcePluginName();
public long getExpirationDurationSeconds();
public boolean hasExpiration();
public Builder recipient(UUID uuid, String name);
public Builder recipient(UUID uuid);
public Builder recipient(String name);
public Builder recipients(List<MailboxApiRecipient> recipients);
public Builder fromDisplayName(String fromDisplayName);
public Builder message(String message);
public Builder deliveryDelaySeconds(int deliveryDelaySeconds);
public Builder notifyRecipients(boolean notifyRecipients);
public Builder recipientPolicy(RecipientPolicy recipientPolicy);
public Builder sourcePluginName(String sourcePluginName);
public Builder expirationDurationSeconds(long seconds);
public Builder expiresAfter(Duration duration);
public LetterMailRequest build();BookLetterMailRequest
// BookLetterMailRequest — public signatures (request Builder methods are included)
public static Builder builder();
public List<MailboxApiRecipient> getRecipients();
public String getFromDisplayName();
public String getTitle();
public String getMessage();
public int getDeliveryDelaySeconds();
public boolean isNotifyRecipients();
public RecipientPolicy getRecipientPolicy();
public String getSourcePluginName();
public long getExpirationDurationSeconds();
public boolean hasExpiration();
public Builder recipient(UUID uuid, String name);
public Builder recipient(UUID uuid);
public Builder recipient(String name);
public Builder recipients(List<MailboxApiRecipient> recipients);
public Builder fromDisplayName(String fromDisplayName);
public Builder title(String title);
public Builder message(String message);
public Builder deliveryDelaySeconds(int deliveryDelaySeconds);
public Builder notifyRecipients(boolean notifyRecipients);
public Builder recipientPolicy(RecipientPolicy recipientPolicy);
public Builder sourcePluginName(String sourcePluginName);
public Builder expirationDurationSeconds(long seconds);
public Builder expiresAfter(Duration duration);
public BookLetterMailRequest build();PackageMailRequest
// PackageMailRequest — public signatures (request Builder methods are included)
public static Builder builder();
public List<MailboxApiRecipient> getRecipients();
public String getFromDisplayName();
public UUID getSenderUuid();
public List<ItemStack> getContents();
public int getExperienceAmount();
public double getCodAmount();
public List<ItemStack> getCodItemCurrencyContents();
public boolean hasCodItemCurrencyContents();
public boolean hasCodPrice();
public boolean isReturnCodPaymentToSender();
public CodReturnDestination getCodReturnDestination();
public boolean isReturnCodPaymentToAdminInbox();
public boolean isReturnDeclinedOrExpiredToAdminInbox();
public int getDeliveryDelaySeconds();
public boolean isNotifyRecipients();
public RecipientPolicy getRecipientPolicy();
public String getSourcePluginName();
public long getExpirationDurationSeconds();
public boolean hasExpiration();
public Builder recipient(UUID uuid, String name);
public Builder recipient(UUID uuid);
public Builder recipient(String name);
public Builder recipients(List<MailboxApiRecipient> recipients);
public Builder fromDisplayName(String fromDisplayName);
public Builder senderUuid(UUID senderUuid);
public Builder addItem(ItemStack item);
public Builder contents(List<ItemStack> contents);
public Builder experienceAmount(int experienceAmount);
public Builder codAmount(double codAmount);
public Builder addCodItemCurrency(ItemStack item);
public Builder codItemCurrencyContents(List<ItemStack> codItemCurrencyContents);
public Builder clearCodItemCurrencyContents();
public Builder returnCodPaymentToSender(boolean returnCodPaymentToSender);
public Builder codReturnDestination(CodReturnDestination destination);
public Builder returnCodPaymentToAdminInbox(boolean enabled);
public Builder returnDeclinedOrExpiredToAdminInbox(boolean enabled);
public Builder deliveryDelaySeconds(int deliveryDelaySeconds);
public Builder notifyRecipients(boolean notifyRecipients);
public Builder recipientPolicy(RecipientPolicy recipientPolicy);
public Builder sourcePluginName(String sourcePluginName);
public Builder expirationDurationSeconds(long seconds);
public Builder expiresAfter(Duration duration);
public PackageMailRequest build();MoneyMailRequest
// MoneyMailRequest — public signatures (request Builder methods are included)
public static Builder builder();
public List<MailboxApiRecipient> getRecipients();
public String getFromDisplayName();
public double getAmount();
public int getDeliveryDelaySeconds();
public boolean isNotifyRecipients();
public RecipientPolicy getRecipientPolicy();
public String getSourcePluginName();
public long getExpirationDurationSeconds();
public boolean hasExpiration();
public Builder recipient(UUID uuid, String name);
public Builder recipient(UUID uuid);
public Builder recipient(String name);
public Builder recipients(List<MailboxApiRecipient> recipients);
public Builder fromDisplayName(String fromDisplayName);
public Builder amount(double amount);
public Builder deliveryDelaySeconds(int deliveryDelaySeconds);
public Builder notifyRecipients(boolean notifyRecipients);
public Builder recipientPolicy(RecipientPolicy recipientPolicy);
public Builder sourcePluginName(String sourcePluginName);
public Builder expirationDurationSeconds(long seconds);
public Builder expiresAfter(Duration duration);
public MoneyMailRequest build();Results
MailboxSendResult
// MailboxSendResult — public signatures (request Builder methods are included)
public static MailboxSendResult singleFailure(MailType mailType, RecipientStatus status, String message);
public MailType getMailType();
public List<MailboxRecipientResult> getRecipientResults();
public List<String> getWarnings();
public boolean isSuccessful();
public int getRequestedRecipients();
public int getDeliveredRecipients();
public int getQueuedRecipients();
public int getFailedRecipients();
public List<String> getDeliveredMailIds();
public List<String> getQueuedDeliveryIds();
public boolean hasExpiringDeliveries();
public Map<UUID, String> getSuccessfulRecipientMailIds();MailboxRecipientResult
// MailboxRecipientResult — public signatures (request Builder methods are included)
public UUID getRecipientUuid();
public String getRecipientName();
public RecipientStatus getStatus();
public String getMessage();
public String getMailId();
public boolean hasMailId();
public long getExpirationTimestampMillis();
public boolean hasExpiration();
public String getQueueId();
public boolean hasQueueId();
public long getExpirationDurationSeconds();
public boolean isSuccessful();RecipientStatus
enum RecipientStatus {
DELIVERED,
QUEUED,
RECIPIENT_NOT_FOUND,
NO_REGISTERED_MAILBOX,
MAILBOX_DATA_MISSING,
INVALID_REQUEST,
INBOX_WRITE_FAILED,
DISABLED_BY_CONFIG,
ECONOMY_UNAVAILABLE,
TOO_MANY_CONTENTS,
EMPTY_PACKAGE,
INVALID_EXPIRATION,
ADMIN_INBOX_DISABLED,
INVALID_COD_RETURN_DESTINATION,
INVALID_COD_RETURN_CONFIGURATION,
NESTED_PACKAGE_BLOCKED,
NON_EMPTY_SHULKER_BLOCKED,
SERIALIZATION_FAILED
}Policies and delivery types
RecipientPolicy
enum RecipientPolicy {
REGISTERED_MAILBOX_ONLY,
KNOWN_MAILBOXGUI_PLAYER,
CREATE_IF_MISSING
}MailType
enum MailType {
LETTER,
PACKAGE,
MONEY
}MailDeliveryType
enum MailDeliveryType {
LETTER,
BOOK_LETTER,
PACKAGE,
COD_PACKAGE,
RETURNED_COD_PACKAGE,
COD_ITEM_CURRENCY_PAYMENT,
MONEY_MAIL
}MailDeliveryOrigin
enum MailDeliveryOrigin {
PLAYER,
ADMIN,
API,
SYSTEM
}MailDeliveryScope
enum MailDeliveryScope {
SINGLE_SERVER
}MailDeliverySource
enum MailDeliverySource {
LOCAL_DELIVERY,
PLAYER_ACTION,
ADMIN_COMMAND,
API,
DELAYED_QUEUE,
SYSTEM
}CodReturnDestination
enum CodReturnDestination {
NONE,
SENDER,
ADMIN_INBOX
}Delivery events
MailboxMailDeliveredEvent
// MailboxMailDeliveredEvent — public signatures (request Builder methods are included)
public UUID getRecipientUuid();
public String getRecipientName();
public UUID getSenderUuid();
public String getSenderName();
public MailDeliveryOrigin getOrigin();
public MailDeliveryType getDeliveryType();
public double getCodPrice();
public String getCodPriceText();
public double getMoneyAmount();
public boolean isDelayedDelivery();
public boolean isPartOfMassDelivery();
public String getEventId();
public String getMailId();
public boolean hasMailId();
public MailDeliveryScope getDeliveryScope();
public MailDeliverySource getDeliverySource();
public long getExpirationTimestampMillis();
public boolean hasExpiration();
public boolean isAdminMail();
public boolean isPlayerMail();
public boolean isApiMail();
public boolean hasSenderUuid();
public boolean hasCodPrice();
public boolean hasCodPriceText();
public boolean hasMoneyAmount();
public HandlerList getHandlers();
public static HandlerList getHandlerList();MailboxMassMailDeliveredEvent
// MailboxMassMailDeliveredEvent — public signatures (request Builder methods are included)
public UUID getSenderUuid();
public String getSenderName();
public MailDeliveryOrigin getOrigin();
public MailDeliveryType getDeliveryType();
public int getRequestedRecipientCount();
public int getSuccessfulRecipientCount();
public int getFailedRecipientCount();
public double getCodPrice();
public String getCodPriceText();
public double getMoneyAmount();
public boolean isDelayedDelivery();
public List<UUID> getSuccessfulRecipientUuids();
public String getEventId();
public MailDeliveryScope getDeliveryScope();
public MailDeliverySource getDeliverySource();
public long getExpirationTimestampMillis();
public boolean hasExpiration();
public Map<UUID, String> getSuccessfulRecipientMailIds();
public boolean isAdminMail();
public boolean isApiMail();
public boolean hasSenderUuid();
public boolean hasCodPrice();
public boolean hasCodPriceText();
public boolean hasMoneyAmount();
public HandlerList getHandlers();
public static HandlerList getHandlerList();Help
Integration checks & support
| Problem | Check |
|---|---|
| Dependency cannot resolve | Compile/install the matching archived API and parent locally; it was never on Maven Central. |
| ClassNotFoundException / no service | provided dependency, matching installed jar, dependency load order and API class identity. |
| No recipient | Correct UUID/name, real stored data and chosen RecipientPolicy. |
| Package rejected | Payload/XP capacity, nested items, loaded-shulker policy and usable serialization. |
| Money/COD unavailable | Required provider/toggles, amount and return setup. |
| Queued mail not yet visible | Delay processing and actual delivery events; QUEUED is not delivered. |
| Duplicate reward | Own transaction bookkeeping, partial-result retry strategy and single-versus-mass event handling. |
- Build your addon against the exact archived module.
- Test on a disposable server with matching MailboxGUI and hooks.
- Verify a known recipient, a missing one and both data/registration policies.
- Test immediate and delayed paper/book/package/money, then COD and deliberate validation failures.
- Confirm notification toggles, partial outcomes and event handling do not duplicate rewards.