Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change /msg

Comments in 'Plugin Development' started by aDevPE, Feb 27, 2016.

  1. aDevPE
    Offline

    aDevPE New Member

    Joined:
    Feb 14, 2016
    Posts:
    1
    Minecraft User:
    aDevPE
    how can i change /msg , /tell ?
  2. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    In the pocketmine root code :)
    Vaivez66 likes this.
  3. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    No you can override it with CommandPreProcessEvent
    Last edited: Feb 27, 2016
    TheDeibo likes this.
  4. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    Changing the source works as well, the proper way to do it would to be unregister the command and then register your replacement or changing the executor.
  5. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    I realy think the proper way is using preprocess event
    Or unregister it lol
    Last edited: Feb 27, 2016
  6. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    There is no processor lol. It's PlayerCommandPreprocessEvent
  7. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Yeah meant that
  8. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    So your saying that checking every command executed for a specific command, canceling it then executing your code is better and more proper than un-regesitering the command and registering your command or setting the executor?
  9. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    I said "OR" unregister it
    And using the CommandEvent is much more easy.
    If you can provide an small code for unreg and reg i will shut up :)
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The proper way to do that is unregistering.

Share This Page

Advertisement