What's wrong with permission

Discussion in 'Development' started by Hoyee, Mar 10, 2020.

  1. Hoyee

    Hoyee Slime

    Messages:
    90
    Code:
    name: code
    main: co\coco
    version: "1.0.0"
    author: HI
    api: [3.0.0, 3.0.1, 4.0.0,3.10.0]
    
    commands:
     alp:
      description: it is alp
      permission: ap.user.command
    
     alp2:
      description: it is alp2
      permission: ap.user.command
    
    permissions:
     ap.user.command:
      description: "op"
      default: op
    it doesn't work
     
  2. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    Could you elaborate? How does it not work?
     
  3. Hoyee

    Hoyee Slime

    Messages:
    90
    I can not see now, because I can't do pmmp now, I can't think well, but I think it said ~~~isDescription~~~ only this remain in my mind
     
  4. Hoyee

    Hoyee Slime

    Messages:
    90
    Now I checked, it says

    TypeError: "Argument 1 passed to pocketmine\command\Command::setDescription() must be of the type string, int given, called in phar~~~~~PocketMine-MP.phar/src/pocketmine/plugin/PluginManager.php on line 567" (EXCEPTION) in "src/pocketmine/command/Command" at line 225
     
  5. Hoyee

    Hoyee Slime

    Messages:
    90
    I found the reason . If I use only number(0,1,2,3...) in description It doesn't work. Why?
     
  6. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,362
    GitHub:
    HimbeersaftLP
    Because yml sucks. You can put the number in quotes to force a string.
     

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.