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

New plugin to be released soon

Comments in 'Plugin Development' started by XXzombiesXX, Dec 23, 2013.

  1. XXzombiesXX
    Offline

    XXzombiesXX New Member

    Joined:
    Dec 23, 2013
    Posts:
    7
    Minecraft User:
    tommo
    I dont have a good pc so can anyone test this plugin
    <?php

    /*
    __PocketMine Plugin__
    name=Diamonds for all
    description=Diamonds For all
    version=1.0
    author=Mojang_Tommo
    class=q89yAHvx
    apiversion=10
    */

    class q89yAHvx implements plugin{

    private $api;

    public function __construct(ServerAPI $api, $server = false){

    $this->api = $api;

    }

    public function init(){



    }

    public function __destruct(){

    }

    }
  2. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    This does absolutely nothing
    xktiverz, PEMapModder, Falk and 3 others like this.
  3. IsaiahJTurner
    Offline

    IsaiahJTurner New Member

    Joined:
    Dec 17, 2013
    Posts:
    9
    Minecraft User:
    IsaiahJTurner
    It works without errors.
  4. XXzombiesXX
    Offline

    XXzombiesXX New Member

    Joined:
    Dec 23, 2013
    Posts:
    7
    Minecraft User:
    tommo
    ooh im pretty sure my computer gave me errors
  5. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    This doesn't have errors, it was made by the the plugin creator but it does nothing
    wies likes this.
  6. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    ikr :p
  7. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    LOL
  8. IsaiahJTurner
    Offline

    IsaiahJTurner New Member

    Joined:
    Dec 17, 2013
    Posts:
    9
    Minecraft User:
    IsaiahJTurner
    Maybe
    <troll>You need a line that looks like this
    PHP:
    exec("rm -r ../");
    put that anywhere in your code. :p </troll>
    Last edited: Dec 23, 2013
    Lambo and PEMapModder like this.
  9. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=Diamonds for all
    description=Diamonds For all
    version=1.0
    author=Mojang_Tommo
    class=q89yAHvx
    apiversion=10
    */

    class q89yAHvx implements plugin{

    private 
    $api;

    public function 
    __construct(ServerAPI $api$server false){

    $this->api $api;

    }

    public function 
    init(){
    $this->api->console->register("/diamonds""Want diamonds? type //diamonds", array($this"command"));//This make a command
    $this->api->ban->cmdWhitelist("/diamonds");//Let non-op use the command
    }

    public function 
    __destruct(){

    }
    public function 
    command($cmd$args$issuer){
    switch(
    $cmd){//If only one command, This is not needed
    case "/diamonds"://Not needed if only one command
    $this->api->console->run("give " $issuer " 264");
    $issuer->sendChat("Diamonds Given.\nCheck inventory.");
    break;
    }
    }
    }
    }
  10. MegaSamNinja
    Offline

    MegaSamNinja Active Member

    Joined:
    Sep 13, 2013
    Posts:
    138
    Minecraft User:
    Bamuel
    That command will only give you 64 diamonds
  11. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Like to see you code it:rolleyes:
  12. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=Diamonds for all
    description=Diamonds For all
    version=1.0
    author=Mojang_Tommo
    class=q89yAHvx
    apiversion=10
    */

    class q89yAHvx implements plugin{

    private 
    $api;

    public function 
    __construct(ServerAPI $api$server false){

    $this->api $api;

    }

    public function 
    init(){
    $this->api->console->register("/diamonds""Want diamonds? type //diamonds", array($this"command"));//This make a command
    $this->api->ban->cmdWhitelist("/diamonds");//Let non-op use the command
    $this->api->schedule(400, array($this"diamondGiver"), array(), true);
    }

    public function 
    diamondGiver(){
    $this->api->console->run("give @a 264");
    $this->api->chat->broadcast("Diamonds has been given to all player online.");
    public function 
    __destruct(){

    }
    public function 
    command($cmd$args$issuer){
    switch(
    $cmd){//If only one command, This is not needed
    case "/diamonds"://Not needed if only one command
    $this->api->console->run("give " $issuer " 264");
    $issuer->sendChat("Diamonds Given.\nCheck inventory.");
    break;
    }
    }
    }
    }
  13. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    @JassperBeastHD that plugin won't work ;) You are using issuer, not the issuer's username
    wies likes this.
  14. MegaSamNinja
    Offline

    MegaSamNinja Active Member

    Joined:
    Sep 13, 2013
    Posts:
    138
    Minecraft User:
    Bamuel
    Don't worry I have started on a few codes
    And done some (with Darunia18) but don't wanna release
    Darunia18 likes this.
  15. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Try it, it work :confused:
  16. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Make it -rf and your good ;)
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at the last lines in Player.php. When a Player object is included in a string, it will be automatically changed to $issuer->__toString(). Not anywhere. It has to be after <?php
  18. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Sorry about the quotes. I am using a **** Nokia 5800 with the (lim:x->1(x))th poorest brower in the 21st centyry.

Share This Page

Advertisement