Skip to content

Commit

Permalink
添加英文介绍
Browse files Browse the repository at this point in the history
  • Loading branch information
handy-git committed Nov 4, 2024
1 parent 4b08fc0 commit b86b3b8
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 43 deletions.
98 changes: 98 additions & 0 deletions README-CH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# ip2region

-------------------------------------------------------------------------------

[**🌎English Documentation**](README.md)

-------------------------------------------------------------------------------

一款简单高效的归属地插件

如果本插件帮助到你,请帮忙右上角点个Star就对作者很大的支持了~

## 变量支持:

本插件目前注册以下PAPI变量(需:PlaceholderAPI)

| 变量名 | 显示内容 | 示例 |
|-----------------------------|----------------|-------------|
| %ip2region_region% | 总区域 | 中国 |
| %ip2region_national% | 国家 | 中国 |
| %ip2region_provincial% || 上海 |
| %ip2region_municipal% || 上海市 |
| %ip2region_serviceProvider% | 运营商 | 电信 |
| %ip2region_ip% | 玩家当前ip(1.0.8+) | 127.0.0.1 |
| %ip2region_district% | 区县(1.1.0+) | 松江区(1.1.0+) |

### PAPI特别说明

> 你可以使用如下指令进行查询对应变量的结果
```
/papi parse me %ip2region_region%
```

```
/papi parse me %ip2region_municipal%
```

## 使用指南

### 数据来源

> 本插件1.1.0版本开始默认有三种方式获取ip归属
> 如果你有你的想法或渠道也可以让我添加
1. offline 本地数据源模式(只支持ipv4 99%数据准确性)
2. [ipPlus360](https://mall.ipplus360.com/) 在线api模式(支持ipv4/ipv6,付费)
3. [ipApi](https://ip-api.com/) 在线api模式(支持ipv4/ipv6,免费但是有分钟请求次数限制)

### 优缺点分析

| 类型 | 费用 | 数据准确度 | 是否需要网络 | 支持网络 | 支持级别(最高) | 官网 |
|-----------|----|---------|--------|-----------|----------|-------------------------------------------------|
| offline | 免费 | 99% | 不需 | ipv4 | 城市级 | [官网](https://github.com/lionsoul2014/ip2region) |
| ipPlus360 | 付费 | 99.999% || ipv4和ipv6 | 区县级 | [官网](https://mall.ipplus360.com/) |
| ipApi | 免费 | 99.9% || ipv4和ipv6 | 城市级 | [官网](https://ip-api.com/) |

### 特别说明

ipPlus360 如需购买,推荐购买城市级
[ipv4](https://mall.ipplus360.com/pros/IPVFourGeoAPI)
[ipv6](https://mall.ipplus360.com/pros/IPGeoAPI)

如需区县级别的
请根据官网的api说明自己在config.yml添加如下配置,其他级别自己修改

```
ipPlus360Ipv4Url: "https://api.ipplus360.com/ip/geo/v1/district/"
ipPlus360Ipv6Url: "https://api.ipplus360.com/ip/geo/v1/ipv6/district/"
```

### 测试说明

offline和ipApi模式 config.yml中添加 然后重载插件后测试玩家重新登录

```
testIp: 测试IP
```

ipPlus360模式 config.yml中添加 然后重载插件后测试玩家重新登录(同时只能添加一个,俩个都添加默认执行ipv4)

```
testIp4: 测试IP
testIp6: 测试IP
```

## GITHUB自动构建版本下载渠道:

[GITHUB ACTIONS](https://github.com/handy-git/ip2region/actions)

## 使用统计

![](https://bstats.org/signatures/bukkit/ip2region.svg)

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=handy-git/ip2region&type=Date)](https://star-history.com/#handy-git/ip2region&Date)

89 changes: 46 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# ip2region

一款简单高效的归属地插件
-------------------------------------------------------------------------------

如果本插件帮助到你,请帮忙右上角点个Star就对作者很大的支持了~
[**🌎中文文档**](README-CH.md)

## 变量支持:
-------------------------------------------------------------------------------

本插件目前注册以下PAPI变量(需:PlaceholderAPI)
A simple and efficient geolocation plugin.

| 变量名 | 显示内容 | 示例 |
|-----------------------------|----------------|-------------|
| %ip2region_region% | 总区域 | 中国 |
| %ip2region_national% | 国家 | 中国 |
| %ip2region_provincial% || 上海 |
| %ip2region_municipal% || 上海市 |
| %ip2region_serviceProvider% | 运营商 | 电信 |
| %ip2region_ip% | 玩家当前ip(1.0.8+) | 127.0.0.1 |
| %ip2region_district% | 区县(1.1.0+) | 松江区(1.1.0+) |
If this plugin has helped you, please consider giving it a Star in the upper right corner—it would greatly support the author!

### PAPI特别说明
## Variable Support

> 你可以使用如下指令进行查询对应变量的结果
This plugin currently registers the following PAPI variables (requires: PlaceholderAPI):

| Variable Name | Display Content | Example |
|---------------------------------|-----------------------|-------------|
| %ip2region_region% | Full Region | China |
| %ip2region_national% | Country | China |
| %ip2region_provincial% | Province | Shanghai |
| %ip2region_municipal% | City | Shanghai |
| %ip2region_serviceProvider% | ISP | Telecom |
| %ip2region_ip% | Player's IP (1.0.8+) | 127.0.0.1 |
| %ip2region_district% | District (1.1.0+) | Songjiang |

### PAPI Special Instructions

> Use the following command to query the results for specific variables:
```
/papi parse me %ip2region_region%
Expand All @@ -30,63 +36,60 @@
/papi parse me %ip2region_municipal%
```

## 使用指南
## User Guide

### 数据来源
### Data Sources

> 本插件1.1.0版本开始默认有三种方式获取ip归属
> 如果你有你的想法或渠道也可以让我添加
Starting from version 1.1.0, this plugin provides three methods to retrieve IP geolocation data.
If you have other ideas or sources, feel free to suggest them!

1. offline 本地数据源模式(只支持ipv4 99%数据准确性)
2. [ipPlus360](https://mall.ipplus360.com/) 在线api模式(支持ipv4/ipv6,付费)
3. [ipApi](https://ip-api.com/) 在线api模式(支持ipv4/ipv6,免费但是有分钟请求次数限制)
1. offline - Local data source mode (IPv4 only, 99% accuracy)
2. [ipPlus360](https://mall.ipplus360.com/) - Online API mode (supports IPv4/IPv6, paid)
3. [ipApi](https://ip-api.com/) - Online API mode (supports IPv4/IPv6, free but with request limits per minute)

### 优缺点分析
### Pros and Cons Analysis

| 类型 | 费用 | 数据准确度 | 是否需要网络 | 支持网络 | 支持级别(最高) | 官网 |
|-----------|----|---------|--------|-----------|----------|-------------------------------------------------|
| offline | 免费 | 99% | 不需 | ipv4 | 城市级 | [官网](https://github.com/lionsoul2014/ip2region) |
| ipPlus360 | 付费 | 99.999% | | ipv4和ipv6 | 区县级 | [官网](https://mall.ipplus360.com/) |
| ipApi | 免费 | 99.9% | | ipv4和ipv6 | 城市级 | [官网](https://ip-api.com/) |
| Type | Cost | Data Accuracy | Requires Network | Supported Network | Highest Level Supported | Official Site |
|------------|------|---------------|------------------|-------------------|-------------------------|-----------------------------------------------------|
| offline | Free | 99% | No | IPv4 | City level | [Official Site](https://github.com/lionsoul2014/ip2region) |
| ipPlus360 | Paid | 99.999% | Yes | IPv4 and IPv6 | District level | [Official Site](https://mall.ipplus360.com/) |
| ipApi | Free | 99.9% | Yes | IPv4 and IPv6 | City level | [Official Site](https://ip-api.com/) |

### 特别说明
### Special Note

ipPlus360 如需购买,推荐购买城市级
[ipv4](https://mall.ipplus360.com/pros/IPVFourGeoAPI)
[ipv6](https://mall.ipplus360.com/pros/IPGeoAPI)
If you wish to purchase ipPlus360, it is recommended to buy the city-level option.
[IPv4](https://mall.ipplus360.com/pros/IPVFourGeoAPI) | [IPv6](https://mall.ipplus360.com/pros/IPGeoAPI)

如需区县级别的
请根据官网的api说明自己在config.yml添加如下配置,其他级别自己修改
For district-level support, add the following configuration to config.yml according to the official API documentation, and modify for other levels as needed:

```
ipPlus360Ipv4Url: "https://api.ipplus360.com/ip/geo/v1/district/"
ipPlus360Ipv6Url: "https://api.ipplus360.com/ip/geo/v1/ipv6/district/"
```

### 测试说明
### Testing Instructions

offline和ipApi模式 config.yml中添加 然后重载插件后测试玩家重新登录
For offline and ipApi modes, add to config.yml, reload the plugin, and re-login to test.

```
testIp: 测试IP
testIp: test IP address
```

ipPlus360模式 config.yml中添加 然后重载插件后测试玩家重新登录(同时只能添加一个,俩个都添加默认执行ipv4)
For ipPlus360 mode, add to config.yml, reload the plugin, and re-login to test (only one can be added at a time; if both are added, IPv4 is prioritized).

```
testIp4: 测试IP
testIp6: 测试IP
testIp4: test IPv4 address
testIp6: test IPv6 address
```

## GITHUB自动构建版本下载渠道:
## GITHUB Automatic Build Download Channel:

[GITHUB ACTIONS](https://github.com/handy-git/ip2region/actions)

## 使用统计
## Usage Statistics

![](https://bstats.org/signatures/bukkit/ip2region.svg)

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=handy-git/ip2region&type=Date)](https://star-history.com/#handy-git/ip2region&Date)

0 comments on commit b86b3b8

Please sign in to comment.