Jump to content

permissions for purchased skills not working

Closed 1.25.0

suicidemayhem

Hi, I don't use the kits very often, they're on a timer for all players, so I was trying to make it where you could buy an extra row for the backpack. Players start off with 4 rows, which is backpacks.use.4, then I added backpacks.use.5 for purchase but it isn't applying it. I checked the test account I'm using, still only has backpacks.use.4. If the user has both, it will use the larger number, so I know it will work. 

Here is the code I setup to use instead of kits, it doesn't seem to apply the "permissions" section. I mimicked the "Sorting" category as far as the way it uses "furnacesplitter.use"

 

,
    {
      "Type": "Kits",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/Log7sQR.png",
      "Title": "Backpack Size - TESTING DO NOT USE",
      "Description": "TESTING Each Level adds 1 extra row. Max is 7",
      "Stages": {
        "1": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "backpacks.use.5"
          ]
        },
        "2": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "backpacks.use.6"
          ]
        },
        "3": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "backpacks.use.7"
          ]
        }
      }
    }

 

Share this comment


Link to comment

I just tried using custom groups also so that I can easily remove the skills at wipe, same deal, doesn't seem to apply it like the furnacesplitter.use I mentioned above.

Other than this, it's an amazing idea/plugin, loving it so far.

 

Share this comment


Link to comment

I'm not understanding the question. doesn't this plugin assign the permissions? If a new user joins, they don't have furnacesplitter.use until it's bought through skills, then it applies it. I tested it with an alternate account. Should I be doing something different? 

I thought I place the permissions I want the user to have when they buy that skill level, then it assigns it.

Share this comment


Link to comment
On 11/16/2021 at 10:06 PM, suicidemayhem said:

I'm not understanding the question. doesn't this plugin assign the permissions? If a new user joins, they don't have furnacesplitter.use until it's bought through skills, then it applies it. I tested it with an alternate account. Should I be doing something different? 

I thought I place the permissions I want the user to have when they buy that skill level, then it assigns it.

Plugin grants permissions when purchasing a set

Share this comment


Link to comment

well thats what i thought, so i have it set to grant "backpacks.use.5" but it doesn't seem to apply it when they buy it. I have it setup exactly like the "furnacesplitter.use" example that was provided with the default config.

Modified default config, works like this.

    {
      "Type": "None",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/RqdcAm0.png",
      "Title": "Sorting",
      "Description": "With each stage, you discover new types of sorting.\nLevel 1 - Furnace Splitter\nLevel 2 - Box Sorting",
      "Stages": {
        "1": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "furnacesplitter.use"
          ]
        },
        "2": {
          "Cost": 3500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "simplesort.use"
          ]
        }
      }

my backpack code that for some reason won't apply the permissions when purchased. I know it's the "Kits" section, but since it's only applying a perm, shouldn't matter unless there is something on the backend preventing it.

    {
      "Type": "Kits",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/Log7sQR.png",
      "Title": "Backpack Size - TESTING DO NOT USE",
      "Description": "TESTING Each Level adds 1 extra row. Max is 7",
      "Stages": {
        "1": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.5"
          ]
        },
        "2": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.6"
          ]
        },
        "3": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.7"
          ]
        }
      }

 

Share this comment


Link to comment

Hey, it's been a month. Am I able to get an update on this issue? If I'm doing something wrong I'd like to know what.

What's the point of paying for plugins that half work and can't contact the developer?

Share this comment


Link to comment
On 11/24/2021 at 11:53 PM, suicidemayhem said:

well thats what i thought, so i have it set to grant "backpacks.use.5" but it doesn't seem to apply it when they buy it. I have it setup exactly like the "furnacesplitter.use" example that was provided with the default config.

Modified default config, works like this.

    {
      "Type": "None",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/RqdcAm0.png",
      "Title": "Sorting",
      "Description": "With each stage, you discover new types of sorting.\nLevel 1 - Furnace Splitter\nLevel 2 - Box Sorting",
      "Stages": {
        "1": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "furnacesplitter.use"
          ]
        },
        "2": {
          "Cost": 3500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
            "simplesort.use"
          ]
        }
      }

my backpack code that for some reason won't apply the permissions when purchased. I know it's the "Kits" section, but since it's only applying a perm, shouldn't matter unless there is something on the backend preventing it.

    {
      "Type": "Kits",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/Log7sQR.png",
      "Title": "Backpack Size - TESTING DO NOT USE",
      "Description": "TESTING Each Level adds 1 extra row. Max is 7",
      "Stages": {
        "1": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.5"
          ]
        },
        "2": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.6"
          ]
        },
        "3": {
          "Cost": 2500.0,
          "Value [metabolism - value, for everyone else %]": 0.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
              "backpacks.use.7"
          ]
        }
      }

 

You are using the `Kits` type (why O.o). And you need `None`

image.png.0a09d62d08ba8b2e8068e0d4eb2828b7.png

Share this comment


Link to comment
20 hours ago, Mevent said:

You are using the `Kits` type (why O.o). And you need `None`

The default config, which isn't updated on this plugin at all, shows that "Kits" also uses permissions. So as long a permission is granted to a user, the "type" shouldn't have mattered. I used that as a template to apply my own permissions since I don't use Kits this way.

      "Type": "Kits",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/Log7sQR.png",
      "Title": "Kits Speed",
      "Description": "Accelerates the delay between receiving kits",
      "Stages": {
        "1": {
          "Cost": 10.0,
          "Value [metabolism - value, for everyone else %]": 30.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
	"whatever.permission.i.want.to.grant.user"
	]
        },

I got it working, but I am very unhappy with this purchase. Getting a little help is like pulling teeth, then you act like I'm the idiot here after basically ignoring me for weeks. There is almost no instructions, which is why I posted here asking if I was doing something wrong.

Edited by suicidemayhem
  • Like 1

Share this comment


Link to comment
On 12/10/2021 at 7:54 PM, suicidemayhem said:

The default config, which isn't updated on this plugin at all, shows that "Kits" also uses permissions. So as long a permission is granted to a user, the "type" shouldn't have mattered. I used that as a template to apply my own permissions since I don't use Kits this way.

      "Type": "Kits",
      "ID (for None)": 0,
      "Image": "https://i.imgur.com/Log7sQR.png",
      "Title": "Kits Speed",
      "Description": "Accelerates the delay between receiving kits",
      "Stages": {
        "1": {
          "Cost": 10.0,
          "Value [metabolism - value, for everyone else %]": 30.0,
          "Value 2": 0.0,
          "Commands": [],
          "Groups": [],
          "Permissions": [
	"whatever.permission.i.want.to.grant.user"
	]
        },

I got it working, but I am very unhappy with this purchase. Getting a little help is like pulling teeth, then you act like I'm the idiot here after basically ignoring me for weeks. There is almost no instructions, which is why I posted here asking if I was doing something wrong.

There is an example of working with permissions in the default configuration.
Yes, unfortunately, it is my fault here that I answered for a very long time. I apologize for it.

Share this comment


Link to comment

{
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "None",
"ID (для/for None)": 0,
"Изображение | Image": null,
"Название | Title": "Сортировка",
"Описание | Description": "На каждом этапе открываются новые виды сортировки",
"Уровни | Levels": {
"1": { }
}
},
{
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "None",
"ID (для/for None)": 1,
"Изображение | Image": "null",
"Название | Title": "Телепортация",
"Описание | Description": "Вы телепортируетесь быстрее с каждым этапом",
"Уровни | Levels": {
"1": { }
Ошибка в плагине 1.27, 2 прокачки работают одновременно. Так же нет возможности добавления своих вариантов скилла, например разрешения на другие варианты:
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "Mining",
"ID (для/for None)": 1,
"Изображение | Image": null,
"Название | Title": "Шахтер",
"Описание | Description": "На каждом этапе открываются новые варианты добычи ресурсов",

"Уровни | Levels": {
"1": {
"Стоимость | Cost": 30.0,
"Значение [метаболизм - значение, шанс встать - шанс, для всех остальных процент %] | VALUE": 0.0,
"Значение 2": 0.0,
"Команды | Commands": [],
"Группы | Groups": [],
"Разрешения | Permissions": [
"mining.vip"
]
}

Share this comment


Link to comment
On 1/2/2022 at 11:34 AM, DiDreamer said:

{
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "None",
"ID (для/for None)": 0,
"Изображение | Image": null,
"Название | Title": "Сортировка",
"Описание | Description": "На каждом этапе открываются новые виды сортировки",
"Уровни | Levels": {
"1": { }
}
},
{
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "None",
"ID (для/for None)": 1,
"Изображение | Image": "null",
"Название | Title": "Телепортация",
"Описание | Description": "Вы телепортируетесь быстрее с каждым этапом",
"Уровни | Levels": {
"1": { }
Ошибка в плагине 1.27, 2 прокачки работают одновременно. Так же нет возможности добавления своих вариантов скилла, например разрешения на другие варианты:
"Включено | Enabled": false,
"Разрешение | Permission": null,
"Тип | Type": "Mining",
"ID (для/for None)": 1,
"Изображение | Image": null,
"Название | Title": "Шахтер",
"Описание | Description": "На каждом этапе открываются новые варианты добычи ресурсов",

"Уровни | Levels": {
"1": {
"Стоимость | Cost": 30.0,
"Значение [метаболизм - значение, шанс встать - шанс, для всех остальных процент %] | VALUE": 0.0,
"Значение 2": 0.0,
"Команды | Commands": [],
"Группы | Groups": [],
"Разрешения | Permissions": [
"mining.vip"
]
}

Для миссий типа None необходимо устанавливать УНИКАЛЬНЫЕ ID 🙂

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

81.3k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.