Class SetNicknameEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.pokemon.SetNicknameEvent

public class SetNicknameEvent extends net.minecraftforge.eventbus.api.Event
Event fired when a Pokémon is being nicknamed by a player.

Note: nickname could be null or an empty string if they are removing a nickname.

Cancelling this event will prevent the nickname from being applied.

Since:
November 3, 2018
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The new nickname.
    final net.minecraft.server.level.ServerPlayer
    The player doing the renaming.
    final Pokemon
    The Pokémon being renamed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SetNicknameEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, String nickname)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player doing the renaming.
    • pokemon

      public final Pokemon pokemon
      The Pokémon being renamed.
    • nickname

      public String nickname
      The new nickname. Null or an empty string represents no nickname.
  • Constructor Details

    • SetNicknameEvent

      public SetNicknameEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, String nickname)