Package dev.majek.pc.api
Class PartyRenameEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- dev.majek.pc.api.PartyRenameEvent
-
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PartyRenameEvent extends org.bukkit.event.Event implements org.bukkit.event.CancellableHandles the event fired when a player renames a party.
-
-
Constructor Summary
Constructors Constructor Description PartyRenameEvent(org.bukkit.entity.Player player, Party party, String newName)Fires when an in-game player renames a party.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.bukkit.event.HandlerListgetHandlerList()@NotNull org.bukkit.event.HandlerListgetHandlers()StringgetNewName()Get the party's new name.StringgetOldName()Get the party's previous name.PartygetParty()Get the party that is being renamed.org.bukkit.entity.PlayergetPlayer()Get the player who is renaming the party.booleanisCancelled()voidsetCancelled(boolean cancel)voidsetNewName(String newName)Set 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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel)
- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-
-