Dynmap2CraftIRC3
你同时使用 dynmap 和 CraftIRC 吗?如果是的话,你可能已经注意到,在 IRC 频道聊天的人看不到通过 dynmap 的网页聊天功能发送的任何消息,反之亦然。这让我感到困扰,因为它造成了许多看起来尴尬的单方面对话,并给我的玩家带来了一般性的困惑。所以我决定修复它!
这个插件的作用是什么?
此插件将 CraftIRC 3 连接到 dynmap 的网页聊天。更具体地说,它为 CraftIRC 3 创建了一个新的标签(tag)和端点。加载此插件后,你可以在 CraftIRC 3 的 config.yml 中指定通信路径,指向标签 “dynmap”,从而允许 dynmap 的网页聊天与 CraftIRC 可能连接的任何 IRC 频道之间的聊天流通。
如何使用它?
依赖项
首先,你需要至少版本为 3.1 的 CraftIRC 和至少版本为 0.29 的 dynmap。它可能在较低版本的 dynmap 上也能工作,但未经测试。它肯定不能在 CraftIRC 2 上工作。
设置
唯一需要配置的是 CraftIRC 的 config.yml。如果你有:
setting:
...
auto-paths: true
...
那么请跳过本节,它应该会自动将你的 dynmap 网页聊天与 IRC 聊天连接起来。我不推荐这种方式,因为 auto-paths 似乎总是为我产生重复消息。如果它是 false,并且你正在手动指定通信路径(我首选的方法),那么你需要设置一些新路径才能使其正常工作:
paths:
...
- source: 'yourirctag'
target: 'dynmap'
- source: 'dynmap'
target: 'yourirctag'
...
格式化和属性配置
dynmap 网页聊天端点被配置为 “plain” 类型源,使用事件类型 “dynmap”。因此,如果你想格式化消息的外观,你会需要在 formatting 下添加一个名为 “from-plain” 的部分,其中包含一个 “dynmap” 选项,如下所示:
formatting:
from-game:
...
from-irc:
...
from-plain:
dynmap: '%green%[%source%]%o% %sender%: %message%'
此外,为了让聊天事件实际发送,你还必须在 default-attributes 部分下添加 “dynmap: true”:
default-attributes:
...
attributes:
chat: true
action: true
join: true
...
dynmap: true
与 CraftIRCDeath 一起使用
如果你希望死亡消息也出现在 dynmap 的网页聊天中,请参阅我的另一个插件 CraftIRCDeath!
截图
当你在网页聊天、游戏和 IRC 频道之间聊天时,看起来是这样的:
Dynmap 网页聊天

IRC 频道

Dynmap2CraftIRC3
Do you use both dynmap and CraftIRC together? If so you will have noticed that
people chatting in the IRC channel will not see any messages that were sent
from dynmap's webchat feature and vice versa. This annoyed me since it created
many awkward looking one sided conversations, and just caused general confusion
among my players. So I decided to fix it!
What does this do?
This plugin connects CraftIRC 3 to dynmap's webchat. More specifically, it
creates a new tag and endpoint visible to CraftIRC 3. With this plugin loaded,
you can specify communication paths in your CraftIRC 3 config.yml to point to
the tag "dynmap" to allow for chat flow between dynmap's webchat and any IRC
channels that CraftIRC may be connected to.
How do I use it?
Dependencies
First, you need CraftIRC of at least version 3.1 and dynmap at least version
0.29. It may work with lower versions of dynmap, but that hasn't been tested.
It definitely won't work with CraftIRC 2.
Setup
The only configuration required is in CraftIRC's config.yml. If you have:
setting:
...
auto-paths: true
...
Then skip this section, it should automatically connect your dynmap webchat
with IRC chat. I Don't recommend this way, as auto-paths seems to always
create double messages for me. If it's false, and you're manually specifying
your communication paths (my preferred method), then you will need to set up
some new paths for this to work:
paths:
...
- source: 'yourirctag'
target: 'dynmap'
- source: 'dynmap'
target: 'yourirctag'
...
Formatting and Attributes configuration
The dynmap webchat endpoint is configured as a "plain" source, using the event
type "dynmap". So if you wanted to format how the messages appeared, you would
add a section under formatting called "from-plain" with a "dynmap" option, like
so:
formatting:
from-game:
...
from-irc:
...
from-plain:
dynmap: '%green%[%source%]%o% %sender%: %message%'
Also, in order for the chat events to actually be sent, you must add
"dynmap: true" under the default-attributes section:
default-attributes:
...
attributes:
chat: true
action: true
join: true
...
dynmap: true
Using it with CraftIRCDeath
If you would like death messages to also appear in dynmap's webchat, see my
other plugin CraftIRCDeath!
Screenshots
This is what it looks like when you're chatting across the webchat, the game,
and an IRC channel:
Dynmap Webchat

IRC channel

评论 0
登录后参与评分
还没有评论,来抢沙发吧