Understanding the OnlineUsers Plugin for Minecraft Servers
Keeping track of who is online and how long they have spent on your Minecraft server can be invaluable for community management, rewards systems, or simply satisfying your curiosity. The OnlineUsers plugin, originally created by croemmich and now maintained by Brettflan, is a lightweight yet powerful tool that logs every player login and logout. Whether you prefer a simple flatfile or a robust MySQL database, this plugin gives you the data you need without bogging down your server.
What Makes OnlineUsers Stand Out
Unlike many other tracking plugins, OnlineUsers focuses on doing one thing exceptionally well: maintaining a reliable record of logged-in users. It does not add complex commands or in-game features; instead, it silently records data in the background. The plugin supports both flatfile and MySQL storage, making it adaptable to any server setup. For server owners who run multiple worlds or need to integrate player data with external websites, the MySQL option is a game-changer.
Key Features at a Glance
- Dual storage modes: flatfile for simplicity, MySQL for scalability and web integration.
- Automatic table creation in MySQL – no manual schema setup required.
- Tracks total online time per player with the
time_totalcolumn (MySQL only). - Player UUID support ensures accurate tracking even after name changes.
- Async task threading in recent versions prevents main server thread lag.
- Customizable flatfile output using templates and data files.
Setting Up OnlineUsers
Installation is straightforward. After placing the plugin JAR into your server's plugins folder, you will find a configuration file named online-users.properties inside the plugins/OnlineUsers directory. This file lets you choose between flatfile and MySQL storage. If you opt for MySQL, you must also have the MySQL JDBC driver placed in your server root folder, named exactly mysql-connector-java-bin.jar. You can obtain the driver from the official MySQL website – just search for "MySQL Connector/J". No external links are needed here; a quick search will lead you to the correct download.
For those who prefer a more streamlined approach to managing server-side tools, you might find that this mod can be easily installed via the foxygame.net launcher — a convenient, flexible, and modern Minecraft launcher where you can download mods right from the menu. This can save time if you are juggling multiple plugins and want a centralized management interface.
Configuration Options Explained
The online-users.properties file is well-documented. Here are the essential settings:
- destination: Set to
mysqlorflatfile. - flatfile: Path to the output file (e.g.,
online_users.txt). - flatfile-template: Template file for formatting the flatfile output.
- flatfile-data: Data file that populates the template.
- remove-offline-users: When
true, users are removed from the list upon logging off. Set tofalseto keep a permanent log. - db: MySQL connection string (e.g.,
jdbc:mysql://localhost:3306/minecraft). - user and pass: Database credentials.
- table: Name of the MySQL table (created automatically).
If you are using an older version, note that the time_total column is only updated when a player disconnects. To get a live calculation of current session time, you can use a custom SQL query. For versions 1.6.2 and above, the column is stored as an integer (seconds), so the query would look like this:
SELECT *, IF(online=1, time_total + TIMESTAMPDIFF(SECOND, time, NOW()), time_total) AS current_time_total FROM users_online
Understanding the Database Schema
When using MySQL, the plugin creates a table with columns for player name, UUID, login time, online status, and total time. Starting with version 1.8.0, the player UUID is the unique key, meaning that even if a player changes their name, their accumulated playtime remains correctly attributed. The online column is a boolean that indicates whether the player is currently connected, making it easy to build a live online list for your website.
Changelog Highlights
The plugin has evolved significantly under Brettflan’s maintenance. Here are some notable milestones:
- 1.8.0 – UUID tracking introduced, future-proofing against name changes.
- 1.7.0 – Major efficiency boost via async task thread, eliminating lag on player join/quit.
- 1.6.2 – Breaking change:
time_totalcolumn type switched from TIME to INT for better precision. - 1.6 – Added
time_totalcolumn for MySQL users to track cumulative playtime. - 1.5.5 – Fixed flatfile template placeholders
{longtime}and{shorttime}.
Each update has focused on stability and performance, ensuring that even large servers can use the plugin without impact.
Practical Uses for the Data
The recorded data opens up many possibilities. You can display a dynamic player list on your website, create leaderboards based on total playtime, or integrate the information into a donor perks system. The flatfile output can be parsed by simple PHP scripts, while the MySQL table allows complex queries and real-time dashboards. Because the plugin handles UUIDs, you can reliably track players across multiple accounts and name changes, which is essential for long-term communities.
Final Thoughts
OnlineUsers may be a niche plugin, but it fills a critical gap for server administrators who need accurate, low-overhead player tracking. Its dual storage options, async processing, and UUID support make it a modern solution that respects both server performance and data integrity. Whether you are running a small private server or a large network, this plugin provides the foundation for understanding your player base. Give it a try, and you will wonder how you ever managed without it.