public class BungeePartiesPartyPreRenameEvent extends BungeePartiesEvent implements IPartyPreRenameEvent
Constructor and Description |
---|
BungeePartiesPartyPreRenameEvent(Party party,
String oldName,
String newName,
PartyPlayer player,
boolean isAdmin) |
Modifier and Type | Method and Description |
---|---|
@Nullable String |
getNewPartyName()
Get the new party name
|
@Nullable String |
getOldPartyName()
Get the old party name
|
@NotNull Party |
getParty()
Get the party that is getting renamed
|
@Nullable PartyPlayer |
getPartyPlayer()
Get the player who performed the command
|
boolean |
isAdmin()
Is it an admin renaming?
|
boolean |
isCancelled()
Is the event cancelled?
|
void |
setCancelled(boolean cancel)
Set the event as cancelled
|
void |
setNewPartyName(String name)
Set the new name of the party
|
getApi, setApi
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApi, setApi
public BungeePartiesPartyPreRenameEvent(Party party, String oldName, String newName, PartyPlayer player, boolean isAdmin)
@NotNull public @NotNull Party getParty()
IPartyPreRenameEvent
getParty
in interface IPartyPreRenameEvent
Party
@Nullable public @Nullable String getOldPartyName()
IPartyPreRenameEvent
getOldPartyName
in interface IPartyPreRenameEvent
@Nullable public @Nullable String getNewPartyName()
IPartyPreRenameEvent
getNewPartyName
in interface IPartyPreRenameEvent
public void setNewPartyName(String name)
IPartyPreRenameEvent
setNewPartyName
in interface IPartyPreRenameEvent
name
- the party name to set@Nullable public @Nullable PartyPlayer getPartyPlayer()
IPartyPreRenameEvent
getPartyPlayer
in interface IPartyPreRenameEvent
PartyPlayer
or null if not executed by a playerpublic boolean isAdmin()
IPartyPreRenameEvent
isAdmin
in interface IPartyPreRenameEvent
true
if the rename has been performed by an adminpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
true
if the event is cancelledpublic void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true
to cancelCopyright © 2023. All rights reserved.