Class PlayerClonedKubeEvent

java.lang.Object
dev.latvian.mods.kubejs.player.PlayerClonedKubeEvent
All Implemented Interfaces:
KubeEntityEvent, KubeLivingEntityEvent, KubeEvent, KubeLevelEvent, KubePlayerEvent

@Info("Invoked when a player respawns.\n\nThe reason of respawn can be either death or returning from the end.\n") public class PlayerClonedKubeEvent extends Object implements KubePlayerEvent
  • Constructor Details

    • PlayerClonedKubeEvent

      public PlayerClonedKubeEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerPlayer oldPlayer, boolean keepData)
  • Method Details

    • getEntity

      @Info("Gets the player that respawned.") public net.minecraft.server.level.ServerPlayer getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
      Specified by:
      getEntity in interface KubeLivingEntityEvent
      Specified by:
      getEntity in interface KubePlayerEvent
    • getOldPlayer

      @Info("Gets the player that was before respawn. Note that this entity is already removed from the world.") public net.minecraft.server.level.ServerPlayer getOldPlayer()
    • getKeepData

      @Info("Gets whether the player\'s data was kept, e.g. when returning from the end.") public boolean getKeepData()