Class PlayerConnectionEvent
java.lang.Object
net.vitacraft.serverlibraries.api.event.events.networking.PlayerConnectionEvent
- All Implemented Interfaces:
Event
Event that is fired when a player connects to the server.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerConnectionEvent
(net.minecraft.server.network.ServerPlayNetworkHandler networkHandler, net.minecraft.server.MinecraftServer server) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.network.ServerPlayNetworkHandler
net.minecraft.server.network.ServerPlayerEntity
net.minecraft.server.MinecraftServer
boolean
void
setCancelled
(boolean cancelled)
-
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 interfaceEvent
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceEvent
-