API Events

This page is dedicated to explain how Parties events works.

You can handle a Parties event like Bukkit ones:

@EventHandler
public void onPlayerChat(PartiesChatEvent event) {
    if (event.getMessage().equals("nope!"))
        event.setCancelled(true);
}

Some events are cancellable or editable (editable means that you can edit the values of the event).

This is a list of the supported events:

EventCancellableEditable
PartiesChatEvent✔ Yes✔ Yes
PartiesCombustFriendlyFireBlockedEvent✔ Yes✖ No
PartiesFriendlyFireBlockedEvent✔ Yes✖ No
PartiesPotionsFriendlyFireBlockedEvent✔ Yes✖ No
PartiesPlayerJoinEvent✔ Yes✖ No
PartiesPlayerLeaveEvent✔ Yes✖ No
PartiesPartyPreCreateEvent✔ Yes✔ Yes
PartiesPartyPostCreateEvent✖ No✖ No
PartiesPartyPreDeleteEvent✔ Yes✖ No
PartiesPartyPostDeleteEvent✖ No✖ No
PartiesPartyRenameEvent✔ Yes✔ Yes