1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How to change the message 4 each players?

Discussion in 'Development' started by yuko fuyutsuki, Jun 25, 2018.

  1. yuko fuyutsuki

    yuko fuyutsuki Slime

    Messages:
    77
    GitHub:
    fuyutsuki
    I want to change the message such as explanation of the command displayed by /help for each player.

    ex)
    PlayerA: ja_JP
    => "使用方法: /me こんにちは!"
    PlayerB: en_US
    => "Usage: /me Hello, good afternoon!"
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Hi there,

    Currently, the /help command in MCPE is client side, which means you need to change the command data that gets sent to the client when they join in order to change the displayed messages there.
    I think the descriptions get sent here:
    https://github.com/pmmp/PocketMine-...83fc750e9/src/pocketmine/Player.php#L670-L705
    So you can listen to DataPacketSendEvent and change the appropriate command data there depending on the player the packet gets sent to.
    I hope that works.

    Edit: Added another GitHub link
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.