-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
This document provides a high-level overview of the PixelRTPPool codebase. It is primarily intended for developers and server owners who want to understand how the plugin operates under the hood.
The plugin is structured around distinct, single-responsibility Managers controlled by a central RTPManager facade.
Handles all direct interactions with config.yml. It parses strings, instantiates RTPRegion immutable data objects, and loads Adventure API configurations.
Acts as the central traffic controller. When the WorldGuard RTPRegionHandler detects a player entry, it passes the data to the RTPManager, which delegates the logic downstream.
Stores and tracks active BukkitRunnable teleport tasks using a ConcurrentHashMap keyed by UUID. Responsible for cancelling tasks safely if conditions change (e.g., the player leaves the region).
Maintains a HashMap of UUID -> Long (Epoch timestamps). Handles checking if a player is permitted to start a new countdown, and routinely purges expired entries via the cleanup() method.
To ensure PixelRTPPool remains infinitely extensible without requiring massive refactors, it utilizes Provider Interfaces.
Dictates how the teleport logic is actually executed.
-
PlayerCommandTeleportProvider: Forces the player to dispatch the command. -
ConsoleCommandTeleportProvider: Dispatches the command as console. -
Future:
BetterRTPProvidercould implement this interface to bypass commands and interact with the BetterRTP Java API directly.
Dictates how combat states are verified.
-
NoCombatProvider: A default implementation that always returnsfalse(player is never in combat). -
Future: A
CombatLogXProvidercould implement this interface to check a player's PvP tag status before allowing theCountdownManagerto start.
sequenceDiagram
participant Player
participant WG SessionHandler
participant RTPManager
participant CountdownManager
participant TeleportProvider
Player->>WG SessionHandler: Enters RTP Region
WG SessionHandler->>RTPManager: trigger pool entry
RTPManager->>RTPManager: Check CooldownManager
RTPManager->>RTPManager: Check CombatProvider
RTPManager->>CountdownManager: Schedule BukkitRunnable
loop Every 1 Second
CountdownManager->>Player: Send Title, ActionBar, Sound
end
CountdownManager->>TeleportProvider: Countdown reaches 0
TeleportProvider->>Player: Execute teleport (Player/Console)
Lightweight β’ High Performance β’ Production Ready
Version: 1.0.0 β’ Minecraft: Paper 1.21.11 β’ Java: 21
Made with β€οΈ by PG
Β© 2026 Pixel Productions
π Home β’ βοΈ Configuration β’ π Commands β’ π‘οΈ Permissions β’ β FAQ β’ π οΈ Developer Guide
Licensed under the MIT License
Welcome to the official documentation for PixelRTPPool.
- GitHub Repository: https://github.com/PGGAMER9911/PixelRtpPool
- Modrinth: (Update after release)
- License: MIT