Class BungeePartiesPartyPreRenameEvent
- java.lang.Object
-
- net.md_5.bungee.api.plugin.Event
-
- com.alessiodp.parties.api.events.bungee.BungeePartiesEvent
-
- com.alessiodp.parties.api.events.bungee.party.BungeePartiesPartyPreRenameEvent
-
- All Implemented Interfaces:
Cancellable,IPartyPreRenameEvent,PartiesEvent
public class BungeePartiesPartyPreRenameEvent extends BungeePartiesEvent implements IPartyPreRenameEvent
-
-
Constructor Summary
Constructors Constructor Description BungeePartiesPartyPreRenameEvent(Party party, String oldName, String newName, PartyPlayer player, boolean isAdmin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable StringgetNewPartyName()Get the new party name@Nullable StringgetOldPartyName()Get the old party name@NotNull PartygetParty()Get the party that is getting renamed@Nullable PartyPlayergetPartyPlayer()Get the player who performed the commandbooleanisAdmin()Is it an admin renaming?booleanisCancelled()Is the event cancelled?voidsetCancelled(boolean cancel)Set the event as cancelledvoidsetNewPartyName(String name)Set the new name of the party-
Methods inherited from class com.alessiodp.parties.api.events.bungee.BungeePartiesEvent
getApi, setApi
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alessiodp.parties.api.events.PartiesEvent
getApi, setApi
-
-
-
-
Constructor Detail
-
BungeePartiesPartyPreRenameEvent
public BungeePartiesPartyPreRenameEvent(Party party, String oldName, String newName, PartyPlayer player, boolean isAdmin)
-
-
Method Detail
-
getParty
@NotNull public @NotNull Party getParty()
Description copied from interface:IPartyPreRenameEventGet the party that is getting renamed- Specified by:
getPartyin interfaceIPartyPreRenameEvent- Returns:
- the
Party
-
getOldPartyName
@Nullable public @Nullable String getOldPartyName()
Description copied from interface:IPartyPreRenameEventGet the old party name- Specified by:
getOldPartyNamein interfaceIPartyPreRenameEvent- Returns:
- the old name of the party
-
getNewPartyName
@Nullable public @Nullable String getNewPartyName()
Description copied from interface:IPartyPreRenameEventGet the new party name- Specified by:
getNewPartyNamein interfaceIPartyPreRenameEvent- Returns:
- the new name of the party
-
setNewPartyName
public void setNewPartyName(String name)
Description copied from interface:IPartyPreRenameEventSet the new name of the party- Specified by:
setNewPartyNamein interfaceIPartyPreRenameEvent- Parameters:
name- the party name to set
-
getPartyPlayer
@Nullable public @Nullable PartyPlayer 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
-
-