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

Plugin work with Plugin?

Comments in 'Plugin Development' started by Marcelo234, Apr 23, 2016.

  1. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    Hey Guys......If I run this code with the Plugin "Yolo":This happens when a Player join....
    PHP:
    $this->lobby[strtolower($player->getName())] = $player;
    And this code with the Plugin "Haha" :This will happen when a Player left the game...
    PHP:
    unset($this->lobby[strtolower($player->getName())]);
    ....
    Will this work?
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    $yolo $this->getServer()->getPluginManager()->getPlugin("Yolo");

    unset(
    $yolo->lobby[strtolower($player->getName())]);
    Please learn OOP
  3. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    One Question more....I say $yolo->onYuhu($player); BUT the public function from the Plugin Yolo isnt in the Main.php......Its in a other class...How to write it than?
  4. Vaivez66
    Offline

    Vaivez66 Notable Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    402
    Plugins:
    2
    Find the function that is pointing to that (another) class...
  5. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    At least in Spain, if you want start with any programming language in an academy, the first thing that they teach you is basic ENGLISH.
    To cut straight: Learn english will be better that learn PHP/OOP.
    TutoGamerWalid and Gamecrafter like this.

Share This Page

Advertisement