Geoip API
Please dont report issues in the review, and dont report issues if you are not sure its a problem of the api.
What does it?
With this api you can get the location of an ip/player, it uses GeoLite data created by MaxMind http://www.maxmind.com. The api will automatically download the database from the maxmind mirror!
LocalIP
Its not working with an localip like 127.0.0.1 this is because it cant get your external ip.
Its returns null?
If the api return null this is most of the times because your ip is not in the geoip database. Thats why you always need to check if the output is not null!
How to use?
//Get the ip from a player
InetAddress ip = player.getAddress().getAddress();
//Check if the ip is not null
if(ip == null){
return;
}
//Check if the ip is not local
if(ip.isAnyLocalAddress() || ip.isLoopbackAddress()){
return;
}
//get the country, city & timezone of the user
GeoIP geo = new GeoIP(ip);
geo.countryName;
geo.city;
// etc
Plugin.yml
add this to your plugin.yml
depend: [GeoipAPI]
Links
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta