Package io.papermc.paper.event.player
Class PlayerNameEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerNameEntityEvent
- All Implemented Interfaces:
- Cancellable
Called when the player is attempting to rename a mob
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerNameEntityEvent(@NotNull Player player, @NotNull LivingEntity entity, @NotNull Component name, boolean persistent) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the entity involved in this event.static @NotNull HandlerListgetName()Gets the name to be given to the entity.booleanGets the cancellation state of this event.booleanGets whether this will set the mob to be persistent.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetEntity(@NotNull LivingEntity entity) Sets the entity involved in this event.voidSets the name to be given to the entity.voidsetPersistent(boolean persistent) Sets whether this will set the mob to be persistent.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerNameEntityEvent
 
- 
- 
Method Details- 
getNameGets the name to be given to the entity.- Returns:
- the name
 
- 
setNameSets the name to be given to the entity.- Parameters:
- name- the name
 
- 
getEntityGets the entity involved in this event.- Returns:
- the entity
 
- 
setEntitySets the entity involved in this event.- Parameters:
- entity- the entity
 
- 
isPersistentpublic boolean isPersistent()Gets whether this will set the mob to be persistent.- Returns:
- persistent
 
- 
setPersistentpublic void setPersistent(boolean persistent) Sets whether this will set the mob to be persistent.- Parameters:
- persistent- persistent
 
- 
isCancelledpublic boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-