SignBoard v1.6.16
(适用于 Spigot/Paper/Bukkit 1.8.7 至 1.19.3 - 详情请参见下方的版本支持)
随心所欲地在告示牌上书写
现已支持多语言
- 将无限数量的文本附加到告示牌 或活体实体 上(包括盔甲架、村民、生物以及 Citizens2 NPC!)。
- 当玩家注视告示牌/实体时,以书 的形式发放文本。
- 在以下情况下运行命令 :
- 注视某个告示牌/实体
- 移开对某个告示牌/实体的注视
- 点击告示牌
- 攻击或击杀实体
您的服务器中有使用不同语言的玩家吗?
或者您希望向不同的玩家职业显示不同的内容?SignBoard 现在可以显示针对特定组别的内容,因此您可以为不同语言的玩家显示相应文本,或根据他们的玩家职业显示内容!请在下方“分类”部分阅读更多详情。
厌倦了告示牌上狭窄的空间吗?现在您可以在告示牌上显示无限量的文本!您甚至可以将这些文本附加到活体实体上!并且您还可以将命令附加到告示牌和实体上,以便在不同时机执行!
使用 SignBoard,您可以创建文本"面板"并将其附加到告示牌或活体实体上。每个面板最多可容纳15 行(每个面板总共 600 个字符)。您还可以将多个面板组合成一个"集合",并将其作为单一文本块使用。
当玩家注视告示牌或实体时,系统将使用记分板区域来向他们展示面板上的文本。这对于在游戏中交流……呃,好吧,基本上任何事物都非常有用。管理员可以向玩家提供说明,玩家可以向访客展示关于他们建筑的详细信息,RPG 游戏可以在队伍进入房间时提供详细的背景故事……没有上限。
与将面板附加到告示牌类似,Signboard 还允许您将面板或集合附加到活体实体上!例如,您可以将面板或集合附加到村民或 NPC 上,每当玩家注视该 NPC 时,文本就会显示出来。(盔甲架也可作为活体实体工作)。
当玩家被展示一组面板时,一次只显示一个面板。玩家可以通过右键或左键点击告示牌/实体在面板之间来回切换。这样,一个集合就像书中的页面一样工作。
您还可以将命令 附加到告示牌和实体上,并控制这些命令的执行时机。命令可以在玩家注视告示牌/实体、移开注视、点击告示牌、攻击或击杀实体时运行。
作为一个额外福利,SignBoard 还允许您编辑告示牌行,而无需破坏告示牌并从头开始重新书写——只需注视您创建的告示牌并使用命令 /sb sign lineX [文本](见下文)即可。
演示视频:
(英语)
(西班牙语,由 Ajneb97 提供。)
版本支持
SignBoard v1.6.3 及以上版本支持所有 Bukkit/Spigot/Paper 1.13.3 至 1.19.3 版本。SignBoard v1.6.2 支持所有 Bukkit/Spigot/Paper 1.8.7 至 1.16.1 版本。
(Signboard 拥有自己的变量集,并支持 Placeholder API)
多语言支持
自版本 1.6.6起,SignBoard 支持其界面(菜单和消息)的不同语言。这允许用户选择自己喜欢的语言偏好,并以该语言使用插件。目前它提供英语(美国)、葡萄牙语(巴西)和西班牙语(哥伦比亚)选项,但您可以将本地化文件翻译成其他语言——只需确保与我们分享,我们将把它们包含在 SignBoard 的未来版本中!
查看 /sb locale 命令。
新建版面的默认文本也已移至本地化文件中。因此,现在创建新版面时,每位玩家都会以其(所选)首选语言查看其默认文本。
事实上,每个面板上的每一行都会进行翻译处理。因此,如果您在语言文件中添加一行类似 "This is a board line": "Esta é uma linha de placa"" 的内容,那么所有包含 "This is a board line" 的面板都将根据每位玩家偏好的语言环境,显示来自相应语言文件的翻译版本。
安装
只需将 jar 文件放入插件文件夹,然后重启服务器即可
基本用法
SignBoard 的工作原理是让你创建“公告板”,然后将这些“公告板”附加到一个或多个告示牌或活体生物上——包括动物、村民、怪物、盔甲架、NPC,甚至是真实在线的玩家(只有 OP 可以将公告板附加到玩家身上)。
你可以使用 /sb set 命令将板块分组为集合。一个集合随后会表现得像一段文本,玩家右键或左键点击时,其中包含的各个板块将按顺序显示。
您还可以使用 /sb sign attach 和 /sb sign detach 命令将告示牌附加到告示板上或从告示板上移除。
通过 /sb entity attach 和 /sb entity detach 命令,可以将告示牌附加到活体实体上或从其身上移除。
告示板的内容显示在计分卡区域中,因此每个告示板最多可包含 15 行,每行最多 40 个字符。
您可以正常使用 Minecraft 中的文本颜色和格式标签(&0 = 黑色;&1 = 深蓝色;| &2 = 深绿色;&3 = 深青色;&4 = 深红色;&5 = 深紫色;&6 = 金色;&7 = 灰色;&8 = 深灰色;&9 = 蓝色;&a = 绿色;&b = 青色;&c = 红色;&d = 淡紫色;&e = 黄色;&f = 白色;&k = 魔法;&l = 粗体;&m = 删除线;&n = 下划线;&o = 斜体;&r = 重置)。
快速入门
- 为新告示板起一个名字
- 使用命令 /sb board new [boardname] 创建告示板
- 在任意位置放置一个告示牌,面向该告示牌并使用命令 /sb sign attach [boardname] 将其附加到告示板上
- 如果您想将告示板附加到活体实体上,请面向该实体并使用命令 /sb entity attach [boardname]
- 查看告示牌或实体 - SignBoard 将使用记分板区域来显示新公告牌的默认内容
- 使用命令 /sb board [boardname] lineX [text] 编辑你的计分板(you don't have to be looking at the sign/entity for this)
- 使用 /sb set 命令将多个计分板组合成一个集合。然后使用 /sb sign attach 和 /sb entity attach 将该集合附加到告示牌或实体上。当你看向该告示牌/实体时,会显示集合中的第一个计分板;通过右键或左键点击告示牌/实体可循环切换其他计分板。
提示与说明
- 现有的计分板会被尊重,并在玩家移开视线后立即重新加载。
- 你只能编辑你可以破坏的告示牌。当你尝试使用告示牌时,SignBoard 会测试你是否能够破坏并替换它,只有在可以的情况下才允许你使用它。你也可以使用 /sb sign lineX text 来编辑告示牌。
- 空行——无论是告示牌还是计分板上的行,你都可以用空行替换当前行;只需将行的内容设置为 &r,该行就会变为空白。
- 你只能更改自己创建的计分板,但没有什么能阻止你在告示牌上使用已有的计分板名称(例如 [boardname]),即使该计分板是由其他玩家创建的。
- 要在告示牌上使用附加/分离命令,你必须拥有破坏该告示牌的能力。要在实体上使用附加/分离命令,你必须拥有相关计分板的权限。除非你是 OP,在这种情况下你可以做任何事情 :).
编辑计分板内容
当你创建一个新的计分区时,它会带有默认内容。你可以通过以下三种方式编辑任何计分板的各行:
- /sb board [boardname] lineX [content] - 直接更改第 X 行的内容
- /sb board [boardname] lineX-Y [content] - 更改从第 X 行到第 Y 行的内容(例如 1-3,或 3-1 - 顺序很重要)
- /sb board [boardname] linepushX [content] - 更改从第 X 行开始的内容,并将现有行向下推移。
[content] 可以是任何文本,在最后两个命令中甚至可以跨越多行——只要你使用 \n 来表示换行即可。
例如,内容 text 4\n text 3\n text 2 包含两个换行符,因此它对应三行的文本。如果你使用命令
/sb board [boardname] line4-3 text 4\n text 3\n text 2
你将把第 4 行的内容替换为 "text 4",第 3 行的内容替换为 "text 3";"text 2" 将被忽略,因为你只指定了两行进行更新(4-3)。
同样,如果你使用命令
/sb board [boardname] linepush4 text 4\n text 3
第 4 行的内容将被替换为 "text 4",第 3 行的内容将被替换为 "text 3",并且旧的第 4、3、2、1 行内容会被“向下推”,作为新插入内容的后续部分,导致第 2 行最终获得原第 4 行的内容,而第 1 行最终获得原第 3 行的内容。
以下是一些需要注意的事项:
- 标题行是第 16 行。
- 每行最多只能容纳 40 个字符;超出部分将被截断。
- 不能有两行具有完全相同的内容。因此,如果你希望两行看起来一样,请在其中插入不可见的 &r 字符以使它们彼此不同。
使用板集显示多个告示牌
从 1.3.2 版本开始,SignBoard 允许你在玩家查看告示牌或实体时向他们展示多个板子。这是通过将多个板子分组为一个集合(set)来实现的。
使用 /sb set 命令来创建、删除和列出已有的集合。通过 /sb sign 和 /sb entity 附加和分离命令,以与附加/分离板子相同的方式将集合附加到告示牌和实体上。
一旦集合被附加,当玩家看向告示牌/实体时,将显示集合中的第一个板子。然后,玩家可以通过左键点击和右键点击在不同的板子之间切换。集合可以包含任意数量的板子。
关于附加了集合的实体的几点说明:
- 右键点击:当集合附加到实体上时,对实体的第一次右键点击将由 SignBoard 接管。然而,如果在半秒内对实体进行第二次右键点击,它将被正常处理。例如,如果你将一个集合附加到村民身上,对村民的单次右键点击将使集合中的板子切换到前一个,而不会显示村民交易 GUI。但是,如果你对村民双击右键,第一次右键点击将切换板子,第二次右键点击则会打开交易 GUI。
- 左键点击:当集合附加到实体上时,你必须(左键)点击该实体才能在板子之间切换;通常点击实体意味着攻击并可能对该实体造成伤害。因此,当实体附加了集合时,SignBoard 会拦截点击并取消伤害。"/sb entity onattack" 命令仍然有效,但实体将不会受到伤害。
发放书籍
当玩家看向告示牌或实体时,你可以选择将板子文本显示在屏幕上,或者将文本作为书籍交给玩家——也可以同时执行这两种操作,或者都不执行。/sb sign show_board 和 /sb entity show_board 命令用于切换是否在屏幕上显示板子的文本。如果你更倾向于给玩家一本包含文本的书,/sb sign give_book 和 /sb entity give_book 命令用于切换该功能。你也可以使用这些命令来同时在屏幕上显示板子并发放书籍,或者既不显示板子也不发放书籍。
使用 /sb sign status 和 /sb entity status 来检查所有已定义选项的状态。
从 1.6.12 版本开始,命令 /sb board give_as_book [boardname] [playername] 可用于立即将特定板子的内容以书籍形式交给玩家。此命令可用于告示牌或实体的 "run" 命令中,以便仅在点击告示牌或实体时发放相应的书籍,而不是在玩家看向它时发放。
格式化书籍
SignBoard 会自动将你的板子文本转换为适合放入书籍的格式(当 show_book 启用时)。由于书中行的大小记分板上的行大小差异很大,且书籍有分页,SignBoard 会尝试整齐地换行和分页,但可能需要一些微调。
以下是一些帮助你完成此操作的提示:
- 仅包含 &r 的板子行在书中将显示为空白行。
- 在板子的任何位置使用 \n 来断开当前的书行。当板子在屏幕上显示时,\n 将被忽略。
- 当 SignBoard 断开长行时,它会尝试在完整单词边界处断开,并适当插入空格。但你可能需要管理某些板子行末尾或开头的空格。
- 如果 SignBoard 发现一行由单个字符重复多次组成(如 '================'),它不会将该行分成两个书行,而是将其缩短以适应单个书行。
在点击告示牌或攻击/击杀实体时运行命令
正如你可以将板子附加到告示牌和实体上一样,你还可以附加命令 ,这些命令将在特定时间运行。这些可以是管理员在游戏中发出的任何命令。命令将仿佛是由玩家发出且玩家拥有管理员权限一般运行。命令接受变量替换,就像任何 SignBoard 命令一样。
命令指定为一个序列,用竖线分隔,如 | | ... | 。
从 1.3.3 版本开始,您还可以在序列中插入延迟,语法为 [Tu],其中 T 是大于 0 的整数,u 是时间单位:'s'(秒)、'm'(分)或 'h'(时)。例如,序列 [5s] | | [2m] | 在执行时将先等待 5 秒,然后再等待额外的 2 分钟。请谨慎使用延迟;即使玩家不再注视该告示牌/实体,甚至已离开服务器,延迟的命令仍会执行。
某些命令只能从服务器控制台运行。从 1.6.13 版本开始,您可以在命令前添加前缀 _rfc_,以指示 SignBoard 从服务器控制台运行该命令。如下所示:/sb sign before _rfc_ tell Ebaldino hi。
以下 SignBoard 命令用于控制发生的行为及其时机:
使用 /sb sign status 和 /sb entity status 检查所有已定义选项的状态。
变量
可在您的面板的任何位置使用这些变量。请确保包含 "{" 和 "}"。
当面板向玩家显示时,变量将被替换为其实时值。
- {ServerDate} = 当前日期。
- {ServerTime} = 当前服务器时间。
- {PlayersNow} = 当前在线玩家数量。
- {PlayersMax} = 服务器最大玩家容量。
- {PName} = 玩家名称。
- {PDisplayName} = 玩家显示名称。
- {PHealth} = 玩家生命值。
- {PCoords} = 玩家当前位置坐标。
- {PMobKills} = 玩家击杀的生物数量。
- {PKills} = 玩家击杀的其他玩家数量。
- {PDeaths} = 玩家死亡次数。
- {PTimeAlive} = 玩家上次死亡后存活的时间。
- {PMoney} = 玩家的货币余额(需要 Vault 插件支持)。
Placeholder API
Placeholder API 自 Signboard 1.1.8 版本起开始提供支持。这允许你在告示牌中使用来自众多其他插件的变量(“占位符”),以及一个庞大的“原生” Placeholder API 变量列表。
要使用 Placeholder API,请下载该插件并将其放入你的 plugins 文件夹中,然后重启服务器。在游戏中,输入命令 /papi ecloud list all 并查找你想要的占位符组。然后点击它并确认下载命令。之后,你只需像使用变量一样在告示牌上使用这些占位符,并用 '%' 符号包裹它们(%占位符名%)。
Placeholder API 的原生变量及其所属组列于 此处。
FeatherBoard 兼容性
从 1.4.9 版本开始,SignBoard 使用 FeatherBoard API 以实现开箱即用的兼容性。特别感谢 jamisen10 让我注意到了 FB API。
在 1.4.8 及更早版本中,SignBoard 实现了一种基于命令的 FeatherBoard 兼容性变通方案。它会检测 FeatherBoard(FB)是否存在,然后在向用户展示看板之前执行 "/fb off -s"(为该用户关闭 FB),并在用户离开时执行 "/fb on -s"(重新开启 FB)。
如果你有另一个计分板插件导致 SignBoard 无法正确显示其面板,且该插件具有如上所述的“关闭”和“开启”命令,你可以使用 config.yml 中的 "cmd_before" 和 "cmd_after" 选项来实现与 FeatherBoard 相同的“关闭/开启”机制。你也可以针对单个面板使用面板命令执行相同的操作。特别感谢 gmalone 帮助我解决了这个问题!
分类(Categories)
分类允许你向不同的玩家群体展示不同的内容。
这是一个非常强大的功能,可以让你实现一些有趣的操作,例如:
- 以玩家偏好的语言向他们展示内容。这不是翻译功能——你仍然需要创建不同语言的内容,但你可以将单个面板附加到告示牌或实体上,让 SignBoard 根据查看它的玩家选择并显示相应版本的面板。
- 为不同的角色职业展示特定的面板。当法师查看地牢房间里的告示牌时,他们会看到你为法师准备的面板;当战士查看同一块告示牌时,他们会看到为战士准备的面板,依此类推。
- 为不同的玩家等级展示特定的面板。当黄金(Gold)玩家查看仓库里的告示牌时,他们会看到你为黄金玩家准备的面板;当白金(Platinum)玩家查看同一块告示牌时,他们会看到为白金玩家准备的面板……
这不仅仅适用于语言或职业!分类也适用于你能想到的任何其它玩家群体!
它是如何工作的?这取决于你的服务器是否使用了权限(permissions):
1. 在使用权限的情况下设置分类
- 每个现有的权限,例如 lang.ptbr,都被视为一个分类。
- 要创建属于某个分类的面板,只需通过 /sb board new、copy 或 rename 创建面板,并在新面板名称末尾添加 ^(分类分隔符)加上分类名称。因此,如果原始面板名为 signboard,新面板将被命名为 signboard^lang.ptbr。
就是这样。每当拥有 lang.ptbr 权限的玩家查看附加了 signboard 面板的告示牌/实体时,将显示 signboard^lang.ptbr。
请把你目前所有现有的面板都视为属于空白“默认”分类。你可以创建任意你喜欢的新分类。
重要提示:请记住,被授权(opped)的玩家拥有所有权限,因此他们总是像获得了该权限一样看到对应分类的面板。为了设置和测试此功能,最好使用未被授权的普通玩家进行测试。
2. 在不使用权限的情况下设置分类
如果你不使用权限,则需要手动创建分类,将其分配给玩家,然后创建分类面板。
- 使用 /sb cat new [categoryname] 创建新分类。例如:/sb category lang.ptbr
- 使用 /sb cat assignplr [categoryname] [playername] 将分类分配给玩家
- 通过创建面板(使用 /sb board new、copy 或 rename)并在其名称末尾添加 ^(分类分隔符)加上分类名称来制作分类面板。因此,如果原始面板名为 signboard,且分类为 lang.ptbr,则新面板将被命名为 signboard^lang.ptbr。
就是这样。每当拥有 lang.ptbr 分类的玩家查看附加了 signboard 面板的告示牌/实体时,将显示 signboard^lang.ptbr。
请把你目前所有现有的面板都视为属于空白“默认”分类。你可以创建任意你喜欢的新分类。
分类 - 其他(非常有用的)信息:
- 请记住,每个权限都被视为一个类别。
- 请记住,拥有 op(管理员)权限的玩家拥有所有权限,因此他们始终会看到仿佛已授予该权限的类别面板。为了设置和测试此功能,最好使用非 op 玩家。
- 当你将面板附加到告示牌或实体上时,SignBoard 始终会附加“根”面板,而不是包含类别指定的那个面板(即 signboard 面板,而非 signboard^lang.ptbr 面板)。
- “^”字符默认为类别分隔符。如果此字符出现在面板名称中,其后的所有内容将被视为类别名称。此默认字符可在 config.yml 中更改——请务必选择一个你从未在现有面板名称中使用过的字符。并尽量保持类别名称简短。
- 你可以拥有属于多个类别的面板;例如:welcomeTavern1^ptbr^fighters, welcomeTavern1^enus^fighters, welcomeTavern1^ptbr^wizards 等。
- 你可以通过两种不同方式将玩家分配到多个类别:(a) 多次使用 /sb category assignplr [categoryname] [playername];(b) 使用 /sb playercat [playername] assign [categoryname1] [categoryname2] ... [categorynameN]。或者简单地授予他们相应的权限即可。
- 如果玩家查看属于多个类别的面板,则必须已被分配到所有这些类别(或拥有相应权限),才能显示正确的面板。否则,他们将看到默认面板。请尽量减少具有多个类别的面板数量,否则这将难以管理。
- 重要提示: 在创建属于多个类别的面板时,请注意不要重复类别类型。也就是说,拥有 welcomeTavern1^ptbr^wizards(语言 + 职业)是可以的,但拥有 welcomeTavern1^ptbr^esco(语言 + 语言)是不行的——这会使 SignBoard 尝试匹配同时具备 ^ptbr 和 ^esco 的玩家,换句话说,就是希望同一时间显示葡萄牙语和西班牙语的玩家。如果你愿意,没有什么能阻止你这样做,但我们强烈不建议这样做,因为情况很快就会变得混乱。
命令
根命令别名
SignBoard 的标准根命令是 /sb。由于其他插件也可能使用 /sb,SignBoard 支持四个命令别名。但仅仅拥有别名并不能阻止 SignBoard 在你每次尝试使用那些其他插件时做出响应。因此,SignBoard 允许你选择它将响应的根命令别名。
SignBoard 可以响应以下五个根命令中的任何一个:/sb /signboard /sbd /sbrd /signbd。
config.yml 中的 active_aliases 参数控制实际使用的是哪些命令。例如,以下配置行将使 SignBoard 接受全部 5 个根命令:
active_aliases: sb signboard sbd sbrd signbd
默认情况下,只有三个选项处于激活状态(sb sbd signboard),但你可以根据需要随意组合,以确保与服务器中其他插件的兼容性。列表中的第一个选项将是所有 SignBoard 帮助文本中展示的命令(通常为 "/sb")。
玩家命令
信息命令
- /sb help - 显示插件描述和命令。
- /sb howto - SignBoard 的分步操作指南。
- /sb variables - 列出所有可用变量及其用法。
面板命令
- /sb board new [boardname] - 创建用于告示牌的新面板。
- /sb board list - 列出你的所有面板及其附件。
- /sb board list [boardname] - 列出特定面板的内容。
- /sb board clear [boardname] - 清空面板内容。
- /sb board copy [boardname] [newname] - 将面板 'boardname' 复制为 'newname'。
- /sb board delete [boardname] - 删除名为 'boardname' 的面板。
- /sb board rename [boardname] [newname] - 将面板 'boardname' 重命名为 'newname'。
- /sb board [boardname] lineX text - 编辑面板的第 X 行,将其替换为 'text'。
- /sb board [boardname] lineX-Y text - 用 text 中的行替换第 X 到 Y 行的内容(使用 \n 表示换行)。
- /sb board [boardname] linepushX text - 将 'text'(以 \n 分隔)中的任何行插入到公告板中,从第 X 行开始,并将现有内容向下推移。
- /sb board give_as_book [boardname] [playername] - 将公告板的文本作为书交给指定玩家。
设置 命令
- /sb set new [setname] = [board1] [board2] ... [board n] - 创建一组新的公告板集合。
- /sb set delete [setname] - 删除名为 'setname' 的集合。
- /sb set list - 列出你所有的集合
- /sb set list [setname] - 列出构成特定集合的公告板
告示牌 命令
- /sb sign lineX text - 编辑你正在查看的告示牌,用 'text' 替换第 'X' 行(1-4)。
- /sb sign attach [boardname] - 将公告板附加到告示牌上。
- /sb sign detach [boardname] - 从告示牌上移除任何已附加的公告板。
- /sb sign status - 显示告示牌选项的当前状态。
- /sb sign show_board - 切换附着在告示牌上的屏幕内公告板的显示。
- /sb sign give_book - 是否将公告板文本作为书籍发放(切换)。
- /sb sign before <cmd|cmd> - 当玩家看向告示牌时运行的一系列命令列表。
- /sb sign after <cmd|cmd> - 当玩家移开视线离开告示牌时运行的一系列命令列表。
- /sb sign onclick <cmd|cmd> - 当玩家点击告示牌时运行的一系列命令列表。
- /sb sign onshiftclick <cmd|cmd> - 当玩家Shift+点击告示牌时运行的一系列命令列表。
- /sb sign onrightclick <cmd|cmd> - 当玩家右键点击告示牌时运行的一系列命令列表。
- /sb sign onrightshiftclick <cmd|cmd> - 当玩家Shift+右键点击告示牌时运行的一系列命令列表。
实体 命令
- /sb entity attach [boardname] - 将公告板附加到(非玩家)生物实体上。
- /sb entity detach [boardname] - 从生物实体上移除任何已附加的公告板。
- /sb entity status - 显示实体选项的当前状态。
- /sb entity show_board - 切换附着在实体上的屏幕内公告板的显示。
- /sb entity give_book - 是否将公告板文本作为书籍发放(切换)。
- /sb entity nametag [ignore|hide|show]- 确定附着有公告板的实体的名称标签在向玩家展示公告板时是否可见。
- /sb entity before <cmd|cmd> - 当玩家看向实体时运行的一系列命令列表。
- /sb entity after <cmd|cmd> - 当玩家移开视线离开实体时运行的一系列命令列表。
- /sb entity onattack <cmd|cmd> - 当玩家攻击实体时运行的一系列命令列表。
- /sb entity onkill <cmd|cmd> - 当玩家击杀实体时运行的一系列命令列表。
分类命令(仅限OP):
- /sb cat new [categoryname] - 创建一个新的分类。
- /sb cat delete [categoryname] - 删除一个分类。
- /sb cat assigncat [playername] [categoryname1] [categoryname2] ... [categorynameN] - 为玩家分配多个分类。
- /sb cat assignplr [categoryname] [playername1] [playername2] ... [playernameN] - 将多个玩家分配到某个分类。
- /sb cat unassign [categoryname] [playername] - 将玩家从分类中移除。
- /sb cat list - 列出已有的分类(不包括权限)。
- /sb cat status [categoryname] - 显示某个分类的状态。
- /sb cat [playername] - 显示某玩家的分类(不包括权限)。
管理员命令
- /sb board list all - 列出所有玩家的公告板名称
- /sb set list all - 列出所有玩家的所有集合
- /sb reload - 重新加载 config.yml 设置
- /sb version - 显示正在运行的 SignBoard 版本或显示某个版本的更改历史(例如 /sb version 1.6.5)。
- /sb cleanup - 清理 signs.yml 和 attachments.yml 中在 SignBoard 未运行时于游戏中被删除的任何告示牌。除非你确定 yml 文件中有‘无效’的告示牌,否则不要使用此命令。请备份你的 signs.yml 和 attachments.yml,并确保在运行此命令前所有世界都已加载。
自动更新
默认情况下,SignBoard 会在你重启或重载服务器时自动下载并安装新更新。
你可以通过更改 config.yml 中的 updates: 选项来控制此功能。
updates: 的有效值为:
- auto(自动下载并安装新版本);
- check(仅检查是否有新版本可用);
- off(完全关闭更新)。
控制台始终会显示更新检查消息。
更新后,OP 会收到一条一次性消息,告知他们有关新版本的详细信息。他们可以使用命令 /sb version 查看版本历史。
Auto config.yml 更新
无需手动更新 config.yml 中的偏好设置!!
当新版本被下载并安装时,SignBoard 将自动更新 config.yml 文件,保留您的自定义设置。
config.yml 中的设置
以下是 config.yml 中的默认设置:
#-----:-------------------------------------------------------------------------------------------------------------------------
# SignBoard config.yml
# 如果 SignBoard 的自动更新处于激活状态,config.yml 文件也将自动更新
# 当 config.yml 被更新时,您对设置 VALUES 所做的所有更改都将被 PRESERVED 并复制到新的 config.yml 中
# ... 然而,您对此文件中 COMMENTS 所做的任何更改都将被默认注释覆盖。
#-----:-------------------------------------------------------------------------------------------------------------------------
# 自动更新:
# updates 的可能取值:
# auto(自动下载并安装新版本);
# check(仅检查是否有新版本可用);
# off(完全关闭更新)。
updates: auto
# Config.yml 版本 - 如果此版本低于实际的 SignBoard 版本(使用 /sb version 查看),则意味着您可能需要手动合并 config.new 和 config.yml。此外,您还应从 jar 包中手动获取新的语言文件并进行手动合并。真的,使用自动更新要简单得多。
# 如果 updates=auto 且此版本低于实际的 SignBoard 版本,它将在下次服务器重启时触发 config.yml 和语言文件的自动更新。
version: 1.6.15
# 默认语言区域设置 - 指定用于所有游戏内文本的默认语言文件。语言文件位于 Locales 文件夹中,必须遵循相同的命名模式(例如 sblocale_enUS.yml)
# 可以开启或关闭额外语言文件的使用 - 见下方的 players_use_locales。
default_locale: enUS
# players_use_locales - 允许每个玩家通过激活命令 /sb locales list、/sb locales set、/sb locales clear 来选择自己的语言环境
# 即使 players_use_locales 为 false,SignBoard 也始终会使用默认语言文件。语言文件位于 Locales 文件夹中,必须遵循相同的命名模式(例如 sblocale_enUS.yml)
players_use_locales: true
# 类别分隔符 - 在板名称中,出现在此字符之后的所有内容都将被视为类别名称
# 如果您在已使用该分隔符的板之后更改类别分隔符,则必须删除这些板或在 boards.yml 中手动编辑它们的名称以使用新的分隔符。
# 如果您选择编辑 boards.yml,请务必极其小心地操作,并且除了分隔符字符外不要更改任何其他内容,否则您的板可能会停止工作。
category_separator: ^
# 切换 SignBoard 控制台中消息的颜色显示:
msg_color_onconsole: true
# 切换在安装更新后在游戏内向 OP 显示的一次性消息。
msg_ingame_update_OP: true
# 检测 FeatherBoard 的存在,并在显示/隐藏板之前通过发出 /fb off 和 /fb on 来绕过它。
# 如果设置为 false,SignBoard 将与 FeatherBoard 出现问题,您必须自行管理任何冲突(也许通过使用权限)。
# 如果设置为 true,SignBoard 将与 FeatherBoard 协同工作,但过渡(显示/隐藏板)会变慢。
featherboard_aware: true
# Commands Before - 这些命令将在每次向玩家显示板之前立即运行。
# 此功能旨在允许您暂时禁用干扰 SignBoard 显示其板的插件。
# 但它也可以用来运行您喜欢的任何命令。所有命令都将作为玩家执行,就好像玩家是 Op 一样。
# 用 | 分隔多个命令。# 之后的所有内容都将被忽略。命令接受 SignBoard 变量。
# FEATHERBOARD 用户 - 请参阅本 config.yml 中的 featherboard_aware 选项
cmd_before: # tell {PName} about to say hey | tell {PName} hey
# Commands After - 这些命令将在每次向玩家显示板之后立即运行。
# 此功能旨在允许您重新启用干扰 SignBoard 显示其板的插件。
# 但它也可以用来运行您喜欢的任何命令。所有命令都将作为玩家执行,就好像玩家是 Op 一样。
# 用 | 分隔多个命令。# 之后的所有内容都将被忽略。命令接受 SignBoard 变量。
# FEATHERBOARD 用户 - 请参阅本 config.yml 中的 featherboard_aware 选项
cmd_after: # tell {PName} about to say bye | tell {PName} bye
# 视距:
# 您需要距离告示牌多近(以方块为单位)才能激活其板
#(请记住,墙壁告示牌实际上位于它们所朝向的方块上)。
view_distance: 5
# 实体视距:
# 您需要距离活体实体多近(以方块为单位)才能激活其板
# 记住:如果您直视活体实体的脸,效果最佳
entity_view_distance: 8
# 实体视距:
# 告示牌通过判断你注视实体左眼的程度来确定你是否在“看”某个活体实体。
# 因此,在实体左眼周围有一个半径范围,作为判定你是否在看它的阈值。
# 这个过程并不十分精确,但我们可以通过对小型实体使用稍大的半径、对大型实体使用稍小的半径,来实现更“自然”的命中/未命中判定
# radius 参数的取值范围为 0.01 到 0.15
# 小型生物半径:bat(蝙蝠)、chicken(鸡)、endermite(末影螨)、magmacube(岩浆怪)、ocelot(豹猫)、pig(猪)、rabbit(兔子)、silverfish(蠹虫)、wolf(狼)
entity_small_viewradius: 0.10
# 中型生物半径:blaze(烈焰人)、cavespider(洞穴蜘蛛)、creeper(苦力怕)、guardian(守卫者)、NPCs(非玩家角色)、pigman(僵尸猪灵)、sheep(羊)、shulker(潜影贝)、skeleton(骷髅)、slime(史莱姆)、spider(蜘蛛)、villager(村民)、witch(女巫)、zombie(僵尸)
entity_medium_viewradius: 0.06
# 大型生物半径:cow(牛)、enderdragon(末影龙)、enderman(末影人)、ghast(恶魂)、giant(巨人)、horse(马)、irongolem(铁傀儡)、mooshroom(蘑菇牛)、polarbear(北极熊)、snowman(雪傀儡)、squid(鱿鱼)、wither(凋灵)
entity_large_viewradius: 0.02
# 保留字:
# SignBoard 不允许以下单词用作告示板名称
# ……相反,它会提示用户该名称已被占用。
# 这并非用于过滤不当词汇;请尽量保持列表简短。
# 请勿更改这些行的格式,或在单词之间使用标点符号或特殊字符。
# 这些单词不区分大小写。
reserved_names:
- boards board board1 board2 board3 board01 board02 board03 signs sign sign1 sign2 sign3 sign01 sign02 sign03
- one two three four five six seven eight nine ten
- 1 2 3 4 5 6 7 8 9 10
- server admin all
# 命令别名:
# SignBoard 可以响应以下五个根命令中的任何一个:/sb /signboard /sbd /sbrd /signbd
# active_aliases 参数控制实际启用哪些命令。
# 例如,以下配置将使 SignBoard 接受全部 5 个根命令:active_aliases: sb signboard sbd sbrd signbd
# 默认情况下,只有三个选项处于激活状态,但你可以根据需要自由组合,以确保与服务器中其他插件兼容。
# 列表中的第一个选项将显示在所有 SignBoard 帮助文本中(通常为 “/sb”)。
# 不要尝试添加其他别名选项;SignBoard 仅接受这五个。
active_aliases: sb sbd signboard
# 日志记录:
# 设置为 true 以启用 SignBoard 启动过程的日志记录(仅在服务器启动时)。
# 启动期间的主要步骤会被计时并写入 log.yml。每次服务器重启时,日志都会被清空。
log_on: false
# 保留备份:
# 默认情况下,每当安装新的 SignBoard 版本时,SignBoard 都会保留其所有配置文件的副本。
# 它还会保留一份更新后的“上次正常”配置文件副本,以便在你手动损坏任何文件时,拥有备用方案并能将“上次正常”的文件复制回去。
# 要禁用此功能,请将 "keep_backups" 设置为 false。
keep_backups: true
权限
默认情况下,SignBoard 允许所有用户使用 howto、variables、sign、entity 和 board 命令,同时也允许所有 OP(管理员)使用 reload 和 version 命令。此外,附加在告示牌或实体上的所有命令在被触发时都会执行。
如需更改权限,请使用权限管理器(如 PermissionsEX)。即使用户被授予 signboard.admin 权限,也必须具备 OP 身份才能使用 reload 和 version 命令。
默认权限如下(signcmds 和 entitycmds 默认为 false,其余权限对所有玩家默认为 true):
- signboard.* - 授予所有非管理型 SignBoard 命令的访问权限
- signboard.sign - 允许编辑告示牌并将告示板附加到其上
- signboard.signcmds - 允许为告示牌指定命令
- signboard.entity - 允许将告示板附加到实体上
- signboard.entitycmds - 允许为实体指定命令
- signboard.board - 允许创建和编辑告示板
- signboard.set - 允许创建和删除集合
- signboard.book - 允许将告示板文本发放为书籍
- signboard.howto - 授予 howto 命令的访问权限
- signboard.variables - 授予 variables 命令的访问权限
- signboard.category - 授予 category 命令的访问权限
- signboard.locale - 授予 locale 命令的访问权限
- signboard.admin - 授予所有 SignBoard 命令的访问权限,包括 reload 和 version
- signboard.cmdrun.* - 启用或禁用运行附加在告示牌或实体上的所有命令
- signboard.cmdrun.signlook - 启用或禁用在注视告示牌时运行命令
- signboard.cmdrun.entitylook - 启用或禁用在注视实体时运行命令
- signboard.cmdrun.signclick - 启用或禁用在点击告示牌时运行命令
- signboard.cmdrun.signrightclick - 启用或禁用在右键点击告示牌时运行命令
- signboard.cmdrun.entityattack - 启用或禁用在攻击实体时运行命令
- signboard.cmdrun.entitykill - 启用或禁用在击杀实体时运行命令
以下是在 PermissionsEX 中显式 授予这些权限的示例;名为 "playersallowed" 的用户组中的所有玩家都将显式获得 SignBoard 的所有玩家权限:
groups:
playersallowed:
- signboard.sign
- signboard.signcmds
- signboard.entity
- signboard.entitycmds
- signboard.board
- signboard.set
- signboard.book
- signboard.howto
- signboard.variables
- signboard.locale
以下是在 PermissionsEX 中显式 拒绝某些权限的示例;名为 "playersdenied" 的用户组中的所有玩家将无法指定在查看、移开视线、点击或杀死告示牌或实体时运行的任何命令。请注意用于否定权限的额外 "-"。
groups:
playersdenied:
- -signboard.signcmds
- -signboard.entitycmds
后续步骤
捐赠
完全自愿…… :-)
统计信息披露
本插件使用插件指标系统,这意味着将收集并发送以下信息至 bstats.org:
- 您服务器的随机生成 UUID
- 您服务器上的玩家数量
- 您服务器的在线模式
- 您服务器的 Bukkit 版本
- 您系统的 Java 版本(例如 Java 8)
- 您操作系统的名称(例如 Windows)
- 您操作系统的版本
- 您操作系统的架构(例如 amd64)
- 您操作系统的系统核心数(例如 8)
- bStats 支持的插件
- bStats 支持插件的版本
如果您希望禁用统计数据收集,请进入 /plugins/bStats/config.yml 进行修改。
SignBoard v1.6.16
(For Spigot/Paper/Bukkit 1.8.7 to 1.19.3 - For details, see version support, below)
Write on signs to your heart's content
Now with multi-language support
- Attach unlimited text to signs or living entities (including armor stands, villagers, mobs and Citizens2 NPCs!).
- Give text out as a book when players look at the sign/entity.
- Run commands when the player:
- looks at a sign/entity
- looks away from a sign/entity
- clicks a sign
- attacks or kills an entity
Do you have players who speak different languages?
Or want to communicate different content to different player classes?SignBoard can now show group-specific content, so you can show players texts in different languages, or according to their player classes! Read more in the Categories section, below.
Tired of the cramped space on your signs? Now you can have an unlimited amount of text shown with your signs! You can even attach that text to living entities! AND you can attach commands to signs and entities to run at different times!
With SignBoard, you create "boards" of text and attach these boards to signs or living entities. Each board can hold up to 15 lines (a total of 600 characters per board). You can also group several boards into a "set" and use the set as a single body of text.
When players look at a sign or entity, the scoreboard area is used to show them the text on the boards. It's great for communicating... er, well, anything, really, in a game. Admins can provide players with instructions, players can show visitors detailed info about their builds, RPG games can provide detailed lore when a party enters a room... There's no limit.
In much the same way as you attach boards to signs, Signboard lets you attach boards or sets to living entities! You can attach a board or a set to a villager or an NPC, for example, and whenever a player looks at the NPC, the text will be shown. (Armor stands also work as living entities).
When players are shown a set of boards, only one board is shown at a time. Players can cycle back and forth between the boards by right- or left-clicking the sign/entity. That way, a set works like pages in a book.
You can also attach commands to both signs and entities, and control when these commands will run. Commands can be run when the player looks at a sign/entity, looks away from a sign/entity, clicks a sign, attacks or kills an entity.
As an added perk, SignBoard also lets you edit sign lines without having to break the sign and write everything from scratch - just look at a sign you've created and use the command /sb sign lineX [text] (see below).
Demo video:
(In English)
(In Spanish, courtesy of Ajneb97.)
Version support
SignBoard v1.6.3 and above support all Bukkit/Spigot/Paper versions from 1.13.3 to 1.19.3. SignBoard v1.6.2 supports all Bukkit/Spigot/Paper versions from 1.8.7 to 1.16.1.
(Signboard has its own set variables and supports Placeholder API)
Multi-language support
As of version 1.6.6, SignBoard supports different languages for its interface (menus and messages). This allows users to choose their own language preference and use the plugin in that language. Right now it has options for English (US), Portuguese (BR), and Spanish (CO), but you can translate the locale file into other languages – just make sure to share them with us, and we'll include them in future releases of SignBoard!
Check out the /sb locale commands.
The default text for new boards has also been moved into the locale files. So now when a new board is created, each player will see its default text in their (chosen) preferred language.
In fact. every line on every board gets processed for translations. So, if you were to add a line to the locale files that said , "This is a board line": "Esta é uma linha de placa" then every board containing "This is a board line" would show the translated version from the respective locale file, according to each player's preferred locale.
Installation
Just drop the jar in your plugins folder and restart the server
Basic usage
SignBoard works by letting you create "boards" and then attach those "boards" to one or more signs or to living creatures - animals, villagers, monsters, armor stands, NPCs and even real live players (only OPs can attach boards to players).
You can group boards into sets by using the /sb set command. A set then behaves like a single body of text, and the various boards it contains will be shown in sequence as the player right or left-clicks.
You can also use the /sb sign attach and /sb sign detach commands to attach or remove a board or set from a sign.
Attach and detach a board or set from a living entity with the commands /sb entity attach and /sb entity detach.
The content of the board is shown in the scorecard area, so each board can have up to 15 lines of 40 characters each.
You can use all of the text color and formatting tags normally used in Minecraft (&0 = black; &1 = dark blue;| &2 = dark green; &3 = dark acqua; &4 = dark red; &5 = dark purple; &6 = gold; &7 = grey; &8 = dark grey; &9 = blue; &a = green; &b = acqua; &c = red; &d = light purple; &e = yellow; &f = white; &k = magic; &l = bold; &m = strikethrough; &n = underline; &o = italic; &r = reset).
Getting Started
- Come up with a name for a new board
- Create a board with the command /sb board new [boardname]
- Place a sign somewhere, look at the sign and attach the board to it with the command /sb sign attach [boardname]
- If you want to attach the board to a living entity, look at it and use the command /sb entity attach [boardname]
- Look at the sign or entity - SignBoard will use the scoreboard area to show the default content for your new board
- Edit your board with the command /sb board [boardname] lineX [text] (you don't have to be looking at the sign/entity for this)
- Group several boards into a set with the /sb set command. Then attach the set to a sign or entity with /sb sign attach and /sb entity attach. When you look at the sign/entity, the first board in the set will be shown; cycle through the other boards by right- or left-clicking the sign/entity.
Tips & Notes
- Existing scoreboards are respected and will be reloaded as soon as the player looks away from the sign.
- You can only edit a sign that you could break. When you try to use a sign, SignBoard tests if you would be able to break and replace it, and only then lets you use it. You'll also be able to edit the sign with /sb sign lineX text.
- Blank lines - both in signs and on boards, you can replace a current line with a blank line; just set the line's content to &r and it'll go blank.
- You will only be able to change boards that you created, but there's nothing keeping you from using an existing board name (e.g. [boardname]) on a sign, even if that board was created by another player.
- To use the attach/detach commands on a sign, you must have the ability to break the sign. To use the attach/detach commands on an entity, you must own the board in question. Unless you're OP, in which case you can do anything :).
Editing a board's content
When you create a new board, it comes with a default content. You can edit the lines on any board in three different ways:
- /sb board [boardname] lineX [content] - changes the content of line X directly
- /sb board [boardname] lineX-Y [content] - changes the content of lines X thru Y (e.g. 1-3, or 3-1 - the order matters)
- /sb board [boardname] linepushX [content] - changes the content of lines starting on lineX, and pushes any existing lines down.
[content] can be any text, and in the last two commands it can even span multiple lines - as long as you use \n to indicate a line break.
For example, the content text 4\n text 3\n text 2 contains two line breaks, so it has text for three lines. If you use the command
/sb board [boardname] line4-3 text 4\n text 3\n text 2
you will replace the contents of line 4 with "text 4", and the contents of line 3 with "text 3"; "text 2" would be ignored, since you only specified two lines to update (4-3).
Similarly, if you use the command
/sb board [boardname] linepush4 text 4\n text 3
you will replace the contents of line 4 with "text 4", of line 3 with "text 3", AND the old contents of lines 4,3,2,1 would be "pushed down" as the new content is inserted, causing line 2 to end up with the old content for line 4, and line 1 to end up with the old content for line 3.
A few of things to remember:
- The title line is line16.
- Each line can only hold 40 characters; anything beyond that will be truncated.
- No two lines can have the same content, so if you want two lines to look the same, insert invisible &r characters in them to make them different from each other.
Showing multiple boards with board sets
Starting on version 1.3.2, SignBoard lets you show multiple boards to your players whenever they look at a sign or living entity. This is accomplished by grouping a number of boards into a set.
Use the /sb set commands to create, delete and list existing sets. Attach and detach sets from signs and entities the same way you attach/detach boards: with the /sb sign and /sb entity attach and detach commands.
Once a set is attached, the first board on the set will be shown when the player looks at the sign/entity. Then the player can cycle through the different boards by left- and right-clicking. Sets can contain as many boards as you want.
A couple of notes about entities with sets attached to them:
- Right-clicks: When a set is attached to an entity, the first right-click on the entity is taken over by SignBoard. A second right-click on the entity (within half a second), though, will be processed normally. For example, if you attach a set to a villager, a single right-click on the villager will cycle to the previous board on the set, and the villager trade GUI will not be shown. However, if you double right-click the villager, the first right click will cycle the board and the second one will bring up the trade GUI.
- Left-clicks: When a set is attached to an entity, you will have to (left) click that entity to cycle through the boards; clicking an entity normally means you're attacking and potentially damaging that entity. Therefore, when an entity has a set attached SignBoard intercepts the click and cancels the damage. The "/sb entity onattack" command will still work, but the entity will take no damage.
Giving out books
When a player looks at a sign or at an entity, you can choose to show the board text on screen or to give the text as a book to the player - or both, or neither. The commands /sb sign show_board and /sb entity show_board toggle the showing of the board's text on the screen. If you would rather give the player a book with the text, the commands /sb sign give_book and /sb entity give_book toggle that function. You can also use these commands to both show the board on the screen and give the book, or to neither show the board nor give the book.
Use the /sb sign status and /sb entity status to check the status of all options defined.
As of version 1.6.12, the command /sb board give_as_book [boardname] [playername] can be used to immediately give a certain board's content to a player as a book. This command can be used, for example, in a sign's or entity's "run" commands to give out the corresponding book only when the sign or entity is clicked on, instead of when the player looks at it.
Formatting books
SignBoard will automatically convert your board texts to place them in books (when show_book is enabled). Since the size of the lines in a book and on the scorecard are so different, and a book has page breaks, SignBoard will attempt to break the lines and the pages neatly, but some fine-tuning may be necessary.
Here are some tips to help you with that:
- Board lines containing only &r will show as blank lines on the book.
- Use \n anywhere on your boards to break the current book line. The \n will be ignored when the board is shown on-screen.
- When SignBoard breaks a long line, it will try to do so at full-word boundaries and will try to insert blank spaces as appropriate. But you may need to manage spaces at the end or beginning of certain lines on the board.
- If SignBoard finds a board line made up of a single character repeated several times (like '================'), instead of breaking that line in two book lines, it will shorten it so it fits into a single book line.
Running commands on sign click or on entity attack or kill
Just as you attach boards to signs and entities, you can also attach commands that will be run at specific times. These can be any command that an admin can issue in-game. The commands will be run as if they were issued by the player and as if the player had admin authority. The commands accept variable substitution just like any SignBoard command.
Commands are specified as a sequence, separated by a vertical bar, like | | ... | .
As of version 1.3.3, you can also insert delays in the sequence, with the syntax [Tu], where T is an integer > 0 and u is a time unit: 's', 'm' or 'h'. For example, a sequence of [5s] | | [2m] | , when executed, will wait 5 seconds before running and then 2 additional minutes before running . Use the delays with care; delayed commands will be executed even if the player is no longer looking at the sign/entity, or even gone from the server.
Certain commands can only be run from the server console. As of version 1.6.13, you can prefix your command with _rfc_ to tell SignBoard to run the command from the server console. Like this: /sb sign before _rfc_ tell Ebaldino hi.
The following SignBoard commands control what happens and when:
- /sb sign before and /sb entity before - Let you specify a list of commands to be run every time a player looks at a sign or an entity, just before the board text is shown. (If the show_board option is off, the commands still run).
- /sb sign after and /sb entity after - Let you specify a list of commands to be run every time a player looks away from asign or an entity, just after the board text is hidden. (If the show_board option is off, the commands still run).
- /sb sign onclick - Lets you specify a list of commands to be run when the player clicks on the sign.
-
/sb sign onrightclick - Lets you specify a list of commands to be run when the player right-clicks on the sign.
-
/sb sign onshiftclick and /sb sign onrightshiftclick - Let you specify a list of commands to be run when the player shift-clicks or shift-right-clicks the sign, respectively.
- /sb entity onattack - Lets you specify a list of commands to be run every time the entity is attacked.
- /sb entity onkill - Lets you specify a list of commands to be run when the entity is killed.
Use the /sb sign status and /sb entity status to check the status of all options defined.
Variables
Use any of these variables anywhere in your boards. Make sure to include the "{" and "}".
When the board is shown to a player, the variables will be replaced with their real-time values.
- {ServerDate} = the current date.
- {ServerTime} = the current time.
- {PlayersNow} = the number of players on the server.
- {PlayersMax} = the max. number of players on the server.
- {PName} = the player's name.
- {PDisplayName} = the player's display name.
- {PHealth} = the player's health.
- {PCoords} = the player's current position.
- {PMobKills} = the number of mobs killed by the player.
- {PKills} = the number of players killed by the player.
- {PDeaths} = the number times the player has died.
- {PTimeAlive} = the time since the player last died.
- {PMoney} = the player's money (requires Vault).
Placeholder API
Placeholder API support started with Signboard version 1.1.8. This allows you to use variables ("placeholders") from many other plugins, in addition to an extensive list of "native" Placeholder API variables.
To use Placeholder API, download the plugin, drop it into your plugins folder and restart the server. In the game, issue the command /papi ecloud list all and look for the placeholder group you want. Then click on it and accept the command to download it. Then all you have to do is use the placeholders like variables on your boards, surrounded by '%' (%placeholder%).
Placeholder API native variables and their groups are listed here.
FeatherBoard Compatibility
As of version 1.4.9, SignBoard uses the FeatherBoard API for out-of-the-box compatibility. A special thanks to jamisen10 for bringing the FB API to my attention.
Up to version 1.4.8, SignBoard, implemented a command-based FeatherBoard compatibility workaround. It detected the presence of FB and then issued "/fb off -s" just before showing a board to a user (to turn FB off for that user), and then "/fb on -s" when the user moved away (to turn FB back on).
If you have another scorecard plugin that is keeping SignBoard from properly showing its boards, and that plugin has "off" and "on" commands such as those described above, you can use the "cmd_before" and "cmd_after" options in config.yml to implement the same "off/on" mechanism as for FeatherBoard. Or you can do the same for individual boards, using the board commands. A special thanks to gmalone for helping me work out this solution!
Categories
Categories allow you to communicate different content to different groups of players.
This is a very powerful feature that lets you do some interesting things, for example:
- Show your players content in their preferred language. This is not a translation feature - you still have to create the content in the different languages, but you can attach a single board to a sign or entity, and have SignBoard pick the right version of that board to show, depending on the player who's looking at it.
- Show specific boards for different character classes. When a wizard looks at a sign in a dungeon room, they will see the board you prepared for wizards; when a fighter looks at the same sign, they will see the board for fighters, and so on.
- Show specific boards for different player ranks. When a Gold player looks a sign in a Depot, they will see the board you prepared for Gold players; when a Platinum player looks at the same sign, they will see the board for Platinum players...
And it's not just for languages or classes! Categories also work for any other groups of players you can think of!
How does this work? It depends on whether or not you use permissions on your server:
1. CATEGORIES IF YOU USE PERMISSIONS
- Every existing permission, for instance, lang.ptbr, is considered a category.
- To create boards that belong to a category, simply create (with /sb board new, copy, or rename) the board and add ^ (the category separator) plus the name of the category at the end of the new board. So if the original board was signboard, the new board will be called signboard^lang.ptbr.
That's it. Whenever a player who has lang.ptbr permission looks at a sign/entity where the signboard board is attached, signboard^lang.ptbr will be shown instead.
Just think of all your currently existing boards as belonging to a blank "default" category. And you can create any new category you like.
IMPORTANT: Remember that opped players have all permissions, so they will always see the category board as if they had been given that permission. For setting up and testing this feature, it's best to use a de-opped player.
2. CATEGORIES IF YOU DON'T USE PERMISSIONS
If you don't use permissions, you will need to create the categories, assign them to players, and then create the category boards.
- Use /sb cat new [categoryname] to create a new category. For example: /sb category lang.ptbr
- Use /sb cat assignplr [categoryname] [playername] to assign the category to a player
- Make a category board by creating a board (with /sb board new, copy, or rename) and adding ^ (the category separator) plus the name of the category at the end of the new board. So if the original board was signboard, and the category was lang.ptbr the new board will be called signboard^lang.ptbr.
That's it. Whenever a player who has the lang.ptbr category looks at a sign/entity where the signboard board is attached, signboard^lang.ptbr will be shown instead.
Just think of all your currently existing boards as belonging to a blank "default" category. And you can create any new category you like.
CATEGORIES - ADDITIONAL (VERY USEFUL) INFORMATION:
- Remember that every permission is considered a category.
- Remember that opped players have all permissions, so they will always see the category board as if they had been given that permission. For setting up and testing this feature, it's best to use a de-opped player.
- When you attach a board to a sign or entity, SignBoard will always attach the "root" board, not the one containing the category specification (i.e., the signboard board, NOT the signboard^lang.ptbr board).
- The "^" character is the category separator by default. If this character appears on a board name, everything after it will be considered a category name. This default character can be changed in config.yml - make sure to pick a character that you have never used in your pre-existing board names. And try to keep your category names short.
- You can have boards that belong to multiple categories; e.g. ; welcomeTavern1^ptbr^fighters, welcomeTavern1^enus^fighters, welcomeTavern1^ptbr^wizards, etc.
- You can assign players to multiple categories in two different ways: (a) use /sb category assignplr [categoryname] [playername] several times; (b) use /sb playercat [playername] assign [categoryname1] [categoryname2] ... [categorynameN]. Or simply give them the corresponding permissions.
- If a player looks at a board that belongs to multiple categories, the player must have been assigned to ALL those categories (or permissions) in order to be shown the right board. Otherwise, they will be shown the default board. Try to keep the number of boards with multiple categories to a minimum, otherwise this will be difficult to manage.
- IMPORTANT: When creating boards that belong to multiple categories, be careful not to repeat category types. That is, it's OK to have welcomeTavern1^ptbr^wizards (language + class) but it is NOT OK to have welcomeTavern1^ptbr^esco (language + language) - this would make SignBoard try to match a player with both ^ptbr and ^esco, in other words, a player that should be shown both Portuguese and Spanish at the same time. There's nothing to prevent you from doing this if you want, but we seriously discourage you from doing it, as things can get confusing very fast.
Commands
Root Command Aliases
The standard root command for SignBoard is /sb. Since other plugins may also use /sb, SignBoard supports four command aliases. But simply having an alias doesn't keep SignBoard from responding every time you try to use those other plugins. So SignBoard lets you choose which root command aliases it will respond to.
SignBoard can respond to any of these five root commands: /sb /signboard /sbd /sbrd /signbd.
The active_aliases parameter in config.yml controls which ones are actually used. For example, the following configuration line would make SignBoard accept all 5 root commands:
active_aliases: sb signboard sbd sbrd signbd
By default, only three options are active (sb sbd signboard), but you can mix and match as needed to ensure compatibility with other plugins in your server. The first option on the list will be the one featured on all of SignBoard's help texts (usually "/sb").
Player commands
Information commands
- /sb help - Shows plugin description and commands.
- /sb howto - Step by step instructions for SignBoard.
- /sb variables - Lists all variables available and how to use them.
Board commands
- /sb board new [boardname] - Create a new board for use in signs.
- /sb board list - List all your boards - and their attachments.
- /sb board list [boardname] - List the contents of a specific board.
- /sb board clear [boardname] - Clears the content of a board.
- /sb board copy [boardname] [newname] - Copies board 'boardname' to 'newname'.
- /sb board delete [boardname] - Delete the board named 'boardname'.
- /sb board rename [boardname] [newname] - Rename board 'boardname' to 'newname'.
- /sb board [boardname] lineX text - Edit line X on the board, replacing it with 'text'.
- /sb board [boardname] lineX-Y text - Replaces the content of lines X thru Y with the lines in text (use \n to indicate line breaks).
- /sb board [boardname] linepushX text - inserts any lines in 'text' (separated by \n) into the board, starting on line X and pushing the existing content down.
- /sb board give_as_book [boardname] [playername] - gives the board's text to the specified player as a book.
Set commands
- /sb set new [setname] = [board1] [board2] ... [board n] - Create a new set of boards.
- /sb set delete [setname] - Delete the set called 'setname'.
- /sb set list - List all your sets
- /sb set list [setname] - List the boards that make up a specific set
Sign commands
- /sb sign lineX text - Edit the sign you're looking at, replacing line 'X' (1-4) with 'text'.
- /sb sign attach [boardname] - Attaches a board to a sign.
- /sb sign detach [boardname] - Detaches any board from a sign.
- /sb sign status - Shows the current state of the sign's options.
- /sb sign show_board - Toggles the on-screen board attached to the sign.
- /sb sign give_book - Whether or not the board text should be given as a book (toggle).
- /sb sign before <cmd|cmd> - A list of commands to run when player looks at the sign.
- /sb sign after <cmd|cmd> - A list of commands to run when player looks away from sign.
- /sb sign onclick <cmd|cmd> - A list of commands to run when player clicks the sign.
- /sb sign onshiftclick <cmd|cmd> - A list of commands to run when player shift-clicks the sign.
- /sb sign onrightclick <cmd|cmd> - A list of commands to run when player right-clicks the sign.
- /sb sign onrightshiftclick <cmd|cmd> - A list of commands to run when player right-shift-clicks the sign.
Entity commands
- /sb entity attach [boardname] - Attaches a board to a (non-player) living entity.
- /sb entity detach [boardname] - Detaches any board from a living entity.
- /sb entity status - Shows the current state of the entity's options.
- /sb entity show_board - Toggles the on-screen board attached to the entity.
- /sb entity give_book - Whether or not the board text should be given as a book (toggle).
- /sb entity nametag [ignore|hide|show]- Determines whether the nametag of an entity with a board attached will be visible or not when the player is shown the board.
- /sb entity before <cmd|cmd> - A list of commands to run when player looks at the entity.
- /sb entity after <cmd|cmd> - A list of commands to run when player looks away from entity.
- /sb entity onattack <cmd|cmd> - A list of commands to run when player attacks the entity.
- /sb entity onkill <cmd|cmd> - A list of commands to run when player kills the entity.
Category commands (OP only):
- /sb cat new [categoryname] - Creates a new category.
- /sb cat delete [categoryname] - Deletes a category.
- /sb cat assigncat [playername] [categoryname1] [categoryname2] ... [categorynameN] - Assign multiple categories to a player.
- /sb cat assignplr [categoryname] [playername1] [playername2] ... [playernameN] - Assign multiple players to a category.
- /sb cat unassign [categoryname] [playername] - Unassign a player from a category.
- /sb cat list - List existing categories (not permissions).
- /sb cat status [categoryname] - Displays the status of a category.
- /sb cat [playername] - Displays categories (not permissions) for a player.
Admin commands
- /sb board list all - Lists board names for all players
- /sb set list all - Lists all sets for all players
- /sb reload - reloads config.yml settings
- /sb version - shows the SignBoard version running or displays a version's change history (i.e /sb version 1.6.5).
- /sb cleanup - cleans signs.yml and attachments.yml of any signs that were deleted in the game while SignBoard wasn't running. Don't use this unless you're sure there are 'dead' signs in the yml files. Backup your signs.yml and attachments.yml, and make sure all your worlds are loaded before running this command.
Auto updates
By default, SignBoard will automatically download and install new updates when you restart or reload the server.
You can control this feature by changing the updates: option in config.yml.
Valid values for updates: are:
- auto (downloads and installs new versions automatically);
- check (only checks if a new version is available);
- off (turns off updates completely).
An update check message will always be shown on the console.
After an update, OPs receive a one-time message telling them about the new version. They can check version history with the command /sb version .
Auto config.yml updates
No need to update your preferred settings in config.yml !!
When a new version is downloaded and installed, SignBoard will update the config.yml file preserving your custom settings automatically.
Settings in config.yml
The following are the default settings in config.yml:
#-----:-------------------------------------------------------------------------------------------------------------------------
# SignBoard config.yml
# If auto update is active for SignBoard, the config.yml file will be automatically updated as well
# When config.yml is updated, all changes you made to the VALUES of the settings will be PRESERVED and copied over to the new config.yml
# ... however, any changes you made to the COMMENTS in this file will be overwritten by the default comment.
#-----:-------------------------------------------------------------------------------------------------------------------------
# Auto updates:
# Possible values for updates:
# auto (downloads and installs new versions automatically);
# check (only checks if a new version is available);
# off (turns off updates completely).
updates: auto
# Config.yml version - if this is lower than the actual SignBoard version (use /sb version), it means you probably should do a manual merge of config.new and config.yml. Also, you should manually get the new locale files from the jar and manually merge those as well. Really, it's A LOT EASIER to use auto updates.
# If updates=auto and this version is lower than the actual SignBoard version, it will trigger an automatic config.yml and locale files update on the next server restart.
version: 1.6.15
# default language locale - specifies the default locale file to use for all in-game texts. Locale files are in the Locales folder, and must follow the same name pattern (e.g. sblocale_enUS.yml)
# the use of additional locale files can be turned on and off - see players_use_locales, below.
default_locale: enUS
# players_use_locales - allows every player to choose their own locale by activating the commands /sb locales list, /sb locales set, /sb locales clear
# Even if players_use_locales is false, SignBoard will always use the default locale file. Locale files are in the Locales folder, and must follow the same name pattern (e.g. sblocale_enUS.yml)
players_use_locales: true
# Category separator - in board names, anything that appears after this character will be considered a category name
# If you change the category separator after having boards that use it, you will have to either delete those boards or manually edit their names in boards.yml so they use the new separator.
# If you choose to edit boards.yml, DO IT WITH EXTREME CARE and don't change ANYTHING other than the separator character, or your boards may stop working.
category_separator: ^
# Toggle the use of color on SignBoard console messages:
msg_color_onconsole: true
# Toggle the one-time message shown to OPs in-game when an update is installed.
msg_ingame_update_OP: true
# Detect the presence of FeatherBoard and work around it by issuing /fb off and /fb on before boards are shown/hidden.
# If this is set to false, SignBoard will have problems with FeatherBoard and you must manage any conflicts yourself (maybe by using permissions).
# If this is set to true, SignBoard will work alongside FeatherBoard, but the transitions (showing/hiding boards) will be slower.
featherboard_aware: true
# Commands Before - these commands will be run right before showing a board to a player (every time).
# This feature was created to allow you to temporarily disable other plugins that interfere with SignBoard showing its boards.
# But it can be used to run any commands you like. All commands will be run as the player and as if the player were Op.
# Separate multiple commands with a |. Anything after a # will be ignored. Commands accept SignBoard variables.
# FEATHERBOARD users - see the featherboard_aware option in this config.yml
cmd_before: # tell {PName} about to say hey | tell {PName} hey
# Commands After - these commands will be run right after showing a board to a player (every time).
# This feature was created to allow you to re-enable other plugins that interfere with SignBoard showing its boards.
# But it can be used to run any commands you like. All commands will be run as the player and as if the player were Op.
# Separate multiple commands with a |. Anything after a # will be ignored. Commands accept SignBoard variables.
# FEATHERBOARD users - see the featherboard_aware option in this config.yml
cmd_after: # tell {PName} about to say bye | tell {PName} bye
# View distance:
# How close (in blocks) you have to be to a sign to activate its board
# (remember that wall signs are actually located on the block they're facing).
view_distance: 5
# Entity view distance:
# How close (in blocks) you have to be to a living entity to activate its board
# Remember: works best if you look the living entity in the face
entity_view_distance: 8
# Entity view radius:
# Signboard determines if you're "looking" at a living entity by analyzing how closely you're looking at the entity's left eye.
# So there's a radius around the entity's left eye that's the threshold for saying that you're looking at it.
# This process is never very precise, but we can achieve a more "natural" hit/miss by using a slightly larger radius for small entities and a slightly smaller radius for larger entities
# The radius parameter can vary from 0.01 to 0.15
# Radius for small creatures: bat, chicken, endermite, magmacube, ocelot, pig, rabbit, silverfish, wolf
entity_small_viewradius: 0.10
# Radius for medium creatures: blaze, cavespider, creeper, guardian, NPCs, pigman, sheep, shulker, skeleton, slime, spider, villager, witch, zombie
entity_medium_viewradius: 0.06
# Radius for large creatures: cow, enderdragon, enderman, ghast, giant, horse, irongolem, mooshroom, polarbear, snowman, squid, wither
entity_large_viewradius: 0.02
# Reserved words:
# SignBoard will not allow the following words to be used for board names
# ...instead, it will tell the user the name is already taken.
# This is not meant to be a bad word filter; please try to keep the list short.
# DO NOT change the format of these lines or use punctuation or special characters among the words.
# The words are not case sensitive.
reserved_names:
- boards board board1 board2 board3 board01 board02 board03 signs sign sign1 sign2 sign3 sign01 sign02 sign03
- one two three four five six seven eight nine ten
- 1 2 3 4 5 6 7 8 9 10
- server admin all
# Command aliases:
# SignBoard can respond to any of these five root commands: /sb /signboard /sbd /sbrd /signbd
# The active_aliases parameter controls which ones are actually used.
# For example, the following configuration would make SignBoard accept all 5 root commands: active_aliases: sb signboard sbd sbrd signbd
# By default, only three options are active, but you can mix and match as needed to ensure compatibility with other plugins in your server.
# The first option on the list will be the one featured on all of SignBoard's help texts (usually "/sb").
# Don't try to add other alias options; SignBoard only accepts these five.
active_aliases: sb sbd signboard
# Logging:
# Set to true to enable logging of SignBoard's startup process (only during server start).
# The major steps that take place during startup are timed and written to log.yml. The log is cleared at each server restart.
log_on: false
# Keeping backups:
# By default, SignBoard keeps a copy of all its configuration files every time a new SignBoard version is installed.
# It also keeps an updated copy of the "last OK" configuration files, so that if you manually damage any of the files, you'll have a fallback and be able to copy the "last OK" file back.
# To disable this feature, set "keep_backups" to false.
keep_backups: true
Permissions
By default, SignBoard allows every user to use the howto, variables, sign, entity, and board commands, and also allows every OP to use the reload and version commands. Additionally, all commands attached to a sign or an entity will run when they are triggered.
To change permissions, use a permissions manager (like PermissionsEX). Even if given the signboard.admin permission, a user must be OP to use the reload and version commands.
The default permissions are as follows (signcmds and entitycmds are false by default, all of the other are true by default for all players):
- signboard.* - Gives access to all non-admin SignBoard commands
- signboard.sign - Allows editing signs and attaching boards to them
- signboard.signcmds - Allows specifying commands for signs
- signboard.entity - Allows attaching boards to entities
- signboard.entitycmds - Allows specifying commands for entities
- signboard.board - Allows creating and editing boards
- signboard.set - Allows creating and deleting sets
- signboard.book - Allows giving out board texts as books
- signboard.howto - Gives access to the howto command
- signboard.variables - Gives access to the variables command
- signboard.category - Gives access to the category commands
- signboard.locale - Gives access to the locale command
- signboard.admin - Gives access to all SignBoard commands, including reload and version
- signboard.cmdrun.* - Enables or disables running all commands attached to a sign or an entity
- signboard.cmdrun.signlook - Enables or disables running commands upon looking at a sign
- signboard.cmdrun.entitylook - Enables or disables running commands upon looking at an entity
- signboard.cmdrun.signclick - Enables or disables running commands upon clicking on a sign
- signboard.cmdrun.signrightclick - Enables or disables running commands upon right-clicking a sign
- signboard.cmdrun.entityattack - Enables or disables running commands upon attacking an entity
- signboard.cmdrun.entitykill - Enables or disables running commands upon killing an entity
Here's an example of how to explicitly GIVE these permissions in PermissionsEX; all players in the group called "playersallowed" will explicitly receive all SignBoard player permissions:
groups:
playersallowed:
- signboard.sign
- signboard.signcmds
- signboard.entity
- signboard.entitycmds
- signboard.board
- signboard.set
- signboard.book
- signboard.howto
- signboard.variables
- signboard.locale
And here's an example of how to explicity DENY some permissions in PermissionsEX; all players in the group called "playersdenied" will be prevented from specifying any commands to be run when signs or entities are looked at, looked away from, clicked or killed. Notice the extra "-" that negates the permission.
groups:
playersdenied:
- -signboard.signcmds
- -signboard.entitycmds
Next steps
- None at this point. I will entertain requests...
Donations
No pressure ... :-)
Stats Disclosure
This plugin utilizes a plugin metrics system, which means that the following information is collected and sent to bstats.org:
- Your server's randomly generated UUID
- The amount of players on your server
- The online mode of your server
- The bukkit version of your server
- The java version of your system (e.g. Java 8)
- The name of your OS (e.g. Windows)
- The version of your OS
- The architecture of your OS (e.g. amd64)
- The system cores of your OS (e.g. 8)
- bStats-supported plugins
- Plugin version of bStats-supported plugins
Go into /plugins/bStats/config.yml to disable stat collecting if you wish.
评论 0
登录后参与评分
还没有评论,来抢沙发吧