Class BukkitPartiesPartyPreRenameEvent
java.lang.Object
org.bukkit.event.Event
com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
com.alessiodp.parties.api.events.bukkit.party.BukkitPartiesPartyPreRenameEvent
- All Implemented Interfaces:
Cancellable,IPartyPreRenameEvent,PartiesEvent,org.bukkit.event.Cancellable
public class BukkitPartiesPartyPreRenameEvent
extends BukkitPartiesEvent
implements IPartyPreRenameEvent, org.bukkit.event.Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionBukkitPartiesPartyPreRenameEvent(Party party, String oldName, String newName, PartyPlayer player, boolean isAdmin) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringGet the new party name@Nullable StringGet the old party name@NotNull PartygetParty()Get the party that is getting renamed@Nullable PartyPlayerGet the player who performed the commandbooleanisAdmin()Is it an admin renaming?booleanIs the event cancelled?voidsetCancelled(boolean cancel) Set the event as cancelledvoidsetNewPartyName(String name) Set the new name of the partyMethods inherited from class com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
getApi, getHandlerList, getHandlers, setApiMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alessiodp.parties.api.events.PartiesEvent
getApi, setApi
-
Constructor Details
-
BukkitPartiesPartyPreRenameEvent
public BukkitPartiesPartyPreRenameEvent(Party party, String oldName, String newName, PartyPlayer player, boolean isAdmin)
-
-
Method Details
-
getParty
Description copied from interface:IPartyPreRenameEventGet the party that is getting renamed- Specified by:
getPartyin interfaceIPartyPreRenameEvent- Returns:
- the
Party
-
getOldPartyName
Description copied from interface:IPartyPreRenameEventGet the old party name- Specified by:
getOldPartyNamein interfaceIPartyPreRenameEvent- Returns:
- the old name of the party
-
getNewPartyName
Description copied from interface:IPartyPreRenameEventGet the new party name- Specified by:
getNewPartyNamein interfaceIPartyPreRenameEvent- Returns:
- the new name of the party
-
setNewPartyName
Description copied from interface:IPartyPreRenameEventSet the new name of the party- Specified by:
setNewPartyNamein interfaceIPartyPreRenameEvent- Parameters:
name- the party name to set
-
getPartyPlayer
Description copied from interface:IPartyPreRenameEventGet the player who performed the command- Specified by:
getPartyPlayerin interfaceIPartyPreRenameEvent- Returns:
- the
PartyPlayeror null if not executed by a player
-
isAdmin
public boolean isAdmin()Description copied from interface:IPartyPreRenameEventIs it an admin renaming?- Specified by:
isAdminin interfaceIPartyPreRenameEvent- Returns:
trueif the rename has been performed by an admin
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableIs the event cancelled?- Specified by:
isCancelledin interfaceCancellable- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
trueif the event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableSet the event as cancelled- Specified by:
setCancelledin interfaceCancellable- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancel-trueto cancel
-