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

Simple Chat Plugin Help

Discussion in 'Development' started by EduGH7, Aug 11, 2019.

  1. EduGH7

    EduGH7 Spider

    Messages:
    9
    Hey! What should I put in the Main.php if I want to make a plugin that sends a private message to a player like the /tell but that can be use with the NPCs of slapper and don't have the name of [Server] in the chat. I don't know almost nothing about plugin development but I want to learn :D I only have this:
    <? php

    namespace masterkiller\SlapperChat;

    use pocketmine\plugin\PluginBase;
    use pocketmine\command\Command;
    use pocketmine\\CommandSender;
    use pocketmine\Player;
    use pocketmine\utils\TextFormat;

    class SlapperChat extends PluginBase {
    public function SlapperChat
     
  2. isPops

    isPops Silverfish

    Messages:
    19
    I'm making a plugin for this right now
     
  3. isPops

    isPops Silverfish

    Messages:
    19
    Last edited: Aug 11, 2019
  4. EduGH7

    EduGH7 Spider

    Messages:
    9
    Thanks! After "rca", in {player} I put the name I want the slapper have?
     
  5. isPops

    isPops Silverfish

    Messages:
    19
    no to create slapper
    you do /slapper create human nameYouWantItToBe
     
  6. isPops

    isPops Silverfish

    Messages:
    19
    Then do /slapper id
    and smack npc
    then do /slapper edit npcID addcommand rca {player} slaptell
    just like that
     
  7. EduGH7

    EduGH7 Spider

    Messages:
    9
    Oh, ok thanks
     
  8. EduGH7

    EduGH7 Spider

    Messages:
    9
    I put the command with the message I want it to say in the space of (message), like this "/slapper edit 235 addcommand rca {player} but when I click the slapper, it tells me to write the name of the player, then I write it and it says the player doesn't exists.
     
  9. isPops

    isPops Silverfish

    Messages:
    19
    yes because the player your trying to send message to doesnt exist
     
  10. isPops

    isPops Silverfish

    Messages:
    19
    after you type a name of person online that isnt yours you could then type the message and thats it
     
  11. isPops

    isPops Silverfish

    Messages:
    19
    if you change your mind about sending message to player just type cancel in chat
     
  12. EduGH7

    EduGH7 Spider

    Messages:
    9
    Ooohhh, I think you got wrong what I want to do from the beginning, I just want to use the command tell {player} with the slapper, but when it sends the message, to the player that hit it, don't have the name of [Server] and use the name of the slapper. For example: I put this command on the slapper, /slapper edit (slapperid) addcommand tell {player} (message), with this command the slapper sends a message to the player that hit it, but the message appears like this: [Server --> (Playerx)] (message). And I just want that instead of that just appears the name of the slapper and the message
     
  13. isPops

    isPops Silverfish

    Messages:
    19
    Oh that wouldve been way easier lol
     
  14. isPops

    isPops Silverfish

    Messages:
    19
    But ill make that tmw
     
  15. EduGH7

    EduGH7 Spider

    Messages:
    9
    Yeah, sorry for not explaining myself better lol
     
  16. EduGH7

    EduGH7 Spider

    Messages:
    9
    Can you reply when you make the other plugin?
     
  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.