Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yukonisen committed Apr 1, 2024
1 parent 81ea7a1 commit 57f315a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# PotatoIpDisplay

一款用于显示玩家Ip归属地的Minecraft插件,支持 Bukkit 和 Velocity
一款用于显示玩家 Ip 归属地的 Bukkit 插件。

## 使用文档(中文)
详见 [此处](https://upt.curiousers.org/docs/PotatoIpDisplay/intro)

## Placeholder API

| 变量 | 描述 | 返回示例 |
|:-----------------------------|:--------|:------------|
| `%potatoipdisplay_ip%` | 玩家的 IP | `11.45.1.4` |
| `%potatoipdisplay_country%` | IP 所属国家 | `中国` |
| `%potatoipdisplay_province%` | IP 所属省份 | `上海` |
| `%potatoipdisplay_city%` | IP 所属城市 | `上海` |
| `%potatoipdisplay_region%` | IP 所属区域 | `未知`(可能无法识别 |
| `%potatoipdisplay_isp%` | 运营商信息 | `联通` |
| 变量 | 描述 | 返回内容(`ip2region`) | 返回内容(`pconline`) |
|:-----------------------------|:--------|:------------------|:-----------------|
| `%potatoipdisplay_ip%` | 玩家的 IP | `11.45.1.4` | `11.45.1.4` |
| `%potatoipdisplay_country%` | IP 所属国家 | `中国` | `中国` |
| `%potatoipdisplay_province%` | IP 所属省份 | `上海` | `上海市` |
| `%potatoipdisplay_city%` | IP 所属城市 | `上海` | `上海` |
| `%potatoipdisplay_region%` | IP 所属区域 | `0` | ` ` |
| `%potatoipdisplay_isp%` | 运营商信息 | `联通` | `上海市 联通` |

![demo](assets/papidemo.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object IpParseFactory {
val conf = plugin.conf
return when (val mode = conf.options.mode) {
"pconline" -> PconlineParser(ip)
"ip2region" -> Ip2regionParser("115.58.254.8")
"ip2region" -> Ip2regionParser(ip)
else -> throw IllegalArgumentException("Invalid mode in config >> $mode")
}
}
Expand Down

0 comments on commit 57f315a

Please sign in to comment.