你好,聊天!
一个小型插件,允许玩家在 Minecraft 服务器聊天中使用表情符号。
它与服务器(客户端)资源包配合使用,该资源包包含一个 文件,
其中包含自定义的表情符号。
这个小插件的主要功能包括:
- 体积小;
- 高级自定义:可以更改 config.yml 中的插件消息,
根据 服务器数据包 添加或删除适合各种口味的表情符号;
- 能够为一个表情符号使用多个占位符(例如,在与将 Discord 与 Minecraft 服务器集成的插件配合使用时非常有用);
- 插件使用自己的表情符号访问控制系统:现在不需要为每个表情符号堆积服务器权限了!
- 只需在聊天中按下鼠标左键即可复制表情符号的占位符;
- 能够为表情符号分配高级会员资格。
那么,第一步是什么?
插件的主配置文件可以分为两部分:
在消息文本部分,你可以为每种情况(如权限不足、玩家错误等)编写任何文本。
因此,你可以不使用前缀 Smindless,而是使用服务器名称。请注意,消息支持颜色方案。
至于表情符号定义部分,它由一组具有以下格式的表情符号组成:
[表情符号键]:
inputs: ":占位符_1:, :占位符_2:, ..., :占位符_N:"
output: 解码后的 Unicode 符号
premium: true/false
表情符号键是在管理表情符号访问权限的命令中需要指定的键。
它应该是任何不带空格的字符组合。
Inputs 是玩家必须在聊天中输入的内容,以便文本变成表情符号。必须具有 :someText: 格式。
多个占位符用逗号分隔。请记住,如果你不希望玩家手动输入很长时间才能转换为表情符号,最好使用简短的占位符。
Output 是任何输入的占位符将转换成的内容。
Premium 指示此表情符号是否为高级会员专属。它可以是 true、false 或省略。如果省略,则视为 false。
例如,对于下一个表情符号
cute:
inputs: ":cute:"
output: "逃"
Wow, it's sooo cute!:cute:
将变成
Wow, it's sooo cute!逃
这个汉字通过服务器数据包变成了一个美丽的笑脸。数据包的第一个文件
包含第 90 页上的 Unicode 字符序列,第二个文件
分别在聊天中显示这些字符。第二个文件的大小为 768 x 786 像素。该文件包含 16 x 16 个图像(表情符号)。
很容易猜到,使用此文件大小,一个表情符号的大小将为 48 x 48 像素。文件大小可以减少或增加,
但不要使用会导致表情符号大小出现小数值的情况!
主要命令
插件提供的唯一命令是 /smi。接下来,标志用于执行特定操作。
在服务器工作开始时,或者每次 config.yml 中的表情符号列表发生变化时,必须执行的最重要操作是 /smi reload 或 /smi r。
/smi r - 将表情符号列表加载到内存中,使其可供玩家使用
(如果有更改,则重新加载列表;你不需要每次都重载服务器,
只有在有更改时才需要执行此命令)
之后,你可以通过命令 /smi list 或 /smi l 检查表情符号列表。
/smi l - 获取表情符号列表。在此菜单中,你可以使用鼠标左键复制某个表情符号,然后将其粘贴到聊天中。
如果将鼠标悬停在某个表情符号上,你可以看到其占位符——这是需要在发送消息时在聊天中打印的文字,
以便表情符号出现在聊天中。

你可能已经注意到截图中的灰色表情符号——这些是玩家无法发送的表情符号,
即使玩家复制或输入了占位符也是如此。这是因为该表情符号已被禁止玩家使用,
或者玩家没有该表情符号的高级会员访问权限。要阻止或允许使用表情符号,有以下命令
/smi b {playerName} {smilePlaceholder} 和 /smi ub {playerName} {smilePlaceholder},分别对应。
/smi b {playerName} {smilePlaceholder} - 阻止指定玩家使用该表情符号的命令。
请对所有访问控制命令使用占位符,而不是表情符号本身。
禁用后,表情符号会变灰,这意味着无法访问该表情符号。
/smi ub {playerName} {smilePlaceholder} - 工作方式相同,只是相反,它会解锁表情符号。
下一组命令用于授予或撤销高级表情。
/smi g {playerName} {smilePlaceholder} - 向指定玩家授予访问高级表情的权限。
/smi ug {playerName} {smilePlaceholder} - 工作方式相同,但会移除对高级表情的访问权限。
为了避免手动处理访问控制命令,还可以查看其他玩家的可用表情列表,并通过鼠标左键(LMB)给予或收回权限。
/smi pl {playerName} - 显示指定玩家的表情列表。
使用鼠标左键可以向该玩家授予或收回特定表情的权限。

目前就这些!请注意,表情的访问权限存储在插件文件夹的两个子文件夹中——ban-list 和 premium-list。因此,你也可以通过这些子文件夹中的文件从玩家那里添加或删除表情密钥 (这些是 config.yml 文件中的密钥,不是占位符!)。
注意
目前,资源包中只有 7 个表情。要使表情正常工作,您必须在游戏的语言选择菜单中禁用 Unicode 字体支持!
目前,由于缺乏测试人力,该插件尚未得到充分测试(与 Discord 的交互尚未完全调查,但预计将提供支持)。如果您发现问题,请在 Telegram 机器人中告知我。
许可证
本项目采用 GNU AGPLv3 许可证(GNU Affero, GNU Affero General Public License Version 3)。
有问题或建议?
如果您有任何建议、想法或发现的 bug,请联系 Telegram 机器人,我将尽快回复您,并很高兴收到您的消息。请勿发送垃圾信息或侮辱性言论,否则您将被封禁。
Hello, chat!
A small plugin, that allows players to use smiles in the Minecraft server chat.
It works together with a server (client) resource pack, which contains a file
with custom smiles.
The main features of this small plugin are:
- Small size;
- Advanced customization: the ability to change plugin messages in config.yml,
add or remove smiles for every taste, depending on the server datapack;
- The ability to use multiple placeholders for a single smile (it will be useful, e.g., when used together with plugins that integrate Discord with the minecraft server);
- The plugin uses its own access control system for smiles: now it isn't needed to pile up the server permissions with perms for each smile!
- The ability to copy the placeholder of a smile by simply pressing the LMB in the chat;
- The ability to assign premium smiles.
So, what's the first step?
The main configuration file of the plugin can be divided into two parts:
- message texts;
- smiles definition.
In the message texts section, you can write absolutely any text for each situation (lack of rights, wrong player, etc.).
So instead of the prefix Smindless, you can, for example, use the name of the server. Keep in mind that messages support color schemes.
As for the smiles definition section, it consists of a set of smiles with the following format:
[Smile Key]:
inputs: ":placeholder_1:,:placeholder_2:,...,:placeholder_N:"
output: Decoded unicode symbol
premium: true/false
Smile key is the key that will need to be specified in the commands for managing access rights to the smile.
It should be any set of characters without a space.
Inputs is what the player must type in the chat in order for the text to turn into a smile. Must have a format :sometext:.
Multiple placeholders are separated by a comma. Keep in mind that it is preferable to have a short placeholder if you do
not want the player to manually enter text for a long time to convert into a smile.
Output is what any of the typed placeholders will turn into.
Premium indicates whether this smile is a premium. It can be true, false, or omitted. If omitted, it is considered as false.
For example, for the next smile
cute:
inputs: ":cute:"
output: "逃"
Wow, it's sooo cute!:cute:
will turn into
Wow, it's sooo cute!逃
This hieroglyph turns into a beautiful smile face with a server datapack. The first file
from the datapack contains a sequence of unicode characters on the 90th page, and the second file
displays these characters in the chat, respectively. The size of the second file is 768 by 786 pixels. This file contains 16 by 16 images (smiles).
It's easy to guess that the size of one smile with this file size will be 48 by 48 pixels. The file size can be reduced or increased,
but do not use sizes where the size of the smile will have fractional values!
Main commands
The only command provided by the plugin is /smi. Next, flags are used for certain operations.
The most important operation that must be performed at the beginning of the server work, or every time the list of smiles in config.yml is changed, is /smi reload or /smi r.
/smi r - loads a list of smiles into memory so that they become available to players
(or overloads the list if there have been changes; you don't need to overload the server every time,
it is enough to execute this command if there have been changes)
After that, you can check the list of smiles through the command /smi list or /smi l.
/smi l - get a list of smiles. In this menu, you can use the LMB to copy some smile, then paste it into the chat.
If you hover the mouse over some smile, you can see its placeholders - this is the text that needs to be printed in order
for the smile to appear in the chat when sending a message.

You may have noticed gray smiles in the screenshots - these are the smiles that the player won't be able to send,
even if the player copies or enters a placeholder. This is because this smile has been banned for the player or
the player doesn't have premium access for this smile. To block or allow the use of a smile, there are commands
/smi b {playerName} {smilePlaceholder} and /smi ub {playerName} {smilePlaceholder}, respectively.
/smi b {playerName} {smilePlaceholder} - the command to block the possibility of using the smile from the specified player.
Please use placeholders, not the smiles themselves, for all access control commands.
After blocking, the smile will turn gray, which means that there is no access to this smile.
/smi ub {playerName} {smilePlaceholder} - it works the same way, only on the contrary, it unlocks the smile.
The next pair of commands is to grant or revoke premium smiles.
/smi g {playerName} {smilePlaceholder} - grants the right of access to the premium smile to the specified player.
/smi ug {playerName} {smilePlaceholder} - works the same way, only it takes away access rights to the premium smile.
In order not to mess with access control commands, it is also possible to view lists of available smiles from other players,
as well as to give and take away rights using LMB.
/smi pl {playerName} - show a list of smiles for the specified player.
Use the LMB to give or take away the rights to a certain smile from the player.

That's all for now! Keep in mind that access to smiles is stored in the plugin folder in two sub-folders - ban-list and premium-list.
So you can also add or remove smiles' keys (these are the keys from the config.yml file, not placeholders!) from players through files in these sub-folders.
NOTICE
At the moment, there are only 7 smiles in the resource pack. For smiles to work, you must have disabled Unicode font support in the language selection menu in the game!
At the moment, the plugin hasn't been sufficiently tested due to the lack of human resources for testing (interaction with Discord hasn't been fully investigated, but its support is expected). Please let me know in the telegram bot if you find a problem.
License
This project uses the GNU AGPLv3 license (GNU Affero, GNU Affero General Public License Version 3).
Do you have a question or proposal?
If you have any suggestions, ideas, and also bugs found, please contact the telegram bot,
I will try to answer you as soon as possible, and I will be glad to receive your messages.
Please do not write spam or insults, otherwise you will be blocked.
评论 0
登录后参与评分
还没有评论,来抢沙发吧