-
Notifications
You must be signed in to change notification settings - Fork 2
Tutorial: (Method) Global Cooldown
Special70 edited this page Jan 31, 2022
·
6 revisions
- Placeholder API
- ParseOther Expansion
- Luckperms Expansion
- Luckperms
- ExecutableItems
- Basically, you're having all players check if that specific player has the temporary perm on or not
- How this method basically works is that it will check if a specific player has that specific permission or not. Why am I asking what player do we need to assign the permission? Because we will be checking a player's permission so when one person triggered the activator, no player can use the activator again until the cooldown is over.
Oversimplified Explanation:
- There's only one type of button and anyone can press it. If someone presses it, it disappears and reappears after a period of time. When the button reappears, anyone can press the button and repeat.
Notes:
- The player you are going to be using for the condition has to be a player who logged into your server at least once or else running the luckperms command won't work
- Create the activator that you want to use and assign the global cooldown
-
- Go to the conditions editor
-
- Select placeholder conditions
-
- Create a new placeholder
-
- Select the PLAYER_STRING type
-
- Read the information below
- In the first part, you have to create a placeholder like this. %parseother_{
name of the player you will be assigning
}_{luckperms_has_permission_cs.go}% - In-depth Explanation: The ParseOther placeholder will compare this
{luckperms_has_permission_cs.go}
placeholder to the player you will be assigning. For example, you decided to use your main account as the placeholder the condition's going to listen at so the placeholder will look like this:%parseother_{Special70}_{luckperms_has_permission_cs.go}
- For the luckperms placeholder, I recommend using a random permission that does nothing to prevent giving yourself possible unnecessary problems due to them being related to an existing plugin. Not using
cs.go
permission will not break the method. This is just an example. - The reason why the 2nd part has to be
no
because if the player has the permission and when you try to parse it, it saysyes
. We want the placeholder to print out the answer ofno
because it means that no one has yet to trigger the activator so the permission has yet to be given
- For the luckperms placeholder, I recommend using a random permission that does nothing to prevent giving yourself possible unnecessary problems due to them being related to an existing plugin. Not using
- Add this command:
lp user (name of the player you will be assigning) permission settemp (permission) true (duration) replace
- So for example, you decided that
- The name of the player you will be assigning:
Special70
- The permission in the luckperms placeholder
cs.go
- The duration of how long the global cooldown will be
2d
- The name of the player you will be assigning:
- So this will be the command you will be adding on the commands section
lp user Special70 permission settemp cs.go true 2d replace
If the guide wasn't clear enough or there was a mistake, please contact me (Special70#7668) in discord.