Class VelocityPartiesPartyPreRenameEvent
java.lang.Object
com.alessiodp.parties.api.events.velocity.VelocityPartiesEvent
com.alessiodp.parties.api.events.velocity.party.VelocityPartiesPartyPreRenameEvent
- All Implemented Interfaces:
Cancellable,IPartyPreRenameEvent,PartiesEvent
public class VelocityPartiesPartyPreRenameEvent
extends VelocityPartiesEvent
implements IPartyPreRenameEvent
-
Constructor Summary
ConstructorsConstructorDescriptionVelocityPartiesPartyPreRenameEvent(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.velocity.VelocityPartiesEvent
getApi, setApiMethods 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
-
VelocityPartiesPartyPreRenameEvent
public VelocityPartiesPartyPreRenameEvent(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- 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- Parameters:
cancel-trueto cancel
-