一个功能丰富的 Minecraft 插件,基于 Paper 1.21.3,通过统计追踪为玩家引入等级系统。
特性
核心特性
- 动态升级:玩家根据游戏内的统计数据获得经验值并提升等级
- 平衡缩放:更高等级需要指数级增长的经验值
- 可配置统计项:服务器管理员可选择影响升级的统计项
- 等级奖励:当玩家达到特定等级时自动发放奖励
- PlaceholderAPI 集成:在其他插件中使用玩家等级信息
- 排行榜:查看按等级排名的顶级玩家,支持分页
增强特性 (v2.0)
- 成就系统:为里程碑和排名提供基于成就的奖励
- 进度条:带有百分比显示的可视化经验值进度指示器
- 升级公告:玩家升级时广播消息
- 经验值加成系统:给予玩家临时的经验值倍率加成
- 排名显示:在
/level 命令中查看你的服务器排名
- 数据库支持:支持 SQLite 或 MySQL 存储选项
要求
安装
- 从发布页面下载插件 JAR 文件
- 将 JAR 文件放入服务器的
plugins 文件夹
- 重启服务器
- 确保已安装 PlaceholderAPI
- 安装 Statistic 扩展:执行
/papi ecloud download Statistic 和 /papi reload
- 在
plugins/PlayerLevels/config.yml 中按需配置插件
配置
该插件高度可配置。以下是主要配置部分的详细说明:
基本设置
settings:
enable-plugin: true
# 升级广播
level-up-broadcast: true
level-up-message: "&6%player% &e已达到 &aLevel %level%&e!"
levels:
base-xp: 100 # 第 1 级所需的基准经验值
xp-multiplier: 1.5 # 每级增加的经验值倍数(指数缩放)
经验值加成系统
xp-boost:
multiplier: 2.0 # 激活加成时的经验值倍率
统计项配置
你可以配置哪些统计项计入玩家等级,以及它们提供的经验值数量:
statistics:
1:
statistic: "MINE_BLOCK"
material: "STONE"
xp-value: 5 # 每挖掘一块石头获得 5 点经验值
2:
statistic: "KILL_ENTITY"
entity: "ZOMBIE"
xp-value: 20 # 每击杀一只僵尸获得 20 点经验值
statistic 字段应为有效的 Minecraft 统计名称。对于与方块相关的统计,请包含 material 字段。对于与实体相关的统计,请包含 entity 字段。
可以使用负数的经验值来惩罚某些行为(例如死亡)。
等级奖励
配置达到特定等级的奖励:
rewards:
5:
commands:
- "give %player% diamond 1"
message: "&a你达到了 Level 5!享受一颗钻石吧!"
10:
commands:
- "give %player% diamond 5"
- "eco give %player% 1000"
message: "&eLevel 10!你获得了 5 颗钻石和 $1,000!"
成就系统 (新增!)
创建玩家可以获得的成就奖励:
awards:
level_10_pioneer:
display-name: "&6Level 10 Pioneer"
requirement: "level=10"
message: "&a✨ 成就解锁:&6Level 10 Pioneer&a!"
commands:
- "give %player% golden_apple 3"
top_player:
display-name: "&e&l⭐ #1 Player"
requirement: "rank=1"
message: "&6&l✨ 你是第一名!你获得了 Top Player 成就!"
commands:
- "give %player% diamond_block 10"
条件可以是:
level=X - 玩家必须达到 X 级
rank=X - 玩家必须达到 X 级或更好的排名
命令
| 命令 |
描述 |
权限 |
/level |
查看你当前的等级、排名和进度 |
playerlevels.use |
/level <player> |
查看其他玩家的等级 |
playerlevels.others |
/level awards [player] |
查看你的成就(或其他玩家的) |
playerlevels.use |
/level reload |
重新加载插件配置 |
playerlevels.admin |
/level set <player> <level> |
设置玩家的等级 |
playerlevels.admin |
/level boost <player> <minutes> |
给予玩家临时的经验值加成 |
playerlevels.admin |
/leveltop [limit] [page] |
显示最高等级的排行榜 |
playerlevels.leaderboard |
示例:
/level - 查看你的统计信息
/level awards - 查看你的成就
/level Steve - 查看 Steve 的统计信息
/level boost Steve 60 - 给予 Steve 1 小时的 2 倍经验值加成
/leveltop - 显示前 10 名玩家(第 1 页)
/leveltop 20 - 显示前 20 名玩家(第 1 页)
/leveltop 10 2 - 显示第 2 页的前 10 名玩家
占位符
该插件提供以下 PlaceholderAPI 占位符:
玩家占位符
%playerlevels_level%: 玩家当前等级
%playerlevels_xp%: 玩家总经验值点数
%playerlevels_xp_needed%: 下一级所需经验值
%playerlevels_progress%: 带有百分比的可视化进度条
%playerlevels_rank%: 玩家在服务器中的排名
%playerlevels_awards%: 已获得的成就数量
排行榜占位符
这些占位符无需玩家上下文即可工作,非常适合用于全息显示:
%playerlevels_top_<position>_name%: 指定位置的玩家名称(例如 %playerlevels_top_1_name%)
%playerlevels_top_<position>_level%: 指定位置的玩家等级(例如 %playerlevels_top_1_level%)
%playerlevels_top_<position>_xp%: 指定位置的玩家经验值(例如 %playerlevels_top_1_xp%)
%playerlevels_top_<position>_rank%: 位置编号(例如 %playerlevels_top_1_rank%)
%playerlevels_total_players%: 数据库中玩家的总数
全息图示例
使用 DecentHolograms 或类似的插件:
lines:
- '&6&l⚔ Top Players ⚔'
- '&e#1 &f%playerlevels_top_1_name% &7- &aLevel %playerlevels_top_1_level%'
- '&e#2 &f%playerlevels_top_2_name% &7- &aLevel %playerlevels_top_2_level%'
- '&e#3 &f%playerlevels_top_3_name% &7- &aLevel %playerlevels_top_3_level%'
- ''
- '&7Total Players: &f%playerlevels_total_players%'
Scoreboard Example
# In your scoreboard plugin config
lines:
- '&6&lYour Stats'
- '&eLevel: &f%playerlevels_level%'
- '&eRank: &f#%playerlevels_rank%'
- '%playerlevels_progress%'
- '&eAwards: &f%playerlevels_awards%'
Storage
By default, the plugin uses SQLite for data storage. You can switch to MySQL by changing the configuration:
storage:
type: "mysql"
mysql:
host: "localhost"
port: 3306
database: "minecraft"
username: "root"
password: ""
Permissions
| Permission |
Description |
Default |
playerlevels.use |
Allows checking own level |
true |
playerlevels. |
|
|
A feature-rich Minecraft plugin that introduces player levels based on statistics tracking for Paper 1.21.3.
Features
Core Features
- Dynamic Leveling: Players gain levels as they play based on their in-game statistics
- Balanced Scaling: Higher levels require exponentially more XP
- Configurable Stats: Server owners choose which stats affect leveling
- Level Rewards: Automatically reward players when they reach certain levels
- PlaceholderAPI Integration: Use player level information in other plugins
- Leaderboard: View top players by level with pagination
Enhanced Features (v2.0)
- Awards System: Achievement-based rewards for milestones and ranks
- Progress Bar: Visual XP progress indicator with percentage
- Level-Up Announcements: Broadcast messages when players level up
- XP Boost System: Give players temporary XP multipliers
- Rank Display: See your server rank in
/level command
- Database Support: SQLite or MySQL storage options
Requirements
- Paper 1.21.3 or newer
- PlaceholderAPI with Statistic Expansion
- Java 17+
Installation
- Download the plugin JAR from the releases page
- Place the JAR in your server's
plugins folder
- Restart your server
- Make sure PlaceholderAPI is installed
- Install the Statistic expansion:
/papi ecloud download Statistic and /papi reload
- Configure the plugin to your liking in
plugins/PlayerLevels/config.yml
Configuration
The plugin is highly configurable. Here's a breakdown of the main configuration sections:
Basic Settings
settings:
enable-plugin: true
# Level-up announcements
level-up-broadcast: true
level-up-message: "&6%player% &ehas reached &aLevel %level%&e!"
levels:
base-xp: 100 # Base XP required for level 1
xp-multiplier: 1.5 # XP increase per level (exponential scaling)
XP Boost System
xp-boost:
multiplier: 2.0 # XP multiplier when boost is active
Statistics Configuration
You can configure which statistics count towards player levels and how much XP they provide:
statistics:
1:
statistic: "MINE_BLOCK"
material: "STONE"
xp-value: 5 # Gain 5 XP per stone mined
2:
statistic: "KILL_ENTITY"
entity: "ZOMBIE"
xp-value: 20 # Gain 20 XP per zombie killed
The statistic field should be a valid Minecraft statistic name. For statistics related to blocks, include the material field. For statistics related to entities, include the entity field.
Negative XP values can be used to penalize certain actions (like deaths).
Level Rewards
Configure rewards for reaching specific levels:
rewards:
5:
commands:
- "give %player% diamond 1"
message: "&aYou reached Level 5! Enjoy a diamond!"
10:
commands:
- "give %player% diamond 5"
- "eco give %player% 1000"
message: "&eLevel 10! You got 5 diamonds and $1,000!"
Awards System (New!)
Create achievement awards that players can earn:
awards:
level_10_pioneer:
display-name: "&6Level 10 Pioneer"
requirement: "level=10"
message: "&a✨ Achievement Unlocked: &6Level 10 Pioneer&a!"
commands:
- "give %player% golden_apple 3"
top_player:
display-name: "&e&l⭐ #1 Player"
requirement: "rank=1"
message: "&6&l✨ You're #1! You earned the Top Player award!"
commands:
- "give %player% diamond_block 10"
Requirements can be:
level=X - Player must reach level X
rank=X - Player must reach rank X or better
Commands
| Command |
Description |
Permission |
/level |
View your current level, rank, and progress |
playerlevels.use |
/level <player> |
View another player's level |
playerlevels.others |
/level awards [player] |
View your awards (or another player's) |
playerlevels.use |
/level reload |
Reload the plugin configuration |
playerlevels.admin |
/level set <player> <level> |
Set a player's level |
playerlevels.admin |
/level boost <player> <minutes> |
Give a player temporary XP boost |
playerlevels.admin |
/leveltop [limit] [page] |
Show the leaderboard of highest levels |
playerlevels.leaderboard |
Examples:
/level - View your stats
/level awards - View your awards
/level Steve - View Steve's stats
/level boost Steve 60 - Give Steve 1 hour of 2x XP
/leveltop - Show top 10 players (page 1)
/leveltop 20 - Show top 20 players (page 1)
/leveltop 10 2 - Show top 10 players on page 2
Placeholders
The plugin provides the following PlaceholderAPI placeholders:
Player Placeholders
%playerlevels_level%: Player's current level
%playerlevels_xp%: Player's total XP points
%playerlevels_xp_needed%: XP needed for next level
%playerlevels_progress%: Visual progress bar with percentage
%playerlevels_rank%: Player's server rank
%playerlevels_awards%: Number of awards earned
Leaderboard Placeholders
These placeholders work without player context, making them ideal for holographic displays:
%playerlevels_top_<position>_name%: Player name at position (e.g., %playerlevels_top_1_name%)
%playerlevels_top_<position>_level%: Player level at position (e.g., %playerlevels_top_1_level%)
%playerlevels_top_<position>_xp%: Player XP at position (e.g., %playerlevels_top_1_xp%)
%playerlevels_top_<position>_rank%: Position number (e.g., %playerlevels_top_1_rank%)
%playerlevels_total_players%: Total number of players in database
Hologram Example
Using DecentHolograms or similar plugins:
lines:
- '&6&l⚔ Top Players ⚔'
- '&e#1 &f%playerlevels_top_1_name% &7- &aLevel %playerlevels_top_1_level%'
- '&e#2 &f%playerlevels_top_2_name% &7- &aLevel %playerlevels_top_2_level%'
- '&e#3 &f%playerlevels_top_3_name% &7- &aLevel %playerlevels_top_3_level%'
- ''
- '&7Total Players: &f%playerlevels_total_players%'
Scoreboard Example
# In your scoreboard plugin config
lines:
- '&6&lYour Stats'
- '&eLevel: &f%playerlevels_level%'
- '&eRank: &f#%playerlevels_rank%'
- '%playerlevels_progress%'
- '&eAwards: &f%playerlevels_awards%'
Storage
By default, the plugin uses SQLite for data storage. You can switch to MySQL by changing the configuration:
storage:
type: "mysql"
mysql:
host: "localhost"
port: 3306
database: "minecraft"
username: "root"
password: ""
Permissions
| Permission |
Description |
Default |
playerlevels.use |
Allows checking own level |
true |
| `playerlevels. |
|
|
评论 0
登录后参与评分
还没有评论,来抢沙发吧