部分占位符鄙人仍然不知是什么用处
%player% - 获取玩家的名字
%player_displayname% - 获取玩家的显示名称
%player_uuid% - 获取玩家的UUID
%player_ping% - 获取玩家的ping
%player_level% - 获取玩家所处世界名
%player_can_fly% - 获取玩家是否能够飞
%player_flying% - 玩家是否正在飞
%player_health% - 获得玩家的生命值
%player_max_health% - 获得玩家的最大生命值
%player_saturation% - Unknown
%player_food% - 获得玩家的饱食度
%player_gamemode% - 获取玩家的游戏模式
%player_x% - 获取玩家的x坐标
%player_y% - 获取玩家的y坐标
%player_z% - 获取玩家的z坐标
%player_direction% - Unknown
%player_exp% - 获得玩家经验值
%player_exp_to_next% - 获得玩家下一个等级等级所需的经验
%player_exp_level% - 获得玩家的等级
%player_speed% - 获取玩家的当前速度
%player_max_air% - Unknown
%player_remaining_air% - Unknown
%player_item_in_hand% - 获取玩家手持物品信息
%server_online% - 获取当前在线玩家数
%server_max_players% - 获取最大玩家数
%server_motd% - 获取服务器motd
%server_ram_used% - 获取已用内存
%server_ram_free% - 获取可用内存
%server_ram_total% - 获取总内存
%server_ram_max% -获取最大内存
%server_cores% - 获取可用处理器核心
%server_tps% - 获取当前TPS
%server_uptime% - 获取当前正常运行时间
%time% - 获取当前时间
%economy_money% - 获取玩家金钱信息 ( 需要前置EconomyAPI )
图片 ~( ̄▽ ̄~)(~ ̄▽ ̄)~
如果图片被压缩了请点击查看大图!
官网图片
个人使用
模板推荐 ( 颜色符号为 § )
-
title: "§5§l墨 §e§l城 §b§l烟 §a§l柳"
-
text:
-
- ""
-
- "§f玩 家: §eDobeShadow"
-
- "§f等 级: §c2 §f级"
-
- "§f称 号: §f[§c§l服主§f]"
-
- "§f银 两: §a500.0 两"
-
- "§f在 线: 1 人"
-
- ""
-
- "§f所 处: §a游戏大厅"
-
- ""
- - "§f§lPlay.ChinaInk.tk"
下载地址
[SimpleScoreboards] https://nukkitx.com/resources/simplescoreboards.195/
[ScoreboardAPI] https://nukkitx.com/resources/scoreboardapi.181/
[PlaceholderAPI] https://nukkitx.com/resources/placeholderapi.104/
PS: 更新了配置文件需要重启服务器!PlaceholderAPI需要前置插件 KotlinLib !
前置信息
ScoreboardAP I
ScoreboardAPI是一款由Amy所开发的一款计分板前置API类型的插件,它也可以编辑计分板,但是不能添加占位符!如果想要开发一款更棒的计分板插件,下面这个可能有助于您的开发!
-
Scoreboard scoreboard = ScoreboardAPI.createScoreboard();
-
ScoreboardDisplay scoreboardDisplay = scoreboard.addDisplay( DisplaySlot.SIDEBAR, "dumy", " This is the title" );
-
ScoreboardDisplay.addLine( "This is a line", 0 );
- ScoreboardAPI.setScoreboard( player, scoreboard );
PlaceholderAPI是一款基于Nukkit所开发变量插件,它提供给了Nukkit与Bukkit类似的变量系统!当然也是一款API!
1.获取API实例
-
-
//in kotlin you can do
-
val api = PlaceholderAPI.getInstance()
-
-
//in java
-
PlaceholderAPI api = PlaceholderAPIImpl.getInstance();
-
-
-
//getting single placeholder value
-
api.getValue(placeholderName, player); //player is optional and has an effect only for visitor sensitive placeholders
-
-
//getting placeholdered string containing X placeholders
- api.translateString(inputString, player); //player is again optional for static placeholders
-
val api = PlaceholderAPI.getInstance()
-
-
//creating static placeholder
-
api.staticPlaceholder("tick", {Server.getInstance().tick}) //the simplest example
-
-
//you can also specify update interval which indicates
-
//how long should be value cached until it's recalculated (default is 1 second)
-
-
//PlacholderAPI has also implemented auto updater which updates the placeholder
-
//every period specified in update interval
-
-
//autoupdating placehodler
-
-
//this placeholder value will be refreshed every tick and automatically updated
-
api.staticPlaceholder("tick", {Server.getInstance().tick}, 1, true)
-
-
-
//creating visitor sensitive placeholder
-
//it's almost the same as static. The only difference is that you can use Player instance parameter in the lambda
-
-
api.visitorSensitivePlaceholder("isop", {p -> p.isOp}) //you can also use update interval and autoupdate parameters
-
-
//every placecholder can have aliases which can be contained in vararg at the end of the method
-
-
//if you want to have better control over the placeholder you can extend existing classes
-
//and register Placeholder instance directly like
- api.registerPlaceholder(StaticPlaceHolder("test", 20, false, emptySet()) {"test"})
点这里 可以查看详细的 API 内容
来自群组: NukkitPluginStudio