Skip to content

IP lookup ​

Module info
Configurationip-lookup in config.yml
ManagerIPLookupManager
Support1.8+
Free versionâś”
Proxy-configurableâś”

ChatPlugin includes an IP lookup module which is based on MaxMind's GeoLite2 services.

If you are using a multiple server setup (proxy) you have to configure the feature only on the proxy, however you have to - just - enable it on every server; requests from instances under the network will be handled by the proxy.

Setup ​

Before you start, you need to follow these steps:

  1. sign up for a free account from MaxMind's website and fill the form with your info and data, then agree to their EULA
  2. confirm your account by clicking the link they sent to your email address, set up a password and login
  3. find "Manage license keys" in the sidebar and click on "Generate new license key"
  4. click "No" in the dialogue which asks about GeoIP Update compatibility and click "Confirm"
  5. copy the new key in a safe place as you will not be able to view it in full again

You will need to insert both the user ID and the key in the configuration shown below.

The following snippet of code represents and explains the IP lookup's configuration.

yaml
# ...languages' settings...
ip-lookup: 
  enabled: false # whether to enable or disable this module
  load-on-join: false # whether to lookup IPs of joined players
  method: REMOTE # read below
  database-folder: '{0}/files' # where to store the database; used by LOCAL method
  cache-time: 5m # read below
  maxmind-account:
    user-id: '' # MaxMind account's user ID
    key: '' # MaxMind account's key
  max-ips-stored: 10 # IPs stored per player; max = 15
# ...GUIs' settings...

NOTE

This module is disabled by default.

The plugin currently supports 2 methods specifiable at method:

  • LOCAL: makes local requests handled by the local database; available on premium version only
  • REMOTE: makes remote requests to the MaxMind's website
FeatureLOCALREMOTE
Average response time0 ms300-400 ms
Max requests per dayunlimited1000
Max requests per second~5002/3
Free version❌✔
Anti ban evading system✔❌
Memory usagevery lowN/A
Disk usage~70 MB0 MB
Data age[1]dependsreal time

[1]: Data is gathered in real time when using the remote method, while local databases need to be updated to ensure data is always up to date: they are updated automatically once a month as soon as the server is restarted.

As you can see a local setup works better in most cases, but if you don't need extremely fast response times it's okay to use the remote one. Just make sure your server doesn't exceed 1000 requests per day. If you want more than 1K requests per day with the remote mode you can also consider upgrading your MaxMind account to a paid plan.

Load on join option ​

This module can be configured at load-on-join to lookup a player's IP when they join the server. Enabling this will grant zero latency when you open the Playerinfo GUI and when you use the /iplookup command. Note that this option is different for each server and not present on the proxy.

WARNING

This option will make a request every time a player joins your server. Make sure not to exceed 1000 requests per day if you are using the (free) remote lookup method.

Caching ​

Every IP lookup is cached for a short time to improve performance. You can change the duration at cache-time. Refer to the Getting started/Syntax/Timestamps page to find out the timestamp specifiable. Cache cannot be disabled entirely on a multi instance setup, but you can set it to very low values (like 5 seconds), although it is not recommended; values from 5 to 15 minutes should be perfect. Note that this option is different for each server. Usually values on server instances should be higher than the one set in the proxy. Online players' IP lookups are kept loaded until they leave the server.

Placeholders ​

Every player's IP lookup request has a set of placeholders available which are described here.

ChatPlugin - A complete yet lightweight plugin which handles just too many features!
© 2024  Remigio07
This wiki is currently updated to version 1.9.4.
Please report any errors, mistakes and misspellings as described at Home/Reporting issues.

Remigio07.me - built w/ VitePress