PlayerIPAPI

Single / Personal servers
Simply drop the jar into your "plugins" folder. The auto-generated config should default to reasonable values for you, but you may modify it if you wish.

Multiple servers / Large networks
Drop the jar into the plugins folder and configure the "sql" section to use MySQL instead of SQLite. RabbitMQ and/or Redis are optional but highly recommended if you have multiple servers.

 

# This is the backing data for everything
# SQL is used as long-term storage and cross-network updates every few seconds
# Try to use an SQL source each server has access to, if possible
# You may choose to use MySQL or SQLite
# An SQL database of SOME description is required
sql:
# The type of database to use. May be either MySQL or SQLite
type: 'sqlite'
# Number of connections to use. Cannot be lower than 1
# Recommended 2+ for parallel queries for non-Redis servers
# If using Redis, set this to 2+ on hubs and 1 on servers
threads: 2
mysql:
address: '127.0.0.1'
port: 3306
user: ''
pass: ''
database: 'ipapi'
sqlite:
file: 'ipapi.db'

# Redis is used as a cache so lookups can be VERY fast
# This is used in both the expensive and non-expensive lookups
# It also provides the ability to push instant updates across the network
# Redis is entirely optional
redis:
enabled: false
address: ''
port: 6379
pass: ''

# Rabbit is used to push instant updates across the network
# If you don't have/use Redis you can use this to update faster than SQL
# Even if you use Redis, this can be used as a backup source
# Rabbit is entirely optional
rabbit:
enabled: false
address: ''
port: 5672
user: 'guest'
pass: 'guest'

# The amount of time before in-memory caches expire after non-use
# This prevents many sequential lookups from using more expensive networking constantly
cacheTime: '1minute'

# Config version, no touchy plz
version: 2.0
 

/ipapireload - Reloads the plugin configuration. This will disconnect and reconnect (if appropriate) any services configured in the config.yml file.

 

ipapi.admin - allows access to the ipapireload command

 

Please consider donating to support this free plugin!

According to the GDPRyou must specify that you are storing IP information to your players in a privacy policy when using this plugin (actually you need that if you're running a vanilla server without this plugin because of server logs). Depending on how data provided from this API is used, you may be required to manually remove some data from the databases.

Disclaimer: I am a plugin developer, not a lawyer. This information is provided as a "best guess" and is not legal advice.

 

Maven

<repository>
  <id>egg82-ninja</id>
<url>https://www.myget.org/F/egg82-java/maven/&lt;/url&gt; </repository>

Latest Repo

https://www.myget.org/feed/egg82-java/package/maven/ninja.egg82.plugins/PlayerIPAPI

API Usage

IPLookupAPI.getInstance();
...
ImmutableSet<IPData> getIps(UUID playerUuid);
ImmutableSet<UUIDData> getPlayers(String ip);
...
IPData ipData = ips.get(0);
ipData.getIp();
ipData.getCreated();
ipData.getUpdated();
...
UUIDData uuidData = uuids.get(0);
uuidData.getUuid();
uuidData.getCreated();
uuidData.getUpdated();

Example - list all players logged into all IPs that a specified player has ever logged in on

IPLookupAPI api = IPLookupAPI.getInstance();
ImmutableSet<IPData> ips = api.getIps(event.getPlayer().getUniqueId());
for (IPData ip : ips) {
   ImmutableSet<UUIDData> players = api.getPlayers(ip.getIp());
   for (UUIDData uuid : players) {
       // Do something with uuid.getUuid()
   }
}

Example - list all players logged into all IPs that a specified player has ever logged in on

IPLookupAPI api = IPLookupAPI.getInstance();
ImmutableSet<UUIDData> uuids = api.getPlayers(args[0]);
for (UUIDData uuid : uuids) {
   // Do something with uuid.getUuid()
}

Royalty-free icon by Vitaly Gorbachev

Download

File Name Status Version Downloads Date
PlayerIPAPI-1.2.12.jar R 1.12 +6 82 24/07/2018
PlayerIPAPI 1.20.2 Updating 1.20.2 Updating Updating
PlayerIPAPI 1.20.1 Updating 1.20.1 Updating Updating
PlayerIPAPI 1.20 Updating 1.20 Updating Updating
PlayerIPAPI 1.19.2 Updating 1.19.2 Updating Updating
PlayerIPAPI 1.19.1 Updating 1.19.1 Updating Updating
PlayerIPAPI 1.19 Updating 1.19 Updating Updating
PlayerIPAPI 1.18 Updating 1.18 Updating Updating
PlayerIPAPI 1.17.1 Updating 1.17.1 Updating Updating
PlayerIPAPI Forge Updating Forge Updating Updating
PlayerIPAPI Fabric Updating Fabric Updating Updating
PlayerIPAPI
PlayerIPAPI

Dear youtuber!
Have you a channel youtube and want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mods, addons, plugins, ... which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/9lifehack or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!

Related Posts

Smarty Productivity Happiness

9LifeHack.com - make things smart