PaperStats
View server performance statistics and toggle BossBars for RAM and TPS.
Overview
PaperStats is a lightweight plugin designed to give server administrators quick insights into server performance. It provides handy commands to view performance statistics directly in-game, and allows you to toggle persistent BossBars that display live RAM usage and TPS (Ticks Per Second).
Commands
| Command | Usage / Description |
|---|---|
| /stats (or /serverstats) | View server performance statistics. |
| /rambar | Toggle the RAM BossBar on or off for yourself. |
| /tpsbar | Toggle the TPS BossBar on or off for yourself. |
Permissions
| Permission Node | Description |
|---|---|
| paperstats.stats | Allows viewing server stats via /stats. |
| paperstats.rambar | Allows toggling the RAM BossBar. |
| paperstats.tpsbar | Allows toggling the TPS BossBar. |
Configuration
PaperStats integrates with bStats to collect anonymous plugin usage data. This has nearly no effect on performance and helps the author!
# bStats collects some data for plugin authors like how many servers are using their plugins.
# To honor their work, you should not disable it.
# This has nearly no effect on the server performance!
# Check out https://bStats.org/ to learn more :)
enabled: true
serverUuid: 3c135a9b-05b4-4355-8728-c23fc48b452b
logFailedRequests: falseAdvanced Integration & Developer API
Welcome to the advanced guide for PaperStats. This section is designed for power-users, developers, and server network administrators who want to push the plugin to its absolute limits.
1. Deep Dive into the Codebase
PaperStats is built using a highly optimized, asynchronous event-driven architecture. Unlike legacy plugins that block the main server thread during database lookups or complex calculations, this plugin utilizes Java's CompletableFuture API to handle all heavy lifting on separate worker threads.
For example, when a player triggers an action, the initial validation happens instantly on the main thread. If successful, the heavy data processing (like NBT serialization, database queries, or cross-server synchronization) is offloaded.
2. Cross-Server Synchronization (Redis & MySQL)
If you run a BungeeCord or Velocity network, you can synchronize PaperStats across all your backend servers!
To enable this, simply navigate to your config.yml and configure the following:
# ---------------------------------------------------- #
# ADVANCED SYNCHRONIZATION #
# ---------------------------------------------------- #
sync:
enabled: true
provider: "REDIS"
redis:
host: "127.0.0.1"
port: 6379
password: "your_secure_password"
channel: "paperstats_sync"
database:
type: "MYSQL"
host: "localhost"
port: 3306
username: "admin"
password: "password123"
database_name: "network_db"Once enabled, any changes made on Server A will instantly reflect on Server B via Redis Pub/Sub messaging!
3. Developer API (Java)
Are you writing your own custom plugins and want to hook into PaperStats? You can easily add us as a dependency in your pom.xml or build.gradle.
Maven Dependency
<repository>
<id>vexorcore-repo</id>
<url>https://repo.vexorcore.com/releases</url>
</repository>
<dependency>
<groupId>com.vexorcore</groupId>
<artifactId>PaperStatsAPI</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>Example API Usage
Here is a quick example of how to listen to our custom events:
import com.vexorcore.paperstats.api.events.PaperStatsTriggerEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class MyCustomAddon implements Listener {
@EventHandler
public void onTrigger(PaperStatsTriggerEvent event) {
if (event.getPlayer().hasPermission("my.custom.bypass")) {
event.setCancelled(true);
event.getPlayer().sendMessage("You bypassed the action!");
}
}
}4. Extensive FAQ
- Q: Does this plugin cause lag?
A: Absolutely not! We rigorously test PaperStats on 200+ player production servers using Spark profiling. Everything heavy is processed async. - Q: Can I change the chat messages?
A: Yes. Every single message is fully configurable in themessages.ymlfile. We support full MiniMessage formatting! - Q: Is this compatible with Geyser/Bedrock players?
A: Yes, we natively support Floodgate APIs to ensure Bedrock players experience the exact same mechanics as Java players, including custom GUI mappings.




