DeluxeMenu's config Syntax

Discussion in 'Spigot Plugin Help' started by MrMcShroom, May 2, 2017.

  1. Hello, I'm having an issue with my syntax on my hshop.
    The item appears, but the requirements aren't read properly so no one can use it.

    I have tried several syntaxes with no success. Here is my one item config:
    Code (Text):
    menu_title: '&6HomesShop'
    open_command: hShop
    open_requirement:
      expression: 'BukkitPlayer.hasPermission("essentials.spawn");'
      deny_commands:
      - '&fUnknown command. Type "/help" for help.'
    size: 54
    items:
      '1':
        material: torch
        description: 'allows_you_to_set_another_home'
        data: 1
        slot: 0
        display_name: '&7Set 2nd Home'

        lore:
        - '&7Buy Price: &a30,000'
        left_click_commands:
        - '[console] eco take %player_name% 30000'
        - '[console] lp user %player_name% permission set essentials.sethome.multiple.two true'
        - '[message] &f&kG&7[&cPlazma&9MC&7]&f&kG&f > &a»&7 You have successfully purchased another set home.'
        left_click_requirement:
          expression: '%vault_eco_balance% >= 30000 && %luckperms_has_permission_essentials.sethome.multiple.two% == false'
          deny_commands:
          - '[close]'
          - '[message] &f&kG&7[&cPlazma&9MC&7]&f&kG&f > Not enough funds, you need another permission, or you have already purchased.'
    I have kept all the lines the same except the left_click_requirement as the problem appears to be present here.

    Code (Text):
        left_click_requirement:
          expression: '%vault_eco_balance% >= 30000 && "%luckperms_has_permission_essentials.sethome.multiple.two%" == "false"'
    Code (Text):
        left_click_requirement:
          expression: '%vault_eco_balance% >= 30000 && "%luckperms_has_permission_essentials.sethome.multiple.two%" == "no"'
    Among a couple other variations. Can anyone please help me determine the proper syntax?
     
  2. I think that the problems can be the variables. You out the firsts variables without the " ", but for the seconds you put them
     
  3. Code (Text):
        left_click_requirement:
          expression: '%vault_eco_balance% >= 30000 && %luckperms_has_permission_essentials.sethome.multiple.two% == no'
    Got this error:
    Code (Text):
    [Tue, 2. May 2017 15:36:14 ERROR] [DeluxeMenus] Error in requirement javascript syntax - %vault_eco_balance% >= 30000 && %luckperms_has_permission_essentials.sethome.multiple.two% == no
    Code (Text):
    [Tue, 2. May 2017 15:44:11 ERROR] [DeluxeMenus] Error in requirement javascript syntax - %vault_eco_balance% >= 30000 && %luckperms_has_permission_essentials.sethome.multiple.two% !== true
    And then finally with this config
    Code (Text):
          expression: '%vault_eco_balance% >= ''30000'' && "%luckperms_has_permission_essentials.sethome.multiple.two%" !== true'
    http://prntscr.com/f3d1o5
    A player that already has essentials.sethome.multiple.2 Can already purchase it
    Code (Text):
    [Tue, 2. May 2017 15:46:28 INFO] MrMcShroom issued server command: /dm reload
    [Tue, 2. May 2017 15:46:34 INFO] mrmcshroomapple issued server command: /hshop
    [Tue, 2. May 2017 15:46:35 INFO] CONSOLE issued server command: /eco take mrmcshroomapple 30000
    [Tue, 2. May 2017 15:46:35 INFO] Error: Insufficient funds available.
    [Tue, 2. May 2017 15:46:35 INFO] [LP] mrmcshroomapple already has this permission!
    [Tue, 2. May 2017 15:46:40 INFO] mrmcshroomapple issued server command: /bal
    [Tue, 2. May 2017 15:46:46 INFO] mrmcshroomapple issued server command: /hshop
    [Tue, 2. May 2017 15:46:48 INFO] CONSOLE issued server command: /eco take mrmcshroomapple 30000
    [Tue, 2. May 2017 15:46:48 INFO] Error: Insufficient funds available.
    [Tue, 2. May 2017 15:46:48 INFO] [LP] mrmcshroomapple already has this permission!
    It tries to re-add the permission

    I would love for anyone to help me out with this
     
  4. I also wanted to make another post regarding this:
    The test account is a part of my default group, permissions listed here:
    Code (Text):
    name: default
    perms:
      auction.limit.3: true
      automessage.receive.json: true
      automessage.receive.regular: true
      build: true
      deluxemenus.menu.*: true
      duels.duel: true
      essentials.balance: true
      essentials.balance.others: true
      essentials.balancetop: true
      essentials.build: true
      essentials.call: true
      essentials.delhome: true
      essentials.help: true
      essentials.home: true
      essentials.ignore: true
      essentials.kit: true
      essentials.kits.instructions: true
      essentials.kits.starter: true
      essentials.list: true
      essentials.motd: true
      essentials.msg: true
      essentials.pay: true
      essentials.rules: true
      essentials.sethome: true
      essentials.signs.use.buy: true
      essentials.signs.use.disposal: true
      essentials.signs.use.free: true
      essentials.signs.use.info: true
      essentials.signs.use.sell: true
      essentials.signs.use.time: true
      essentials.signs.use.warp: true
      essentials.spawn: true
      essentials.tpa: true
      essentials.tpaccept: true
      essentials.tpdeny: true
      essentials.use.warp: true
      essentials.warp: true
      lottery.buy: true
      lottery.check: true
      lottery.scoreborard: true
      modifyworld.*: true
      modifyworld.blocks.interact.*: true
      modifyworld.blocks.place.*: true
      modifyworld.items.pickup.*: true
      prefix.1.&8[&7Newb&8]&f: true
      randomteleport.use: true
      safetrade.accept: true
      safetrade.deny: true
      safetrade.request: true
      silkspawners.place.*: true
      spawnershop.signs.use: true
      spawnershop.use: true
      tsunami.cmd: true
      tsunami.offline: true
      tsunami.vote: true
      worldguard.region.bypass.world: true
      skinsrestorer.playercmds: true
      plots.use: true
      plots.permpack.basic: true
      plots.permpack.basicflags: true
      plots.plot.4: true
      deluxemenus.openrequirement.bypass.hshop: false
      deluxemenus.openrequirement.bypass.prshop: false
      deluxemenus.openrequirement.bypass.pshop: false
      essentials.home.multiple.one: true
     
    Also, did anyone else notice besides simply not checking the requirements, it said insufficient funds when there was sufficient funds?

    Code (Text):
    primary-group: default
    name: mrmcshroomapple
    perms:
      essentials.fly: true
      group.default: true
    uuid: 0006cf99-be7f-311b-b4b6-b2718343198a
     
  5. If he can arleady buy add him to a config list with nane "home-2" or MySql database
     
  6. Unsure what you mean by this.
    He can purchase, and it doesn't take away his money. Console says insufficient funds, but I double verified he has the proper amount.
    Edit: Note, I am the person testing it from an alt.