A PlaceholderAPI expansion that provides placeholders for IP geolocation data using the ip-api.com service.
- Get detailed IP information about your players
- Auto-updates data when a player joins (if last update was more than 2 minutes ago)
- Cache system to stay within API rate limits
- No additional dependencies required
- Free to use (uses ip-api.com free tier)
All placeholders are prefixed with %ipapi_:
%ipapi_query%- The IP address that was queried%ipapi_status%- Status of the query (success/fail)
%ipapi_continent%- Continent name%ipapi_continentCode%- Two-letter continent code%ipapi_country%- Country name%ipapi_countryCode%- Two-letter country code%ipapi_region%- Region code%ipapi_regionName%- Region name%ipapi_city%- City name%ipapi_district%- District name (if available)%ipapi_zip%- ZIP code%ipapi_lat%- Latitude%ipapi_lon%- Longitude
%ipapi_timezone%- Timezone%ipapi_offset%- UTC offset in seconds%ipapi_currency%- Currency code
%ipapi_isp%- Internet Service Provider%ipapi_org%- Organization%ipapi_as%- AS number and organization%ipapi_asname%- AS name
%ipapi_mobile%- Whether the IP is from a mobile network (true/false)%ipapi_proxy%- Whether the IP is a proxy (true/false)%ipapi_hosting%- Whether the IP belongs to a hosting company (true/false)
%ipapi_dns_geo%- DNS geo information%ipapi_dns_ip%- DNS IP
%ipapi_dns_geo% and %ipapi_dns_ip%) are part of ip-api.com's Pro subscription and will not return data with the free tier. The code still attempts to fetch this data but will return empty values unless you have a Pro subscription.
- Download the latest release from the Releases page
- Place the JAR file in the
plugins/PlaceholderAPI/expansions/folder on your server - Restart your server or reload PlaceholderAPI with
/papi reload
- Clone the repository
- Build using Maven:
mvn clean package - The compiled JAR will be in the
targetfolder
Here are some examples of how you can use these placeholders:
&aWelcome to the server!
&eYou are connecting from %ipapi_city%
&eTime in your area: %ipapi_timezone%
&cPlease note: VPNs and proxies are not allowed (Detection: %ipapi_proxy%)
&eAll connections are logged with %ipapi_countryCode% geolocation
The free tier of ip-api.com has a limit of 45 requests per minute. The expansion includes a caching system that stores IP data for 1 hour to help stay within this limit.
If you run a large server, consider upgrading to the Pro version of ip-api.com for higher rate limits.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by GigaZelensky