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

Inspiration How to start learning writing plugins

Comments in 'Resources' started by PEMapModder, Feb 8, 2014.

  1. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    This should get more feedback. It's a great tutorial for new plugin developers.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Except a bit outdated...
  3. TheRealJ2KK2J
    Offline

    TheRealJ2KK2J Active Member

    Joined:
    Mar 10, 2014
    Posts:
    121
    Minecraft User:
    J2KK2J
    Im going to try and learn this stuff on my long 4 day break off school!
  4. BukkitPE
    Offline

    BukkitPE Banned

    Joined:
    May 11, 2014
    Posts:
    15
    Minecraft User:
    MINEMASTER_28
    Dude , dont worry about replies ! This is really great ! Thank you , u helped me learn namespace ! and the new api ! I LOVE YOU ! :*
  5. Snake1999
    Offline

    Snake1999 Plugin Developer

    Joined:
    Aug 24, 2013
    Posts:
    25
    Plugins:
    1
    Minecraft User:
    _Snake1999
    amazing work.helped me a lot.
  6. Xfusionios
    Offline

    Xfusionios Active Member Plugin Developer

    Joined:
    Aug 24, 2013
    Posts:
    67
    Plugins:
    2
    Minecraft User:
    XFusionios
    Wow what happens while i leave for a month or two..... Looks a lot like bukkit...
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at post #3, TBC.
  8. y18511075
    Offline

    y18511075 New Member

    Joined:
    Jan 21, 2014
    Posts:
    14
    Minecraft User:
    juhua
    PEMapModder

    You are Celestial People?(留下你的扣扣)
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    ?
  10. y18511075
    Offline

    y18511075 New Member

    Joined:
    Jan 21, 2014
    Posts:
    14
    Minecraft User:
    juhua
    Where are you from?
  11. y18511075
    Offline

    y18511075 New Member

    Joined:
    Jan 21, 2014
    Posts:
    14
    Minecraft User:
    juhua
    in the NumRkPlugin,line:186 Note:/*支持同胞,但不支持簡體字的同胞*/,You are Celestial People?
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I am from Hong Kong.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Just a joke, if you like this idea.
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PM me.
    Also please use English on main threads, or use Chinese at the International Forums -> Chinese.
  15. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Also this is not the place to ask about NumericRanks...
  16. y18511075
    Offline

    y18511075 New Member

    Joined:
    Jan 21, 2014
    Posts:
    14
    Minecraft User:
    juhua
    I'm sorry not intended to offend, I will delete the above information
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Thank you for moving! :)
    iJoshuaHD likes this.
  18. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    where do i need to put this?
    PHP:
    use pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    class 
    MainClass extends PluginBase{
    ...
    public function 
    onCommand(CommandSender $issuerCommand $cmd$label, array $args){
      switch(
    $cmd->getName()){ // just like what we did before, remember?
        
    case "cmd-a":
          if(
    $issuer instanceof ConsoleCommandSender){ // if it is sent from console; this includes RCon, a subclass of  ConsoleCommandSender
          
    $issuer->sendMessage("Please run this command in-game."); // use this; if you use console(), it doesn't work with RCon. If you use return, sorry, you can no longer return strings to be sent in the new API.
          
    return true// return true always unless you want the usage message be shown: return false
        
    }
        if(!isset(
    $args[0])){
          return 
    false// show the usage
        
    }
        if(!((
    $player $this->getServer()->get player($args[0])) instanceof Player)){
          
    $issuer->sendMessage("Player not found.");
          return 
    true;
        }
        
    $issuer->teleport(new Vector3($player->x$player->2$player->z));
        
    $issuer->sendMessage("Teleported you above ".$player->getDisplayName().".");
        return 
    true;
      }
    }
    sorry for the stupid question, i am new :D
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You don't need to copy the comments along...
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No <?php, no namespace definition

Share This Page

Advertisement