• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

Essentials/EssentialsXMPP

来自Minecraft插件百科
Qsefthuopq留言 | 贡献2018年7月3日 (二) 12:47的版本
跳转到导航 跳转到搜索

Extensible Messaging and Presence Protocol (XMPP) 是基于XML的面向消息中间件的开放标准通信协议. 该协议最初被命名为Jabbor.

除了明显的 'XMPP' 和 'Jabber' branded services, 也有一些使用 XMPP 或提供 XMPP bridges 或 gateways to their services的设备. Google Talk, Live journal and Ovi use XMPP, while Facebook chat allow XMPP connections to their service. There are also 3rd party gateway services between XMPP and MSN and Yahoo.

打算用XMPP来使用谷歌聊天的用户需要确保你已阅读关于XMPP的更改: https://www.fsf.org/blogs/sysadmin/google-backslides-on-federated-instant-messaging-on-purpose

现在有大量可以连接多个设备的的 XMPP客户端, 例如: iChat, Trillian, Miranda, fring, Adium, bitlbee, Pidgin和Digsby.

Essentials XMPP

Essentials XMPP 拓展为BukKIT服务器提供一种XMPP网关

玩家 XMPP

使用 XMPP 设备的玩家在游戏内可以设置他们的 XMPP 地址, which allows for other players to message them when they are not connected to minecraft.

XMPP Spy

如果你对一个用户启用启用 XMPP spy, that player will get a copy of ingame messages sent to their XMPP account, as if they were connected and ingame.

控制控制台

If you allow an account to issue commands from XMPP, that user will be able to use console commands (op) similar to as if they were typing directly in the console.

查看控制台

If you register an account to have log view, the account will be forwarded messages sent the log with the matching or higher warning level. This directly replicates what you would see looking directly at the console.

使用 XMPP

When you configure XMPP, you create a new account for the server, and associate your current accounts with the one given to the server. On most services, this is akin to adding the server to your 'friends list' or 'contact list'. While 2 of the main uses of this plugin is to allow the server admins to remotely connect to the server, it is also useful to encourage contact between users on the server.

Setting your account

Users can register their own XMPP addresses by using the "/setxmpp <address>" command. Users can register any XMPP/Jabber compatible account, either accounts set up specifically for XMPP or systems which provide jabber ids. Facebook users can find out more about their XMPP service in the site tour, but essentially it would be /setxmpp <username>@chat.facebook.com. Gmail users should simply use their gmail address.

Messaging a user

To message another user you use the "/xmpp <account> <message>" command, using the players ingame name.

Chat Spy

Not every server which allows XMPP will enable xmppspy, enabling this feature will forward all ingame chat to the XMPP account. This will allow the user to chat as if they were ingame, by messaging the server's XMPP address.

配置 XMPP

Setting up the Essentials XMPP connector is fairly simple, you need to create an XMPP account, and provide the details for Essentials to use.

创建账户

Before Essentials can communicate with users XMPP accounts you first need to set it up with an account. There are several different ways you can handle this, but it is recommended that you create an account specifically for the the server.

Since XMPP is an open protocol you can set up your own XMPP server locally, or use a service provided by your ISP/Host. As long as the server connects with one of the public XMPP nodes, you will be able to communicate with users using other XMPP services.

For the sake of simplicity it will probably be easiest to create a free account with Jabber.org.

配置文件

The config file for XMPP connectivity is found in its own folder. You will find the file at /plugins/EssentialsXMPP/config.yml

xmpp:
  sasl-enabled: true
  server: 'jabber.org'
  port: 5222
  user: 'khobbits@jabber.org'
  password: 'password'

The above is an example of the configuration settings needed to connect to the jabber.org XMPP server. There are a few more options, but generally you wont need to set up a service name or use a none standard port. For your exact configuration settings you will need to check your XMPP provider.

玩家记录

You can allow XMPP users to receive server information.

log-enabled: true
log-level: info
log-users:
  - 'khobbits@gmail.com'

The above example would allow the user with the XMPP address 'khobbits@gmail.com' to receive all server log information to be forwarded to their account. The log level, is the minimum required level for which that should be forwarded to the user, values can be: info, warning, severe

管理员用户

你可以允许 XMPP 用户发送指令到服务器 (they would need to be log users to actually see any output).

op-users:
  - 'khobbits@gmail.com'

以上例子允许 XMPP 地址为 'khobbits@gmail.com'的用户来发送指令到控制台.
一些客户端也许需要 a /say or /raw to use /commands properly, if the client intercepts this.