Difference between revisions of "Plugin channels"

From wiki.vg
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
'''Plugin channels''' are implemented using [[Protocol#0xFA|packet 0xFA]], allowing client mods and server plugins to communicate without cluttering up chat. [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ This post by Dinnerbone] is a good introduction and basic documentation.
 
'''Plugin channels''' are implemented using [[Protocol#0xFA|packet 0xFA]], allowing client mods and server plugins to communicate without cluttering up chat. [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ This post by Dinnerbone] is a good introduction and basic documentation.
 
{{anchor|Internal}}
 
{{anchor|Internal}}
 +
== Reserved channels ==
 +
=== <code>REGISTER</code> ===
 +
''Client to server''
 +
 +
Allows the client to register for one or more custom channels, indicating that the server should send data on those channels if the appropriate plugin is installed. Payload is a null-separated list of strings.
 +
 +
=== <code>UNREGISTER</code> ===
 +
''Client to server''
 +
 +
Allows the client to unregister from one or more custom channels, indicating that the server should stop sending data on those channels. Payload is a null-separated list of strings.
 +
 
== Channels internal to Minecraft ==
 
== Channels internal to Minecraft ==
As of 1.3, Minecraft itself started using plugin channels to implement new features. These internal channel names are prefixed by <code>MC|</code>.
+
As of 1.3, Minecraft itself started using plugin channels to implement new features. These internal channel names are prefixed by <code>MC|</code>. They are not formally registered using the REGISTER channel. The vanilla Minecraft server will send these packets regardless, and the vanilla client will accept them.
 +
 
 
=== <code>MC|BEdit</code> ===
 
=== <code>MC|BEdit</code> ===
 
''Client to server''
 
''Client to server''
Line 17: Line 29:
  
 
=== <code>MC|TPack</code> ===
 
=== <code>MC|TPack</code> ===
''Two-Way''
+
''Server to client''
  
 
Remote texture packs.
 
Remote texture packs.
This contains a string representing the url to get the texture pack from, followed by null (\0000) and then '16'.
+
This contains a string representing the url to get the texture pack from, followed by null (\0000) and then '16', all in ASCII.
  
 
===  <code>MC|TrList</code> ===
 
===  <code>MC|TrList</code> ===
''Two-Way''
+
''Server to client''
  
 
The list of trades a villager NPC is offering.
 
The list of trades a villager NPC is offering.
Line 35: Line 47:
 
== Notable community plugin channels ==
 
== Notable community plugin channels ==
 
Channels listed in this section are not Mojang-sanctioned. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.
 
Channels listed in this section are not Mojang-sanctioned. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.
 +
 +
=== <code>ML|OpenTE</code> ===
 +
''Server to client''
 +
 +
Used by [http://www.minecraftforum.net/topic/75440-v132-risugamis-mods-preliminary-updates/ ModLoader] to support custom GUI windows. Does not use the REGISTER channel.
 +
 +
=== <code>WECUI</code> ===
 +
''Two-way''
 +
 +
Used by the server-side [http://dev.bukkit.org/server-mods/worldedit/ WorldEdit] and the client-side [http://www.minecraftforum.net/topic/885099-131-worldeditcui-gui-visualizer-for-worldedit-v131/ WorldEditCUI] to coordinate selections.

Revision as of 09:14, 28 August 2012

Plugin channels are implemented using packet 0xFA, allowing client mods and server plugins to communicate without cluttering up chat. This post by Dinnerbone is a good introduction and basic documentation.

Reserved channels

REGISTER

Client to server

Allows the client to register for one or more custom channels, indicating that the server should send data on those channels if the appropriate plugin is installed. Payload is a null-separated list of strings.

UNREGISTER

Client to server

Allows the client to unregister from one or more custom channels, indicating that the server should stop sending data on those channels. Payload is a null-separated list of strings.

Channels internal to Minecraft

As of 1.3, Minecraft itself started using plugin channels to implement new features. These internal channel names are prefixed by MC|. They are not formally registered using the REGISTER channel. The vanilla Minecraft server will send these packets regardless, and the vanilla client will accept them.

MC|BEdit

Client to server

When a player edits an unsigned book.

This payload is simply a set of bytes corresponding to an ItemStack. It is serialized / deserialized exactly the same as itemstacks in packets.

MC|BSign

Client to server

When a player signs a book. This payload is simply a set of bytes corresponding to an ItemStack. It is serialized / deserialized exactly the same as itemstacks in packets.

MC|TPack

Server to client

Remote texture packs. This contains a string representing the url to get the texture pack from, followed by null (\0000) and then '16', all in ASCII.

MC|TrList

Server to client

The list of trades a villager NPC is offering.

MC|TrSel

Client to server

When a player selects a specific trade offered by a villager NPC. It contains a single int id corresponding to the selected slot int the players current (trading) inventory.

Notable community plugin channels

Channels listed in this section are not Mojang-sanctioned. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.

ML|OpenTE

Server to client

Used by ModLoader to support custom GUI windows. Does not use the REGISTER channel.

WECUI

Two-way

Used by the server-side WorldEdit and the client-side WorldEditCUI to coordinate selections.