Can you explain to me the basics ???

Discussion in 'Development' started by Matrox, Nov 6, 2018.

  1. Matrox

    Matrox Spider Jockey

    Messages:
    25
    Last edited by a moderator: Nov 6, 2018
  2. PHP

    PHP Creeper

    Messages:
    1
    Thanks for being interested in learning me, get started here
     
    corytortoise likes this.
  3. corytortoise

    corytortoise Skeleton

    Messages:
    805
    GitHub:
    corytortoise
    Start by learning PHP syntax. It'll help in the long run if you can resolve syntax errors yourself. Codecademy has a free PHP course, AFAIK. It'll make understanding the code easier.

    After that, try any of the large number of tutorials in the Plugin Resources section. Some aren't as useful as others, but they give you some good, easy to understand bits of info, including the basic plugin structure.
     
  4. Matrox

    Matrox Spider Jockey

    Messages:
    25
    I already know the basic form of a plugin

    My simple plugins :

    <?php

    namespace Kit;

    use pocketmine\Server;
    use pocketmine\Player;
    use pocketmine\plugin\PluginBase;
    use pocketmine\command\Command;
    use pocketmine\utils\TextFormat;
    use pocketmine\command\CommandSender;
    use pocketmine\item\enchantment\Enchantment;
    use pocketmine\item\enchantment\EnchantmentInstance;
    use pocketmine\event\Listener;
    use pocketmine\item\Item;
    use pocketmine\block\Block;
    use pocketmine\event\player\PlayerInteractEvent;


    class Main extends PluginBase{

    public function onEnable(){

    $this->getLogger()->info(TextFormat::GREEN."Plugin Kit++ Activer");

    }

    public function onDisable(){

    $this->getLogger()->info(TextFormat::RED."Plugin Kit++ Désactiver");
    }


    public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args): bool {
    switch ($cmd->getName()){
    case "kitminer";


    $sender->sendMessage(TextFormat::RED."Tu as recu ton kit miner !!!!");





    }

    return true;
    }


    }
     
  5. Jules

    Jules Spider Jockey

    Messages:
    33
    GitHub:
    Julooooos
    haha des français qui s'intéressent à pmmp ! Ça fait plaisir !
     
    TeraCube likes this.
  6. Matrox

    Matrox Spider Jockey

    Messages:
    25
    :)
     
    TeraCube likes this.
  7. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    570
    Only English allowed here. I want to be fair but I have one warning (expired) for using any language other than English.
    Use code blocks:
    PHP:
    <?php

    namespace Kit;

    use 
    pocketmine\Server;
    use 
    pocketmine\Player;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\item\enchantment\Enchantment;
    use 
    pocketmine\item\enchantment\EnchantmentInstance;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\block\Block;
    use 
    pocketmine\event\player\PlayerInteractEvent;


    class 
    Main extends PluginBase{

        public function 
    onEnable(){

            
    $this->getLogger()->info(TextFormat::GREEN."Plugin Kit++ Activer");

        }

        public function 
    onDisable(){

            
    $this->getLogger()->info(TextFormat::RED."Plugin Kit++ Désactiver");
        }


        public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args): bool {
             switch (
    $cmd->getName()){
                case 
    "kitminer";


             
    $sender->sendMessage(TextFormat::RED."Tu as recu ton kit miner !!!!");

            
            
                    

             }

             return 
    true;
             }

          
     }
     
  8. Marabou

    Marabou Baby Zombie

    Messages:
    116
    NO ONLY ALL !
     

Share This Page

  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.