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

Getcommand problem

Discussion in 'Development' started by sdsd16, Jan 30, 2019.

  1. sdsd16

    sdsd16 Spider Jockey

    Messages:
    41
    GitHub:
    Danding1314
     
    Last edited: Jan 30, 2019
  2. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    If I were u I would use PlayerChatEvent or PlayerCommandPreprocessEvent
     
  3. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    From what you have, it appears you want to kick a player when they run those commands? If that's the case, scrap all your code. Do something like @xXNiceAssassinlo YT mentioned and prevent the command from being executed at all. Don't just react to the problem, prevent it. It'll be much more efficient.

    As for this line:
    PHP:
    $cd $this->getServer()->getCommand();
    You can't just throw a getSomething method call at the end of something and expect it to work. This won't work, and you haven't specified what you expected it to do, so I can't help you there.
     
    GiantQuartz likes this.
  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.