Compatibility
Minecraft: Java Edition
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
IPLock is a plugin designed for Minecraft servers running on Paper 1.21.1, aimed at enhancing player account security by binding accounts to a specific IP address. The plugin restricts account access to only the registered IP, helping to prevent unauthorized logins in case an account is compromised. All messages are fully customizable via a language file, making it adaptable for servers with diverse language preferences.
Plugin Functionality Automatic IP Binding: Upon a player's first login to the server, their UUID (unique identifier) and IP address are automatically stored in the ipdata.yml file. This ensures seamless IP registration without requiring any action from the player. IP Verification on Login: Each time a player logs in, the plugin compares their current IP address with the one stored in ipdata.yml. If the IP does not match, the login is denied, and the player receives a customizable error message (default: "§cYour IP does not match the registered IP for this account!"). This protects accounts from being accessed from unrecognized devices or networks. IP Unbinding Command: The plugin provides the /ipdel <player_name> command, accessible only to server operators. This command removes the IP binding for the specified player, allowing them to log in from a new IP on their next attempt. Command-related messages (e.g., success, error, or no binding found) are fully customizable. Customizable Messages: All plugin messages are stored in the lang.yml file, which is generated in the plugins/IPLock/ folder on first startup. Messages support Minecraft color codes (§) and placeholders (e.g., {player} for the player’s name, {error} for error details). Examples of customizable messages: Login error: "§cYour IP does not match the registered IP for this account!". Successful unbinding: "§aIP binding for {player} has been removed!". Command error: "§cUsage: /ipdel <player>". Administrators can edit lang.yml to modify text, language, or style without rebuilding the plugin. Data Storage: IP binding data is stored in ipdata.yml in the format UUID: IP. The file is automatically created and updated during player logins or when the /ipdel command is used. YAML usage ensures readability and reliable data persistence. Security and Performance: The plugin uses UUIDs instead of player names to avoid issues with name changes. IP checks are performed only during login, minimizing server load. The language file is loaded once at startup, ensuring no performance impact during operation. Usage For Players: No action is required — IP binding happens automatically on first login. If a player’s IP changes (e.g., due to a dynamic IP), they won’t be able to log in until an operator removes the old binding with /ipdel. For Administrators: Use /ipdel <player_name> to reset a player’s IP binding. Customize messages in lang.yml to match the server’s style (e.g., translate to another language or add a unique prefix). Check ipdata.yml to view current IP bindings (useful for debugging). Example Workflow Player Steve logs in for the first time from IP 192.168.1.1: The plugin saves to ipdata.yml: Steve_UUID: 192.168.1.1. Steve tries to log in from IP 192.168.1.2: The plugin denies the login and displays: "§cYour IP does not match the registered IP for this account!". An operator runs /ipdel Steve: The plugin removes the binding from ipdata.yml and sends: "§aIP binding for Steve has been removed!". Steve logs in again from the new IP, and the binding process repeats. Technical Details Compatibility: Paper 1.21.1. Dependencies: Maven, Paper API (included in pom.xml). Plugin Files: IPLock.java — main code (package org.example.iplock.iplock). plugin.yml — plugin configuration. ipdata.yml — IP binding storage. lang.yml — customizable messages. Build: Uses Maven (mvn clean install). Limitations: Only one IP per account is supported. Dynamic IPs require manual unbinding via /ipdel. No built-in support for reloading lang.yml without a server restart (can be added if needed). Summary IPLock is a straightforward yet effective tool for securing player accounts on Minecraft servers. It combines automatic IP binding, operator-controlled unbinding, and fully customizable messages, making it user-friendly for both players and administrators. The plugin is ideal for servers prioritizing account security, with its flexible message system allowing seamless integration into any server’s branding or language.