Class SpectateEvent.StartSpectate

java.lang.Object
net.neoforged.bus.api.Event
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
SpectateEvent

public static class SpectateEvent.StartSpectate extends SpectateEvent implements net.neoforged.bus.api.ICancellableEvent
Event representing when a player attempts to spectate a battle.
Cancelling this event will prevent them from spectating
  • Constructor Details

    • StartSpectate

      public StartSpectate(net.minecraft.server.level.ServerPlayer spectator, BattleController battleController, net.minecraft.world.entity.Entity target)
  • Method Details

    • getTarget

      public net.minecraft.world.entity.Entity getTarget()
    • setTarget

      public void setTarget(net.minecraft.world.entity.Entity target)