Package dev.pulsemc.pulse.api.network
Interface PulsePlayer
public interface PulsePlayer
Represents a specialized wrapper for a
Player within the Pulse network engine.
This interface provides a gateway to advanced network-level controls and virtual world management (phantom blocks/entities) that are not available in the standard Bukkit or Paper APIs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable PulsePlayerObtains aPulsePlayerinstance for a standard Bukkit player.Accesses the player's outbound network buffer.Gets the original Bukkit player instance associated with this PulsePlayer.Accesses the manager for persistent virtual (client-side only) blocks.Accesses the manager for Virtual Entities (AI-driven per-player mobs).
-
Method Details
-
from
Obtains aPulsePlayerinstance for a standard Bukkit player.This is the primary way to interact with Pulse features for a specific player.
- Parameters:
player- the Bukkit player instance to wrap- Returns:
- a PulsePlayer instance, or null if the player's connection is not managed by Pulse
-
getBuffer
Accesses the player's outbound network buffer. Used to manage batching, low-latency modes, and manual flushing.- Returns:
- the
NetworkBufferfor this player
-
getVirtualBlockManager
Accesses the manager for persistent virtual (client-side only) blocks. Used to create blocks that stay visible even after chunk updates.- Returns:
- the
VirtualBlockManagerfor this player
-
getVirtualEntityManager
Accesses the manager for Virtual Entities (AI-driven per-player mobs).Allows spawning entities that run real server logic/AI but are only sent to this specific player.
- Returns:
- the
VirtualEntityManager
-
getBukkitPlayer
Gets the original Bukkit player instance associated with this PulsePlayer.- Returns:
- the underlying
Player
-