Class PlayerConnectionEvent

java.lang.Object
net.vitacraft.serverlibraries.api.event.events.networking.PlayerConnectionEvent
All Implemented Interfaces:
Event

public class PlayerConnectionEvent extends Object implements Event
Event that is fired when a player connects to the server.
  • Constructor Details

    • PlayerConnectionEvent

      public PlayerConnectionEvent(net.minecraft.server.network.ServerPlayNetworkHandler networkHandler, net.minecraft.server.MinecraftServer server)
  • Method Details

    • getNetworkHandler

      public net.minecraft.server.network.ServerPlayNetworkHandler getNetworkHandler()
      Returns:
      the network handler that is being initialized
    • getServer

      public net.minecraft.server.MinecraftServer getServer()
      Returns:
      the server that is handling the connection
    • getPlayer

      public net.minecraft.server.network.ServerPlayerEntity getPlayer()
      Returns:
      the player that is connecting
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Event
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Event