public class PlayerNameEntityEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor and Description |
---|
PlayerNameEntityEvent(@NotNull Player player,
@NotNull LivingEntity entity,
@NotNull net.kyori.adventure.text.Component name,
boolean persistent) |
Modifier and Type | Method and Description |
---|---|
@NotNull LivingEntity |
getEntity()
Gets the entity involved in this event.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@Nullable net.kyori.adventure.text.Component |
getName()
Gets the name to be given to the entity.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
boolean |
isPersistent()
Gets whether this will set the mob to be persistent.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setEntity(@NotNull LivingEntity entity)
Sets the entity involved in this event.
|
void |
setName(@Nullable net.kyori.adventure.text.Component name)
Sets the name to be given to the entity.
|
void |
setPersistent(boolean persistent)
Sets whether this will set the mob to be persistent.
|
getPlayer
callEvent, getEventName, isAsynchronous
@Nullable public @Nullable net.kyori.adventure.text.Component getName()
public void setName(@Nullable @Nullable net.kyori.adventure.text.Component name)
name
- the name@NotNull public @NotNull LivingEntity getEntity()
public void setEntity(@NotNull @NotNull LivingEntity entity)
entity
- the entitypublic boolean isPersistent()
public void setPersistent(boolean persistent)
persistent
- persistentpublic boolean isCancelled()
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.