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

Creating .PHAR file help

Comments in 'Plugin Development' started by Wantedkillerss, Aug 7, 2014.

Thread Status:
Not open for further replies.
  1. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    Ok so I use my android tablet to code using Es file manager editor and droid edit to code so since pocketmine for android doesn't work yet u I use a super slow horrible PC with like 2 cores intel inside. So I transfer my files to the PC
    Put in plugins folder I do start.cmd and type /makeplugin example and devtools tell's me plugin doesn't exist check the name case I'll upload the how everything looks soon I'll show u the plugin.yml
  2. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    PHP:
    /makeplugin <plugin name>
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Maybe you should just search for similar questions before asking?
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Punctuation search:
    ... intel inside. So I...
    ... type /makeplugin ... (Not even an occurrence!)
    ...I'll...
    ... plugin.yml ...


    I'm very grateful for that great deal of punctuations. Good luck in your Battle Against the Usage of Punctuations.
  5. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    Ok it worked now I have plugin.yml problems it says didnt find expected key on line 34 column
    plugin.yml file:
    PHP:
    nameskywars
    main
    Wantedkillers\skywars\Mainskywars
    version
    0.5
    api
    : [1.0.0]
    authorWantedkillers
    load
    AWORLD
    commands
    :
    skywarshowto:
       
    description"gives a brief tutorial on how to play skywars"
       
    usage"/skywarshowto"
       
    permissionskywars.howto.play
    skywarshelp
    :
       
    description"displays a screen of all the Skywars commands"
       
    usage"/skywarshelp"
       
    permissionskywars.howto.play
    skpod1
    :
       
    description"sets the 1st world in witch the players auto spawns"
       
    usage"/skworld"
       
    permissionskywars.setspawn.world
       skywarshelp
    :
       
    description"displays a screen on all the skywars commands"
       
    usage"/skywarshelp"
       
    permissionskywars.help.page
       skpod1
    :
       
    description"sets the 1st position were the player spawns"
       
    usage"/skpod1"
       
    permissionskywars.setspawn.pod
       skpod2
    :
       
    description"sets the 2nd position were the player spawns"
       
    usage"/skpod2"
       
    permissionskywars.setspawn.pod2
       skpod3
    :
       
    description"sets the 3rd position were the player spawns
       usage: "
    /skpod3"
       permission: skywars.setspawn.pod1
       skpod4:
       description: "
    sets the 4th position were the player spawns
       usage
    "/skpod4"
       
    permissionskywars.setspawn.pod4
       skpod5
    :
       
    description"sets the 5th position were the player spawns
       usage: "
    /skpod5"
       permission: skywars.setspawn.pod5
       skpod6:
       description: "
    sets the 6th position were the player spawns
       usage
    "/skpod6"
       
    permissionskywars.setspawn.pod6
       skpod7
    :
       
    description"sets the 7th position were the player spawns
       usage: "
    /skpod1"
       permission: skywars.setspawn.pod7
       skpod8:
       description: "
    sets the 8th position were the player spawns
       usage
    "/skpod8"
       
    permissionskywars.setspawn.pod8
       skpod9
    :
       
    descriptionsets the 9th position were the player spawns
       usage
    "/skpod9"
       
    permission "Skywars.setspawn.pod9
       skpod10:
       description: "
    sets the 10th position were the player spawns
       usage
    "/skpod10"
       
    permission"Skywars.setspawn.pod10
    permissions:
    skywarshelp:
    default: true
    description: "
    display a screen of all the Skywars commands"
    children:
      skywars.setspawn.skworld:
    default: op
    description: "
    sets the world in which the players will spawn in"
    children:
      "
    skywars.setspawn.skpod1"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod2"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod3"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod4"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod5"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod6"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod7"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod8"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod9"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      "
    skywars.setspawn.skpod10"
       default: op
       description: "
    set a position in which the player will auto spawn"
    children:
      skywars.howto.play:
    default: true
    description: "
    Gives a brief tutorial on how to play Skywars "
    The error: "argument 1 passed to pocketmine\plugin\plugindescription::load map() must be type array , Boolean givened in phar"
    on line 58 code:
    PHP:
        public function __construct($yamlString){
            
    $this->loadMap(\yaml_parse($yamlString));
        }

        
    /**
         * @param array $plugin
         *
         * @throws \Exception
         */
        
    private function loadMap(array $plugin){
            
    $this->name preg_replace("[^A-Za-z0-9 _.-]"""$plugin["name"]);
            if(
    $this->name === ""){
                throw new \
    Exception("Invalid PluginDescription name");
            }
            
    $this->name str_replace(" ""_"$this->name);
            
    $this->version $plugin["version"];
            
    $this->main $plugin["main"];
            
    $this->api = !is_array($plugin["api"]) ? array($plugin["api"]) : $plugin["api"];
            if(
    stripos($this->main"pocketmine\\") === 0){
                
    trigger_error("Invalid PluginDescription main, cannot start within the PocketMine namespace"E_USER_ERROR);

                return;
    and load: AWORLD is the world were they'll be auto teleported in to ceratain positions
    private $AWORLD = $world
    Last edited: Aug 7, 2014
  6. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    yeah i wrote it with my iPhone keeps auto correcting and I'm only 12 and ur like 17
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I'm only 15. And I pointed out that you should have the manners that everyone, as long as can comprehend English, should have.

    And load is not for you to decide what you want to load. It is to tell when to load, and they can be found at https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/plugin/PluginLoadOrder.php

    And the syntax highlighting of the website answered your question of why it has an error in the YAML file. Use your observation.

    And ya, you think PocketMine-MP is a clever translator made by Google to translate mysterious abbreviations like AWORLD into code?

    What I can say is, learn PHP.

    Edit: Not only PHP. You don't even understand YAML. Don't tell me you are only 12 because we expect people with knowledge to make plugins, not people with age. You are 12, not anymore young. Time to realize that you are too old to cry like a baby to tell people you are younger and is to be helped with everything. No offense, but the fact is, no one ever discriminates your age. We don't even know if it is true. But if you don't understand YAML, learn YAML before learning PHP. And we can't help you if you don't want to learn, or you'll have to be taught line by line like a kid whose mother tells him "hat" starts with "h" and rhymes "cat".
    Last edited: Aug 7, 2014
    RekkuzaRage likes this.
  8. Wantedkillerss
    Offline

    Wantedkillerss Active Member Plugin Developer

    Joined:
    May 9, 2014
    Posts:
    142
    Plugins:
    1
    Minecraft User:
    Wantedkillers
    Ok so what is wrong with u your anger/temper you get pissed off because somebody was asking a question at least I'm not online 24/7 on my PC and have no friends except for online friends seriously walk outside meet people and eventually you'll get a life really it's a good idea for you :):);)
Thread Status:
Not open for further replies.

Share This Page

Advertisement