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.