GeoLoc
Paper 服务器的先进地理定位插件
描述
GeoLoc 是一款功能强大的 Paper 服务器地理定位插件,允许管理员查看玩家的近似地理位置。通过 GeoLoc,服务器管理员可以轻松了解社区成员从世界各地连接的来源地,从而增强社区建设和管理功能。
特性
- 快速且可靠: 使用多个地理定位 API 以确保位置数据的准确性
- 灵活的命令: 查看完整的地理定位数据或仅查看特定信息(城市、地区、国家、当地时间)
- PlaceholderAPI 支持: 使用我们的 PAPI 扩展将地理定位数据集成到其他插件中
- 自定义消息: 通过 messages.yml 配置文件完全自定义消息
- 加入消息: 玩家加入服务器时可选的位置公告
- Tab 补全: 为在线玩家提供有用的 Tab 补全功能
- 轻量级: 对服务器性能的影响极小
命令
/geoloc reload - 重载插件配置
/geoloc geolocation <player> - 查看完整地理定位数据
/geoloc geolocation full <player> - 带有玩家建议的查看完整地理定位数据
/geoloc geolocation city <player> - 仅查看城市信息并带有玩家建议
/geoloc geolocation region <player> - 仅查看地区信息并带有玩家建议
/geoloc geolocation country <player> - 仅查看国家信息并带有玩家建议
/geoloc geolocation localTime <player> - 仅查看当地时间信息并带有玩家建议
权限
- geoloc.admin - 访问所有 GeoLoc 命令
- geoloc.see - 允许玩家查看加入消息
PlaceholderAPI 集成
安装 PlaceholderAPI 后,GeoLoc 提供以下占位符:
%geoloc_full% - 完整的地理定位信息
%geoloc_city% - 玩家所在城市
%geoloc_region% - 玩家所在地区/州
%geoloc_country% - 玩家所在国家
%geoloc_localtime% - 玩家当地时间
配置
GeoLoc 包含两个配置文件:
- config.yml - 主插件设置
- messages.yml - 所有插件功能的可自定义消息
config.yml
# GeoLoc 插件配置
# 设置为 true 以向玩家显示带有其位置的欢迎消息
# 设置为 false 以禁用欢迎消息
# 实际消息内容位于 messages.yml 中
join-message-enabled: true
# 权限:
# geoloc.admin - 允许重载配置
# geoloc.see - 允许查看加入消息(如果启用)
messages.yml
# GeoLoc 插件消息
# 您可以使用 & 颜色代码(例如 &a 表示绿色,&c 表示红色)
# join-message 可用的占位符:
# {player} - 玩家名称
# {city} - 城市
# {region} - 地区/州
# {country} - 国家
# {localTime} - HH:mm:ss 格式的当地时间
# 每条消息可用的占位符由全部大写定义
# 消息前缀
# NONE
prefix: "&c&lGeoLoc &7&l→ &r"
# 当玩家地理定位返回 null 时的默认值(当他们处于本地网络时)
# NONE
default-location-value: "Unknown"
# 加入消息(向所有玩家广播)
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
join-message: "&a玩家 &e{player} &a来自 &6{city}, {region}, {country}&a!当地时间为 &b{localTime}&a。"
# 命令消息
command:
# NONE
reload-success: "&aGeoLoc 配置已成功重载!"
# NONE
no-permission: "&c您没有权限使用此命令。"
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
location: "&a玩家 &e{player} &a来自 &6{city}, {region}, {country}&a!当地时间:&b{localTime}"
# 日志消息(仅限控制台)
log:
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
player-connected: "{player} 连接自:{city}, {region}, {country}(当地时间:{localTime})"
# PLAYER
no-ip: "无法获取玩家 IP 地址:{player}"
# PLAYER
no-geolocation: "无法获取玩家地理定位数据:{player}"
error:
# PLAYER
player-not-found: "&c找不到 {player} 或该玩家不在线。"
# PLAYER
ip-not-found: "&c无法从 {player} 获取 IP。"
# PLAYER
geolocation-not-found: "&c无法从 {player} 获取地理定位数据。"
# 可能的占位符:
# - %geoloc_full% -> 返回玩家的所有地理定位信息
# - %geoloc_city% -> 返回玩家的城市
# - %geoloc_region% -> 返回玩家的地区
# - %geoloc_country% -> 返回玩家的国家
# - %geoloc_localTime% -> 返回玩家的当地时间(按地区计算)
# 所有占位符的返回格式可在下方定义
# PlaceholderAPI 返回格式
placeholder:
full: "{city}, {region}, {country}, {localTime}"
city: "{city}"
region: "{region}"
country: "{country}"
localTime: "{localTime}"
支持
如需支持,请访问我们的 Discord 服务器或在我们的 GitHub 仓库中创建问题。
免责声明
本插件基于 IP 地址提供近似的地理定位数据,不应被视为 100% 准确。提供的数据仅用于一般信息目的,不应用于任何关键决策。本插件依赖于第三方地理定位服务,这些服务的准确性可能因地区而异。
GeoLoc 尊重玩家隐私,仅提供一般位置信息(城市、地区、国家、当地时间),而不是精确坐标。服务器管理员应告知玩家,这些信息可能对服务器工作人员可见。
GeoLoc 与本插件中使用的任何地理定位服务提供商均无关联。我们不对这些服务提供的任何数据不准确负责。
© 2025 TSERATO | 版本 1.0
GeoLoc
Advanced Geolocation Plugin for Paper Servers
Description
GeoLoc is a powerful geolocation plugin for Paper servers that allows administrators to view the approximate geographic location of their players. With GeoLoc, server admins can easily see where their community members are connecting from around the world, enhancing community building and moderation capabilities.
Features
- Fast & Reliable: Uses multiple geolocation APIs to ensure accurate location data
- Flexible Commands: View full geolocation data or just specific information (city, region, country, local time)
- PlaceholderAPI Support: Integrate geolocation data into other plugins using our PAPI expansion
- Customizable Messages: Fully customizable messages through the messages.yml configuration file
- Join Messages: Optional location announcements when players join your server
- Tab Completion: Helpful tab completion for online players
- Lightweight: Minimal impact on server performance
Commands
/geoloc reload - Reload plugin configuration
/geoloc geolocation <player> - View full geolocation data
/geoloc geolocation full <player> - View full geolocation data with player suggestions
/geoloc geolocation city <player> - View only city information with player suggestions
/geoloc geolocation region <player> - View only region information with player suggestions
/geoloc geolocation country <player> - View only country information with player suggestions
/geoloc geolocation localTime <player> - View only local time information with player suggestions
Permissions
- geoloc.admin - Access to all GeoLoc commands
- geoloc.see - Allows the player to see the join message
PlaceholderAPI Integration
GeoLoc provides the following placeholders when PlaceholderAPI is installed:
%geoloc_full% - Full geolocation information
%geoloc_city% - Player's city
%geoloc_region% - Player's region/state
%geoloc_country% - Player's country
%geoloc_localtime% - Player's local time
Configuration
GeoLoc comes with two configuration files:
- config.yml - Main plugin settings
- messages.yml - Customizable messages for all plugin features
config.yml
# GeoLoc Plugin Configuration
# Set to true to display a welcome message to players with their location
# Set to false to disable the welcome message
# The actual message content is in messages.yml
join-message-enabled: true
# Permissions:
# geoloc.admin - Allows reloading the config
# geoloc.see - Allows seeing the join message (if enabled)
messages.yml
# GeoLoc Plugin Messages
# You can use color codes with & (e.g. &a for green, &c for red)
# Available placeholders for join-message:
# {player} - Player name
# {city} - City
# {region} - Region/State
# {country} - Country
# {localTime} - Local time in HH:mm:ss format
# Available placeholders for every message is defined by ALL CAPS
# Prefix for messages
# NONE
prefix: "&c&lGeoLoc &7&l→ &r"
# Default value when the geolocation of the player returns null (when they are in a local network)
# NONE
default-location-value: "Unknown"
# Join message (broadcasts to all players)
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
join-message: "&aPlayer &e{player} &ajoined us from &6{city}, {region}, {country}&a! It's &b{localTime} &athere."
# Command messages
command:
# NONE
reload-success: "&aGeoLoc configuration has been reloaded successfully!"
# NONE
no-permission: "&cYou don't have permission to use this command."
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
location: "&aPlayer &e{player} &ais from &6{city}, {region}, {country}&a! Local time: &b{localTime}"
# Log messages (console only)
log:
# PLAYER, CITY, REGION, COUNTRY, LOCALTIME
player-connected: "{player} connected from: {city}, {region}, {country} (Local time: {localTime})"
# PLAYER
no-ip: "Could not get IP address for player: {player}"
# PLAYER
no-geolocation: "Could not get geolocation data for player: {player}"
error:
# PLAYER
player-not-found: "&c{player} can't be found or isn't online."
# PLAYER
ip-not-found: "&cCouldn't get IP from {player}."
# PLAYER
geolocation-not-found: "&cCouldn't get geolocation data from {player}."
# Possible Placeholders:
# - %geoloc_full% -> Returns all geolocation information from the player
# - %geoloc_city% -> Returns the city of the player
# - %geoloc_region% -> Returns the region of the player
# - %geoloc_country% -> Returns the country of the player
# - %geoloc_localTime% -> Retunrs the local time of the player (calculated by region)
# The return format of all placeholders can be defined below
# PlaceholderAPI return format
placeholder:
full: "{city}, {region}, {country}, {localTime}"
city: "{city}"
region: "{region}"
country: "{country}"
localTime: "{localTime}"
Support
For support, please visit our Discord server or create an issue on our GitHub repository.
Disclaimer
This plugin provides approximate geolocation data based on IP addresses and should not be considered 100% accurate. The data provided is for general informational purposes only and should not be used for any critical decision-making. The plugin relies on third-party geolocation services which may have varying levels of accuracy depending on the region.
GeoLoc respects player privacy and only provides general location information (city, region, country, local time) rather than exact coordinates. Server administrators should inform their players that this information may be visible to server staff.
GeoLoc is not affiliated with any geolocation service providers used in this plugin. We are not responsible for any inaccuracies in the data provided by these services.
© 2025 TSERATO | Version 1.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧