Send packets to player
#3
Czesc, welcome to the forum.

We don't allow plugins to send packets because we support multiple protocol versions (from current 1.7.9 all the way down to 1.2.5) so it would be difficult for a plugin to provide all those versions.

You can send most packets indirectly by doing the actions that send those packets. You want to send a player position packet? Set the player's position. You want an "update sign text" packet? Update the sign's text.

Then there's the special "Plugin message" packet, that one can be sent and received by plugins directly, using cClientHandle:SendPluginMessage() function and HOOK_PLUGIN_MESSAGE hook. There's (currently) no way to register for the channels, though. If you want a working example, have a look at the WorldEdit plugin, it communicates with the WECUI client-side mod to provide visualisation for the player's selection.
https://github.com/mc-server/WorldEdit/b...#L250-L276
Reply
Thanks given by:


Messages In This Thread
Send packets to player - by artur9010 - 07-04-2014, 06:26 AM
RE: Send packets to player - by worktycho - 07-04-2014, 08:05 AM
RE: Send packets to player - by xoft - 07-04-2014, 05:09 PM
RE: Send packets to player - by tigerw - 07-05-2014, 12:19 AM
RE: Send packets to player - by xoft - 07-05-2014, 12:29 AM
RE: Send packets to player - by NiLSPACE - 07-05-2014, 12:37 AM
RE: Send packets to player - by worktycho - 07-05-2014, 01:27 AM
RE: Send packets to player - by NiLSPACE - 07-05-2014, 01:34 AM
RE: Send packets to player - by NiLSPACE - 08-21-2014, 12:50 AM
RE: Send packets to player - by xoft - 08-21-2014, 01:11 AM
RE: Send packets to player - by NiLSPACE - 08-21-2014, 01:15 AM
RE: Send packets to player - by LO1ZB - 08-21-2014, 01:35 AM
RE: Send packets to player - by NiLSPACE - 08-21-2014, 01:38 AM
RE: Send packets to player - by xoft - 08-21-2014, 01:46 AM
RE: Send packets to player - by NiLSPACE - 08-21-2014, 02:22 AM
RE: Send packets to player - by SamJBarney - 08-21-2014, 02:24 AM
RE: Send packets to player - by NiLSPACE - 08-21-2014, 02:31 AM



Users browsing this thread: 1 Guest(s)