MVdW Placeholders - Custom Placeholders
-
Custom placeholders for MVdW-Software plugins
When talking about custom placeholders there are two types.
- Custom placeholders coded in a separate plugin that hooks into MVdWPlaceholderAPI
- A javascript based placeholder that is created in the placeholder_custom.yml file under the directory /placeholders/ inside the plugins data folder.
The other type of custom placeholders are the javascript boolean placeholders. These placeholders can return a true and false state (at the moment) that changes depeding on the evaluated result of a javascript expression that can contain placeholders.
Code (Text):## --------------------------------------- ##
## Custom Skript Placeholders
## --------------------------------------- ##
## Do not edit this config version
config: 1
# Add your own placeholders under this category
placeholders:
ismaximcool: # this would be used as {ismaximcool}
condition: "true" # has to be 'true' or 'false' (in this case ofc true)
true: "Ofc he is"
false: "ERROR"
healthyornot: # this would be used as {healthyornot}
condition: "{health} > 10" # You can use other placeholders here
true: "&aYou are healthy!"
false: "&cEat something ..."
nearbed: # this would be used as {nearbed}
# So, this gets the absolute difference of your position minus your bed position and checks if its closer then 10
condition: "(Math.abs({x} - {bed_x}) < 10) && (Math.abs({y} - {bed_y}) < 10) && (Math.abs({z} - {bed_z}) < 10)"
true: "You are close"
false: "Not so close" - Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM