Skip to content

Tips & Tricks

Roughly_ edited this page Dec 17, 2022 · 1 revision

Some tips & tricks.

  • You can place delay:X at the end of the action, with X being the amount of ticks to delay the action. Example: - PLAYER-DROP-HAND delay:20
  • All actions and the delay prefix are actually case-insensitive. Thus, - LOG Message and - lOg Message will both work.
  • Mathematical actions are parsable, and you could use placeholders with them. Example: - PLAYER-SEND-MESSAGE 2+%player_health% Do NOT use spaces.
  • Using cooldown: X, where X is seconds, you can add a cooldown to an enchantment level or an entire enchantment. Don't make it for both, either add a cooldown to the enchantment as a whole or to the enchantment levels. While technically nothing will break, the system will definitely be messy and might misbehave.
  • Add an exclamation mark before a condition to negate it. So, conditions: - !sprinting will be true if the player is NOT sprinting.
  • For PLAYERHITPLAYER and PLAYERBOWHIT, sometimes you want to specify the player that is checked for the enchantments - that being either the victim or the damager. So, you can add player: DAMAGER or player: VICTIM in the file header to specify that value. The value is case-insensitive. The field is optional, but it's recommended to add it for the sake of better enchantment accuracy.
  • Most triggers and applicables actually have their aliases for convenience. Here's the list:
  • PLAYERHITPLAYER: PLAYERPVP, PLAYERPVPEVENT, PLAYERHITPLAYEREVENT, PVP, PVPEVENT
  • ARMOREQUIP: EQUIPARMOR, ARMOREQUIPEVENT, EQUIPARMOREVENT
  • PLAYERBOWHIT: PLAYERHITBOW, PLAYERHITPLAYERBOW, PLAYERBOWHITEVENT, PLAYERHITBOWEVENT, PLAYERHITPLAYERBOWEVENT
  • PLAYERBREAKBLOCK: PLAYERBREAKBLOCKEVENT
  • PLAYERBREAKITEM: PLAYERITEMBREAK, PLAYERBREAKITEMEVENT, PLAYERITEMBREAKEVENT
  • PLAYEREAT: EAT, PLAYERCONSUME, CONSUME, PLAYEREATEVENT, EATEVENT, PLAYERCONSUMEEVENT, CONSUMEEVENT
  • PLAYERRMBENTITY: PLAYERRMBENTITYEVENT
  • PLAYERINTERACT: INTERACT, PLAYERINTERACTEVENT, INTERACTEVENT
  • PLAYERMOVE: MOVE, STEP, PLAYERMOVEEVENT, MOVEEVENT, STEPEVENT
  • PLAYERGOTHURT: PLAYERDAMAGED, PLAYERHURT, PLAYERGOTHURTEVENT, PLAYERDAMAGEDEVENT, PLAYERHURTEVENT
  • PLAYERHURTENTITY: PLAYERDAMAGEENTITY, PLAYERHURTENTITYEVENT, PLAYERDAMAGEENTITYEVENT
  • PLAYERSHOOTBOW: PLAYERBOWSHOOT, PLAYERSHOOTBOWEVENT, PLAYERBOWSHOOTEVENT
  • PLAYERTOGGLESNEAK: PLAYERSNEAK, SNEAK, TOGGLESNEAK, PLAYERTOGGLESNEAKEVENT, PLAYERSNEAKEVENT, TOGGLESNEAKEVENT
  • WEAPON: WEAPONS
  • ARMOR: No aliases
  • ARMOR_HEAD: HEAD, HELMET, ARMOR_HELMET
  • ARMOR_TORSO: CHESTPLATE, TORSO, ARMOR_CHESTPLATE
  • ARMOR_LEGS: LEGS, LEGGINGS, ARMOR_LEGGINGS
  • ARMOR_FEET: FEET, BOOTS, ARMOR_BOOTS
  • BOW: BOWS
  • TOOL: TOOLS

  • As of update 2.1, the materials are parsed so that you are allowed to make complex systems:
Material string Explanation
STONE Just a stone value with no amount
Defaults to 1 stone
STONE:3 Syntax used to specify the material's amount is Material:Amount
Result: Stone x3
STONE:3;COBBLESTONE:15 Evenly distributed chance to pick one
Result: 50% for Stone x3; 50% for Cobblestone x15
Using just STONE or COBBLESTONE will default to 1 only
STONE:3:40%;COBBLESTONE:60%:15 Complex random chance to pick one
Result: 40% for Stone x3; 60% for Cobblestone x15
If percentage not specified, will be calculated automatically:
STONE:3:40%;COBBLESTONE:15
STONE:3:15%;COBBLESTONE:20%:30;GRANITE:10;OAK_LOG:15% Complex random chance to pick one
Result:
- 15% for Stone x3
- 20% for Cobblestone x30
- 50% for Granite x10
- 15% for Oak Log x1
STONE:3:70% "A jump off the bridge" - relying on the guardrails
Result: 70% for Stone x3, 30% for nothing
STONE:50%;COBBLESTONE:30% A jump off the bridge with multiple materials
Result: 50% for Stone x1, 30% for Cobblestone x1, 20% for nothing

Guides:

Triggers:

API:

Clone this wiki locally