Polda18 / BetterWhitelist

A Minecraft Spigot plugin for better whitelist
GNU General Public License v3.0
6 stars 0 forks source link
minecraft plugin spigot spigot-plugin

BetterWhitelist

A Minecraft Spigot plugin for better whitelist

GitHub release (latest by date) GitHub release (latest by date including pre-releases) GitHub all releases GitHub GitHub issues GitHub Repo stars
Spiget Version Spiget Downloads Spiget Rating Spiget Download Size

Introduction

This plugin is fairly simple. It implements its own whitelist as opposed to vanilla one. The usage of this plugin is aimed for offline mode servers that for some reason want to use whitelist feature to allow only certain players to be able to join the server. Plugin is released, you can find it on SpigotMC.org as well. Prereleases are found only here on GitHub. If you find a bug, fill in bug report in GitHub issues page.

How it works and issue with vanilla whitelist

Pretty much how you would expect the whitelist to work. It checks if the player is on the whitelist and if not, it kicks them out of the server with appropriate message. Managing the whitelist is you add a player to the whitelist and turn whitelist on. That player is then allowed to play on the server. And that is how the vanilla whitelist should work. Where is the problem? In offline mode. Server in offline mode still treats whitelist in the same way. When whitelist is off, anybody can join the server and adding an online player to a disabled whitelist takes their IGN and their current UUID and adds them to the whitelist. That's fully expected. But when the player is NOT online, then whitelist checks Mojang database to find that player in list of registered Minecraft players. If that player cannot be found, whitelist refuses to add that player to whitelist. If that player IS found in Mojang's database, then their online UUID is pulled.

That is no issue on online mode servers as this is fully expected and there's no need to check if the player online does indeed exist or not, because otherwise server wouldn't allow that player to join in the first place. But offline mode server allows anybody join, regardless of paid account or not, which is an issue because not only whitelist adds anybody online without checking an existing profile, existing players cannot join the server because their UUID reported to server mismatches the one on whitelist. That is because whitelist doesn't actually check against player names, but rather checks against UUID of the player joining. Since UUID of players added while being offline is pulled from Mojang database, the UUID the server generates for them when joined mismatches and server refuses them to join. This is what this plugin is fixing. It allows offline mode servers manage their whitelist while whitelist is on and new players added to that whitelist are offline (in other words have never been on the server yet).

How is it achieved? First of all, it doesn't use vanilla whitelist, it uses its own whitelist file, native to Spigot plugin configuration format. It allows the plugin to easily manage the whitelist without relying on JSON translation from the vanilla whitelist (apart from importing). This allows the plugin to manage pair of UUIDs for each player. An online UUID, which matches the one on Mojang database, and offline UUID, which is generated from the player's IGN. Plugin then checks the player's UUID against the correct UUID according to whether the server runs in online or offline mode.

Command

The whitelist command for this plugin is /whitelist, or /wl, it replaces the vanilla whitelist. You can still access the vanilla whitelist using /minecraft:whitelist command if you need to use it. These are the subcommands:

Permissions

If you're using permissions plugin, this is a list of available permissions you'll need to use. All permissions default to server operators (op).

It is recommended to assign add, remove and list permissions simultaneously for player that is in charge of managing whitelist, but cannot be trusted with full access to all the commands. Each individual permission only grants an access to the single command it is assigned to. If you want some player to be able just list the whitelisted players, assign only list permission to them.

Installation and configuration

If you want to use this plugin with your server, simply add it to the plugins directory and restart your server for the plugin to be enabled. It will generate few files in its own BetterWhitelist subdirectory, namely config.yml, whitelist.yml and directory languages with few other .yml files in it. This is the structure:

If you had your players in vanilla whitelist previously, you can import them using this command: /wl import. No additional parameters are required to run this command, no additional parameters are also taken into account. Running this command silently adds all players found in vanilla whitelist to whitelist of this plugin. You can verify content by executing /wl list command. To add a new player to the whitelist simply run /wl add <playername> where <playername> refers to the player IGN, and to remove a player from the whitelist run /wl remove <playername> where <playername> again refers to the player IGN.

Disclaimer

This plugin isn't intended to support criminal behavior. It is intended to aid servers running in offline mode from legitimate reasons in managing their whitelist.

Reasons to run a server in offline mode can be testing, running server in a closed environment without an Internet access (home LAN server), running server for closed range of friends who want to play together. In some countries, owning a copy of the game may be prohibited, which leaves residents of these countries with no option but to play without paying. This massively reduces their choices of servers down to those that run in an offline insecure mode. In some countries, children may or may not be allowed to spend money for games. In Czech Republic for example, most children who play Minecraft do not legally own a copy of the game and play on a cracked version. They eighter cannot afford the game, cannot spend money on games or their parents refuse to buy them games. Nobody has rights to decide for parents, but it's also in nobody's rights to refuse somebody to play games. I'm not sceptical towards children playing without paid Minecraft account, they simply might have no other choice. I am however sceptical towards adults playing Minecraft without paying unless they come from a country with restricted access or want to try the game out before buying. I am in no position to require payment though, that's fully in Mojang's competence.

Recommendations

I'd suggest you to disable the vanilla whitelist in case you want to give this plugin a shot. Otherwise your players might not be able to join. I also recommend you to use this plugin in conjunction with an auth plugin to ensure your players will have their server accounts at least somehow protected, and optionally also use a skin restorer plugin if your auth plugin doesn't have an option for premium access (original game buyers).