NewPlayer Plugin Introduction
📌 Plugin Overview
NewPlayer is a lightweight Minecraft server player statistics plugin, specifically designed to track and record new player join events on the server.
- Author: 星雲Nebulae
- Studio: DreamArk
- Load Message:
✅ NewPlayer plugin loaded successfully! 🧑💻 publisher:星雲Nebulae 🏢 Studio:DreamArk
🌟 Features
- New Player Count Statistics: Records the cumulative total of new players on the server
- Daily New Player Statistics: Auto-resetting daily new player counter
- New Player List Records: Saves the names of all players who have joined the server for the first time
- Auto Daily Reset System: Automatically resets the daily counter every day
📊 Data Storage
The plugin uses JSON files to store all data, located at ./logs/newplayer.json, containing the following data fields:
{
"new_player_numbers": 0, // Cumulative total of new players
"EveryDay_new_player": 0, // Today's new player count
"new_player_list": [] // List of all new players
}
⚙️ How It Works
- When a player joins the server, the plugin checks if the player is a new player
- If it's a new player:
- Adds the player name to the new player list
- Increments the cumulative new player total by +1
- Increments today's new player count by +1
- Checks for date changes every hour; if a new day is detected, automatically resets the daily counter
💡 Use Cases
- Server administrators monitoring player growth
- Analyzing server popularity trends
- Tracking server promotion effectiveness
This plugin is perfect for small to medium-sized Minecraft servers that need simple player growth tracking.
NewPlayer Plugin API Documentation
Core APIs
getNewPlayerCount()
- Description: Get the cumulative total of new players on the server
- Returns:
Number- Total number of new players
getTodayNewPlayerCount()
- Description: Get the number of new players added today
- Returns:
Number- Today's new player count (auto-resets at midnight daily)
getNewPlayerList()
- Description: Get the list of all players
- Returns:
Array<String>- Array containing all player names
isNewPlayer(playerName)
- Description: Check if a specified player exists
- Parameters:
playerName:String- The player name to check
- Returns:
Boolean
addNewPlayer(playerName)
- Description: Manually add a new player record
- Parameters:
playerName:String- The player name to add
- Returns:
Boolean- Returnstrueif successfully added,falseif player already exists
resetTodayCount()
- Description: Reset today's new player counter
- Note: Usually does not need to be called manually, as the system automatically resets daily
DreamArk Studio