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

[Solved] Newline after plugin loading and enable message

Comments in 'Plugin Development' started by LDX, Sep 2, 2014.

  1. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    I'm working on developing iProtector, an area protection plugin, but I've ran into a problem. After the enabling message and loading message, there is an empty line after each one.

    con.png

    I don't know how to fix this. Here's my plugin.yml:
    Code:
    name: iProtector
    main: LDX\iProtector\Main
    author: LDX
    version: 1.2
    load: POSTWORLD
    api: [1.0.0,1.1.0,1.2.0,1.3.0,1.4.0]
    commands:
      area:
        description: "Allows you to manage areas."
        usage: "/area <pos1/pos2/create/list/flag/delete>"
        permission: iprotector.command.area
    permissions:
      iprotector:
        description: "Allows access to all iProtector features."
        default: op
        children:
          iprotector.access:
            description: "Allows access to editing terrain in iProtector areas."
            default: op
          iprotector.command:
            description: "Allows access to all iProtector commands."
            default: op
            children:
              iprotector.command.area:
                description: "Allows access to the area command."
                default: op
                children:
                  iprotector.command.area.pos1:
                    description: "Allows access to the iProtector pos1 subcommand."
                    default: op
                  iprotector.command.area.pos2:
                    description: "Allows access to the iProtector pos2 subcommand."
                    default: op
                  iprotector.command.area.create:
                    description: "Allows access to the iProtector create subcommand."
                    default: op
                  iprotector.command.area.list:
                    description: "Allows access to the iProtector list subcommand."
                    default: op
                  iprotector.command.area.flag:
                    description: "Allows access to the iProtector flag subcommand."
                    default: op
                  iprotector.command.area.delete:
                    description: "Allows access to the iProtector delete subcommand."
                    default: op
  2. Sergey_D
    Offline

    Sergey_D Active Member

    Joined:
    Jan 19, 2014
    Posts:
    75
    Minecraft User:
    CLILLZ
    This message in function onEnable or onLoad.Why you send plugin.yml?
    Dutok and Lambo like this.
  3. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    No these appear to be the Phar Loader messages.
    PEMapModder and LDX like this.
  4. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    Any ideas as to what might be causing it? The newline doesn't appear in the disable message.
    linuzo likes this.
  5. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    I still need help with this....
  6. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Try to delete some API numbers
    Maybe its too long and PM cant show them
  7. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    No, I do that in all my plugins, and it doesn't show the API there anyway.
  8. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    I know it doesnt but in all of them you added all those API numbers?
    Last edited: Sep 3, 2014
  9. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    Yeah.
    Jon likes this.
  10. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Dev version?
    LDX likes this.
  11. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    Are you asking for a copy of it?
  12. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    No i am asking to help you
    And i didnt seen the dev version on the top of the PM window
    Now yea...and, can you try the latest dev. Version
  13. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    It's Dev-491, you can see it in the title bar.

    Edit: Still there on Dev-530.
    Jon likes this.
  14. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Same in dev 530?
    LDX likes this.
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    Yeah.
  16. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
  17. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    I fixed it!! The problem was there was an empty line at the end of the file, so it printed it to the console when it was loaded, and there was an empty line at the end of Area.php, so it printed a new line to the console in onEnable. :D
    Dutok likes this.
  18. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
    [​IMG]
    Adaasi and LDX like this.
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    @LDX: @Jon is right, you should only add the minimum API version there. PocketMine is backwards-compatible for the second number in the API version (first.second.third).
    Jon likes this.

Share This Page

Advertisement