publicclassFadahAPIExampleListenerimplementsListener { @EventHandlerpublicvoidonListingEnd(ListingEndEvent e) {if (e.getReason() ==ListingEndReason.CANCELLED_ADMIN) {Player player =Bukkit.getPlayer(e.getListing().getOwner());if (player ==null) return;player.sendMessage("An admin has cancelled your listing!"); } }}
ListingPurchaseEvent
FadahAPIExampleListener.java
publicclassFadahAPIExampleListenerimplementsListener { @EventHandlerpublicvoidonListingPurchase(ListingPurchaseEvent e) {Player player =Bukkit.getPlayer(e.getListing().getOwner());if (player ==null) return;player.sendMessage("%s has purchased your listing!".formatted(e.getBuyer().getName())); }}