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.Cancellable
Handles 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.HandlerList
getHandlerList()
@NotNull org.bukkit.event.HandlerList
getHandlers()
String
getNewName()
Get the party's new name.String
getOldName()
Get the party's previous name.Party
getParty()
Get the party that is being renamed.org.bukkit.entity.Player
getPlayer()
Get the player who is renaming the party.boolean
isCancelled()
void
setCancelled(boolean cancel)
void
setNewName(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:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel)
- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-
-