Class PartyRenameEvent

  • All Implemented Interfaces:
    org.bukkit.event.Cancellable

    public class PartyRenameEvent
    extends org.bukkit.event.Event
    implements org.bukkit.event.Cancellable
    Handles the event fired when a player renames a party.
    • Constructor Detail

      • PartyRenameEvent

        public PartyRenameEvent​(org.bukkit.entity.Player player,
                                Party party,
                                String newName)
        Fires when an in-game player renames a party.
        Parameters:
        player - The player renaming the party.
        party - The party being renamed.
        newName - The new name of the party.
    • Method Detail

      • getPlayer

        public org.bukkit.entity.Player getPlayer()
        Get the player who is renaming the party.
        Returns:
        Player renaming the party.
      • getParty

        public Party getParty()
        Get the party that is being renamed.
        Returns:
        Party being renamed.
      • getOldName

        public String getOldName()
        Get the party's previous name. This will return the formatted name including color codes.
        Returns:
        Party's previous name.
      • getNewName

        public String getNewName()
        Get the party's new name. This will return the formatted name including color codes.
        Returns:
        Party's new name.
      • setNewName

        public void setNewName​(String newName)
        Set the new name of the party. This may include color codes.
        Parameters:
        newName - The party's new name.
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface org.bukkit.event.Cancellable
      • setCancelled

        public void setCancelled​(boolean cancel)
        Specified by:
        setCancelled in interface org.bukkit.event.Cancellable
      • getHandlers

        @NotNull
        public @NotNull org.bukkit.event.HandlerList getHandlers()
        Specified by:
        getHandlers in class org.bukkit.event.Event
      • getHandlerList

        public static org.bukkit.event.HandlerList getHandlerList()