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

Problem with form

Discussion in 'Plugin Help' started by AsponPL, Jul 19, 2019.

  1. AsponPL

    AsponPL Spider Jockey

    Messages:
    47
    Hello, I have a problem with my plugin for forms, i want to this plugin was a plugin for easy access or something like that but it doesn't work and it nothing do see thats my code

    PHP:
                        case 7:
                            
    $this->getServer()->dispatchCommand(new ConsoleCommandSender(), 'sudo {$sender->getName()} feed');
                            break;
    I know i can do it with saturation and other but i want to do that like it please help me


    And don't say (LEARN PHP, SEE PHP or something like that please)
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    PHP:
    $sender->setFood($sender->getMaxFood());
     
  3. AsponPL

    AsponPL Spider Jockey

    Messages:
    47
    Thank you, i know i can do that how you but i want to See how i need to console say that
     
  4. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Just do $this->getServer()->getLogger()->info("whatever you want to print in console");
     
  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.