GamerulePlaceholder 图标

GamerulePlaceholder

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/gameruleplaceholder
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10

平台: paper

标签: management

资源介绍

GamerulePlaceholder

Lightweight Paper plugin that exposes Minecraft gamerule values through PlaceholderAPI placeholders. Supports querying any world by name and the player’s current world.

Requirements

Paper 1.21.x (tested on 1.21.6).

PlaceholderAPI installed on the server.

Java 21 to run Paper 1.21.x.

Installation

Place the plugin JAR into the server’s plugins/ folder.

Ensure PlaceholderAPI is installed and enabled.

Restart the server; the expansion registers automatically at startup.

Placeholders per world scheme

%gamerule_<rule>_<world>%

Returns the value of gamerule in world .

Example: %gamerule_keepInventory_world% → “true” or “false”.

Placeholders scheme for current world

%gamerule_currentworld_<rule>%

Returns the gamerule value from the requesting player’s current world.

Requires player context (e.g., scoreboards, chat, GUIs that resolve placeholders for a player).

Example: %gamerule_currentworld_doDaylightCycle%

Notes

must match the exact gamerule name as in the server version (e.g., keepInventory, doDaylightCycle, playersSleepingPercentage). If the world or gamerule doesn’t exist, the placeholder returns an empty string. Boolean/Integer gamerules are returned as plain text (e.g., “true”, “100”). # Usage Examples Scoreboard: Show whether players keep inventory in the overworld: ```%gamerule_keepInventory_world%``` Player context: Show if day/night cycle runs in the player’s current dimension: ```%gamerule_currentworld_doDaylightCycle%``` # Performance The plugin only reads values via the Paper API and performs no I/O, loops, or async tasks. Overhead is negligible even when placeholders update frequently (e.g., in scoreboards). # Building From Source Prerequisites: JDK 21 and Maven. In the project root, run: mvn clean package. The plugin JAR will be produced in target/ and can be copied to plugins/. Paper API and PlaceholderAPI are declared with provided scope; they must exist as plugins on the server. # Troubleshooting Plugin loads but placeholders are empty: verify the world name and gamerule spelling; ensure a player context exists for gamerule_currentworld_. Java version errors: use Java 21 for Paper 1.21.x. # Credits Author: CrooLyyCheck Built for Paper + PlaceholderAPI.
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
bItemDespawn

价格:0 墨喵币
下载量:0

查看详情
Seraphoenix

价格:0 墨喵币
下载量:0

查看详情
No Void

价格:0 墨喵币
下载量:0

查看详情
ItemOverflow

价格:0 墨喵币
下载量:0

查看详情