wode490390 / GeoIP

GeoIP plugin for Nukkit. GeoIP provides an approximate lookup of where your players come from, based on their public IP and public geographical databases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GeoIP for Nukkit

Nukkit Build Release Release date

GeoIP provides an approximate lookup of where your players come from, based on their public IP and public geographical databases.

If you found any bugs or have any suggestions, please open an issue on GitHub Issues.

If you like this plugin, please star it on GitHub.

Commands

Command Permission Description Default
/geoip geoip.show Shows the GeoIP location of a player. OP
/geoip geoip.show.fullip Shows the full ip address of a player. false
geoip.hide Allows player to hide player's country and city from people who have permission geoip.show false

Configuration

config.yml
database:
  show-cities: false
  download-if-missing: true
  # Url for country
  lzma-download-url: "https://cdn.jsdelivr.net/gh/wodeBot/geoipdb@lzma/country.mmdb.lzma"
  # Url for cities
  lzma-download-url-city: "https://cdn.jsdelivr.net/gh/wodeBot/geoipdb@lzma/city.mmdb.lzma"
show-on-login: true
# "enable-locale" enables locale on geolocation display.
enable-locale: true
# Not all languages are supported. See https://dev.maxmind.com/geoip/geoip2/web-services/#Languages
locale: en

Download

API Usage

example code
import cn.wode490390.nukkit.geoip.GeoIP;
import java.util.UUID;

class Example {
    Example() {
        UUID uuid = UUID.fromString("ecb32467-6cee-4a59-b3c0-5468fec58ed4");
        String geoLocation = GeoIP.query(uuid); //Our API :)
        System.out.println("Location: " + geoLocation);
    }
}

Compiling

  1. Install Maven.
  2. Fork and clone the repo.
  3. Run mvn clean package. The compiled JAR can be found in the target/ directory.

Metrics Collection

This plugin uses bStats. You can opt out using the global bStats config; see the official website for more details.

If I have any grammar and/or term errors, please correct them :)

About

GeoIP plugin for Nukkit. GeoIP provides an approximate lookup of where your players come from, based on their public IP and public geographical databases.

License:GNU General Public License v3.0


Languages

Language:Java 100.0%