ested Minecraft Versions:
  • 1.8
  • 1.9
  • 1.10
  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
[IMG]

Execute commands, scripts based on placeholders and JS.

Please make sure to read the entire description before buying especially requirements and limitations.

Use https://www.spigotmc.org/forums/spigot-plugin-help.42/ or the discussions for support

[IMG]

ConditionPerms is a plugin that allows you to use my large collection of placeholders to check for specific conditions. The plugin uses JavaScript to evaluate the conditions and depending on the result it will allow you to execute commands or give permissions.

The plugin also allows the opposite, meaning when the condition is no longer met you can either choose to revoke the permissions again and execute different commands, or you can just do nothing and make it work as a one time thing.


What makes this plugin worth the price:
- All PAPI placeholders you can use in conditions or commands on grant/revoke
- Good performance and continuous research for better performance
- This plugin is for the more advanced server administrators. There is a smaller audience to attract

[IMG]

The idea of ConditionPerms started in December 2014 but back then it was just a small idea of a little feature. The first alpha release was ready in July 2015 and has been under testing since that day to increase performance and stability.

A lot of (true/false) placeholders were made specifically for this project since 2014 to create cool but simple things.


[IMG]

The plugin has been through a long testing period to increase performance. JavaScript evaluating is not the most performance friendly task in the world especially when you have to do a lot of checks for a lot of players.

But after research, optimizing the placeholders and providing the right tools to help you get best performance you can change the performance as good as you want.

This is a list of examples of performance friendly tasks. 1 = most performance friendly. This doesn't mean that when you use placeholders with fast changing data it will be bad for the performance, this is just a scale rather then a grade.
  1. Conditions that only contain a true/false placeholder
    These conditions will not be evaluated by JavaScript and are extremely fast.
  2. Conditions with placeholders that do not change often
    The conditions are not evaluated when the expression with the replaced placeholders is the same as before. This is useful for expressions that for example make use of numbers for levels, etc... since levels do not tend to change every second.
  3. Conditions with fast changing placeholders
    Conditions with placeholders that change often (such as positions ,...) have to be checked every check interval.
  4. Conditions with JavaScript libs. such as Math ,..
    These take a bit longer because the Math lib. has to be loaded and evaluated/calculated as well
  5. Conditions with custom placeholders
    This is a generalization and may not be true for all custom placeholder. A lot of custom placeholders added through the API do not make use of caching causing them to sometimes contact a MySQL server every time the condition is checked.

[IMG]

  • CraftBukkit/Spigot 1.8.8 or higher
  • Java 15+ when using Spigot 1.8.8 - 1.16.4
  • Java 16+ when using Spigot 1.17 or higher
  • PlaceholderAPI 2.10.9 or higher
  • Around 15MB RAM in idle (depending on amount of placeholders) + 30KB for every player
  • The ability to understand the use of expressions such as "> < || && =="

[IMG]

We work hard to add new features or to increase performance. These are some limitations you should read before buying:
  • The conditions are checked for all online players you can't limit it to specific players
  • The conditions are only checked for players, you can perform a global check
  • It is recommended to keep the check interval higher then 10 ticks.
  • Auto updating is not possible, checking for updates is possible.
  • The conditions are polled, meaning you can't trigger it at the same exact second a condition becomes true or false (no events). This means placeholder/checks for event based data like on movement, on chat, etc... will not be implemented


[IMG]

Main command:
/conditionperms
Aliases:
/conditionpermission
/cperms
/cpermission
/cpermissions
/conditionpermissions


/conditionperms help
Descirption: This command shows all the commands.

/conditionperms about
Description: Shows version information

/conditionperms debug
Description: Provides a debug dump. Will test all placeholders ,etc (so it can cause some errors)

/conditionperms permissions
Description: Lists all permissions

/conditionperms reload
Description: This command reloads the configuration

/conditionperms resetconfig
Description: This command resets the configuration file to its default

/conditionperms timings
Description: This command is used to check how long it takes every 'checkinterval' for the plugin to test the conditions on all players.
[IMG]


[IMG]

Code (Text):
conditionperms.reload:
description: Reload the configuration
default: op
conditionperms.help:
description: Show plugin help
default: true
conditionperms.uploadlog:
description: Upload log
default: op
conditionperms.uploadconfig:
description: Upload config
default: op
conditionperms.about:
description: About the plugin
default: true
conditionperms.permissions:
description: List all permissions
default: true
conditionperms.resetconfig:
description: Reset the configuration file
default: false
conditionperms.parse:
description: Parse effects or placeholders to chat
default: op
conditionperms.timings:
description: Show timings of all conditions
default: op
conditionperms.debug:
description: Create a debug dump
default: op

[IMG]

The configuration is generated upon first startup. For the config I recommend watching my video above since I explain most of it in that video.

Code (Text):

# ------------------------------ #
#
# ConditionPerms 3
# (c) Maxim Van de Wynckel
#
# ------------------------------ #

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# GENERAL PLUGIN SETTINGS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

## Config version (DO NOT EDIT)
config: 2

## Language file
lang: 'en'

## Debug mode
debug: false

## Log to file
log:
enabled: true
# Reset log on startup
reset: true

## Update checking
update:
check: true # RECOMMENDED YOU LEAVE THIS TRUE

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# PLUGIN SPECIFIC SETTINGS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

# Condition engine
# This is the engine that will be used to evaluate the conditions
# Only edit when you know what you are doing!
engine: 'nashorn'

# Configure the database. This database is used to keep track
# of the players that have been granted the condition permissions
# already.
#
# Default it is set up for SQLite. MySQL support
#
# NOTE: The databases are not convertible between types
database:
# Database configuration is SIMILAR to http://wiki.bukkit.org/Bukkit.yml#database
# with isolation, url, driver, ...
# Database name
database: "conditionperms"
# Database username
username: bukkit
# Database password
password: walrus
# Database driver URL
# {DIR} will be replaced with the plugin directory
# {NAME} will be replaced wit the plugin name
url: jdbc:sqlite:{DIR}{NAME}.db
# Save interval in ticks
save-interval: 6000

# A list of all conditions you configured
# You can add your own conditions yourself
# For more detailed info see the plugin page
conditions:
health-example: # This is a random name given to a condition
condition: '%player_health% < 10' # Here you define the statement of the condition
checkinterval: 60 # This is the interval in ticks the condition is checked
revoke: true # If set to true conditions will be revoked when no longer met
cooldown: 0 # This is the check cooldown (in ticks) after the check is true. A use could be:
# for example you want to check if a player is in an area (fast)
# and you want to send a message every X ticks.
allplayers: false # Check the condition on all players (performance drop)
commands-on-grant: # Execute all commands below this when the condition is met
- 'say %player_name% has low health! Help him!!'
commands-on-revoke: # Execute all commands on revoke (revoke needs to be true)
- 'say %player_name% is back OK!'
permission-world: '' # The world used to add permissions to, leave empty for player location
fly-example: # This is a random name given to a condition
condition: '"%player_is_flying%" == "yes"' # Here you define the statement of the condition
checkinterval: 10 # This is the interval in ticks the condition is checked
revoke: true # If set to true conditions will be revoked when no longer met
allplayers: false # Check the condition on all players (performance drop)
commands-on-grant: # Execute all commands below this when the condition is met
- 'console:say %player_name% is flying ...'
commands-on-revoke: # Execute all commands on revoke (revoke needs to be true)
- 'console:say %player_name% is no longer flying :)'
permissions: # Grant and/or revoke following permissions
- 'examplepermission.flying'
permission-world: '' # The world used to add permissions to, leave empty for player location
# The example below is a bit more tricky. It uses the Math lib. to check if a player is in a 10 block range of his bed
bed-location-example:
condition: '(Math.abs(%player_x% - %player_bed_x%) < 10) && (Math.abs(%player_y% - %player_bed_y%) < 10) && (Math.abs(%player_z% - %player_bed_z%) < 10)'
checkinterval: 20
revoke: true
allplayers: false
commands-on-grant:
- 'console:say &a%player_name% you are close to your bed!'
commands-on-revoke:
- 'console:say &c%player_name% no no! wrong way!'
permissions: []
permission-world: ''
specific-player-example:
condition: '"%player_name%" == "Maximvdw"'
checkinterval: 60
revoke: false
allplayers: false
commands-on-grant:
- 'console:say You are Maximvdw!'
featherboard-example:
condition: '"%player_is_flying%" === "yes"'
checkinterval: 10
revoke: true
script-on-grant: |
var api = Java.type("be.maximvdw.featherboard.api.FeatherBoardAPI");
api.toggleOff(player.getName());
script-on-revoke: |
var api = Java.type("be.maximvdw.featherboard.api.FeatherBoardAPI");
api.toggleOn(player.getName());

engine:
The engine is the thing that evaluates the expression you make in the condition. Default (and recommended) it is set to "nashorn". You have the possibility to use other Engines (they will be shown in the console on startup) such as the new Java8 parser that is much faster (used by default).

database:
The database is used to save who has gotten the permissions (and/or commands). For example, if you have been granted a specific conditon and the server reboots, it wont grant you the same permissions again because it remembers that it already gave them.

The database is set up a bit like the database in Bukkit.yml. Default it is set to SQLite and it is recommended to keep it this way due to the small amount of data and way the plugin caches the players.

If for any reason you want to use mysql take a look at how it is done in the bukkit.yml and do the same thing in the config.yml of ConditionPerms.
http://wiki.bukkit.org/Bukkit.yml#database
Remember to replace the {IP} ,etc.. with valid data.

conditions:
All conditions you configure have to be put under the section "conditions:" make sure to use indentation.

example-condition:
The condition name can be anything you want as long as it is unique. It is advised to give it logical names however so you can easily find it again in the future. Examples are "low-health" , "mcmmo-level-reached" , ...

condition: '{example}'
This is the main part of the condition, is the evaluation that has to return TRUE or FALSE. The condition can contain any JavaScript code such as the Math lib, Date lib, .. .

Some placeholders return true/false by default, others can be used with checks such as testing if a level is higher then X.
Example:
condition: '%quests_hero_level% > 10'
This means the condition will be true when the Quests hero level is higher then 10.

[IMG]

[IMG]

[IMG]

NOTE: Make sure to surround placeholders that return a string/text with single or double quotes (depending on the quotes around your entire condition.

Example:
condition: ' "%player_name%" == "Maximvdw" '
OR
condition: " '%player_name%' == 'Maximvdw' "



checkinterval: X
The checkinterval is the interval the condition is checked for (all) players. This interval is in ticks (20 ticks = 1 sec). It is recommended to keep this as high as possible without losing functionality (For example, you don't need to test if a user reached a level every second, this is a bit overkill).

revoke: true/false
So once a condition is met what should happen after that? Revoke is the option to allow the plugin to revoke the permissions again (and execute the revoke commands) once the condition is no longer met. For example: You only want to give a permission when a player's health is low, then you have to revoke the permissions again when he is back ok.

allplayers: false/true
It is recommended to keep this set to false. When set to false the plugin will only check the conditions for the players that are currently online. When you set it to true it will test all your online and offline players (very CPU intensive with a lot of players or old servers).

commands-on-grant: []
Commands-on-grant is a list option for commands that will be executed by the console when the condition is met. You can use any variable/placeholder inside.

'console:say This is a console command'
'player:/command as player
'oppedplayer:/command as an opped player'
'chat:This is a chat message by {player}'
'delay:50' (delay in milliseconds - High delays are currently not recommended)
'pmplayer:This is a &amessage' (Send a message to the player)


commands-on-revoke: []
Commands-on-revoke is a list option for commands that will be executed by the console when the condition is no longer met and revoke is set to true. You can use any variable/placeholder inside.

'console:say This is a console command'
'player:/command as player
'oppedplayer:/command as an opped player'
'chat:This is a chat message by {player}'

'delay:50' (delay in milliseconds - High delays are currently not recommended)
'pmplayer:This is a &amessage' (Send a message to the player)


script-on-grant: |
JS script to execute on grant.

script-on-revoke: |
JS script to execute on revoke.

permissions: []
permissions is a list option for all the permission nodes that will be granted to the player when the condition is met. These will also be the permissions that will be revoked when revoke is set to true.
Example:
permissions:
- 'featherboard.group.myboard'


permission-world: 'world'
Default the plugin will grant the permissions to the player in the world he is currently in. Meaning if the condition is met in the Nether it will be granted (according to Vault) in the Nether. With this option you can force it to use a different world.

[IMG]

Variables or also called placeholders are very important for this plugin. They are mostly used inside the condition so you can give permissions based on the result of these placeholders.

But it can also be used inside the commands that are executed upon granting or revoking a condition.

Keep in mind that not all test placeholders are continuously tested. Please keep in mind that we get a lot of placeholder requests, so it can take several weeks to add them. The bungee placeholders are only tested to work on Bungeecord, not other variants like lillypad or redisbungee.
Placeholders are mostly made for the latest version of each plugin. (e.g. Factions 2.7 < (and not 1.6), ...). Placeholders of abandoned projects will eventually be removed (or not added). New placeholders are added depending on the amount of requests or the effort put into by the placeholder resource author to make it easy for me. IF you request a placeholder this does not 100% mean I will add it, usually there are queues of a few months before placeholders are being added.

Also keep in mind that placeholders could be removed if support for them is dropped by the author.

Some placeholders such as permissions and economy that are handled with Vault can cause issues with plugins that are not 'digital'. Mainly with economy plugins that do not use a digital currency. This is not an issue I can fix.

CLICK HERE FOR A LIST OF PLACEHOLDERS/VARIABLES


[IMG]

By downloading this plugin you agree with our terms of service
http://www.mvdw-software.com/terms-of-service

You may use this plugin on 1 server or network only


WHAT TO DO AFTER BUYING:
  1. Test the default config
  2. Learn the default config see how it works, play with the values
  3. Plugins are tested by a team before uploaded, so sometimes new changes can take some time. but this means every update works, so if you have a plugin fault (not starting, loading,..) this usually means an issue on your side. Feel free to contact me
  4. Have an idea or feature? Submit it: Most accepted features (that can be done fast) are placeholders
  5. Do you like the plugin? Leave a rating it helps
    :)


[IMG]

Q: My condition does not work
A: Check for errors in the console. Once a condition has an error it will stop executing it to prevent large logs with errors.

Q: The plugin causes lagg with a lot of players
A: Use /conditionperms timings
and check how long it takes on average. Increase the check interval if it takes too long.

Q: There is an error when I load about the config
Q: My config keeps resetting

A: Check your yaml file for errors, use /conditionperms resetconfig to reset the config. Follow the steps in the 'What to do after buying' start making slow changes and keep testing them.
Use www.yamllint.com to check for config syntax errors

Q: My placeholders don't update
A: Check if the interval is correct, try to add the same line again. If this doesn't help the problem is caused by caching of the API of the placeholder (MySQL database ,...) Usually happens with voting or stat plugins that log kills, deaths, wins, blocks mined , ...

Q: I like to have a hug
A: Sorry this feature is currently not available

Q: Please add x plugin to the placeholders
A: There usually are queues of several months before placeholders are added. Also keep in mind that I will not guarantee if all placeholder requests are added especially premium plugins.

Q: Why is the file so big?
A: Keep in mind disk space is not RAM. There are over 2k placeholders and ~1k not enabled/under-construction placeholders included. These classes are not loaded when the plugin needed for these placeholders is not existent. You should expect the file to be max. 5MB in the future with dependencies being downloaded when needed (such as a HTTP client that could be 12MB, or other API frameworks)

Q: How to use UTF-8 characters
A: Save as UTF-8 just like all other plugins. Make sure spigot starts with utf8 support: ( -Dfile.encoding=UTF-8)
Spoiler: screenshot

Uploader


Downloads
4
Views
354
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from ArteffKods

Back
Top Bottom