Ssomar Plugins
🛒 Purchase📢 Discord❤️ Donate
  • Tools for all Plugins [Score]
    • 📚Custom Commands
      • Player & Target Commands
      • Mixed Commands (Player & Entity)
      • Entity Commands
      • Block Commands
      • Item Commands
      • Utility Commands
    • 📚Custom Conditions
      • Player & Target Conditions
      • Entity Conditions
      • Block Conditions
      • World Conditions
      • Item Conditions
      • Placeholder Conditions
      • Custom EI Conditions
    • 🏹Custom Projectiles
    • 📚Placeholders
    • ✨ Score particles
    • 🧮 Score Variables
    • ✔️Compatible Plugins
    • 🤖General Questions | Guides
      • Technical-Level Info
      • SCore
      • Math Formulas
      • Utilities
        • Code Bin/Stock
    • 📰 Score
      • General config
      • Commands
    • 🔘 Custom triggers
  • ExecutableItems
    • 📌Information EI
    • 📃Configurations
      • General Configuration
      • Item Configuration
        • Item Features
        • Item Restrictions/Resistances
      • Activator Configuration
        • List of the Activators
        • Activators features
    • ⌨️Commands & Permissions
    • 🤖Questions | Guides
      • Frequently Asked Questions
        • Free vs Premium
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
          • command /ei doesn't work
          • Just installed the plugin and have errors on my logs
        • Players can't use the items
        • Basic tutorials
        • Item disappears | Limit
        • EI COMMANDS doesn't work
        • How to use vanilla commands
        • Server chat spamming
        • Custom crafting
        • Folders on /ei show
        • Item as player head
        • Armor trims
        • Attributes not working
        • How to duplicate an EI Item
        • How to change particle vanilla command color
        • Edit plugin messages
        • Item Textures
        • I want to give an item on join
        • Issue with written book
        • How to add custom NBTTag
        • HEX COLORS doesn't work
        • HUGE delay | cooldown | command time
        • Trident duplication
        • Custom name feature is not working
        • Score database large
        • PROJECTILE_HIT_... activators not working
        • Not so frequentlly asked questions
      • Items explanations
        • Item ideas - How to create...?
        • Hight-Powered Grappling Hook
        • Morph Tools
        • Delayed Teleport Towards Saved Location
        • Box of ender pearls
        • Swap position
        • Magnet
        • Item frame visibility toggler
        • Hermes boots
        • EI |WorldEdit -> SET COMMAND
        • Bag of items
        • Infinite rockets
        • Trident that works when not raining
        • [Complex] Moving Particle Projectile
      • Methods | Template
        • Multiple projectiles on one item
        • Custom drops
        • Deal % of entity HP
        • Variable conditions
        • Armor Set Bonus
        • Custom durability
          • Custom durability bar
        • Action Counter
        • On / Off Switch
        • Custom food
        • Raycast
        • Random activators selector
        • Break blocks not depending on item
        • Infinite | finite blocks
        • Damage | Hit features
        • Backstab
        • Item date on lore
        • Entity health condition
        • Dashes | Commands & usage
        • Guns
        • RNG Chance activator
        • Only usable on mainhand
        • Transform Vanilla Items into ExecutableItems
        • Insta pickup
        • Epic particles
        • Custom totems
        • One Time Loop
        • OneTime action
        • MINEINCUBE command whitelist or blacklist blocks
        • Cancel a delayed command
        • Worldedit schematic
        • Condition 1 between 5 different armor pieces
        • Creating Items with multiple activators with varying conditions while having only one error message
        • [Free version] Mana Requirement
        • Setting Up a System that runs the auto update feature once per update
        • [Outdated] Global Cooldown
      • Custom projectiles implementation
        • Projectile ideas - How to create...?
        • Creating a basic projectile
        • Launch Arrows in cone
        • Launch Diamond Axe
        • Custom Actions / Damages per projectiles
      • Custom textures
        • Custom textures [1.21 --]
          • General items
          • Per states texture
          • Custom armor (using armor trims)
          • Animated textures
          • 3D Models
          • Uploading texture pack
          • Fixing Invalid PNG Files
        • Custom texture [1.21+]
      • Custom sounds
      • Informal Guides
      • Plugin performances optimization
    • 🔦MC Versions Compatibility
    • ⚙️Developer API
  • ExecutableBlocks
    • 📌Information EB
    • 📃Configurations
      • General Configuration
      • Block Configuration
        • Block Features
        • Blocks Examples
      • Activator Configuration
        • List of the Activators
        • Activators features
        • Activator Examples
    • ⌨️Commands & Permissions
    • 🤖Question | Guides
      • Frequently Asked Questions
        • Free vs Premium
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • Players can't use the blocks
        • Block disappears | Limit
        • How to use vanilla commands
        • Server chat spamming
        • Custom crafting
        • Block as player head
        • Tutorial
        • Block states
        • Block Textures
        • My condition is checking the owner
        • SETEXECUTABLEBLOCK does not work
        • Holograms won't vanish
      • Tutorials
        • Boss summoner
        • Item generator
        • Custom crops
        • Custom TNT
        • Block that generate a structure
      • Methods
        • Timed actions
        • Worldedit schematic
    • ⚙️Developer API
  • ExecutableEvents
    • 📌Information EE
    • 📃Configurations
      • General Configuration
      • Activator Configuration
        • List of the Activators
        • Activators features
    • 🤖Question | Guides
      • Informal Guides
      • Frequently Asked Questions
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • How to use vanilla commands
        • Server chat spamming
      • Tutorials
        • Toggle System/Command with Godmode
        • Custom enchants by lore
        • Give new/old players an item once
        • Run commands after killing x amount of mobs
        • Detect player entry/leave from a worldguard region
    • ⌨️Commands & Permissions
  • MyFurniture
    • 📌Information MF
    • 📃Configurations
      • General Configuration
      • Furniture Configuration
        • Furniture Features
        • Furntiture Examples
      • Activator Configuration
        • List of the Activators
        • Activators features
    • 🤖Question | Guides
      • Frequently Asked Questions
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • Import your own Furniture
        • How to use vanilla commands
        • Server chat spamming
        • Free vs Premium
    • ⌨️Commands & Permissions
  • ExecutableCrafting
    • 📌Information EC
    • 📃Configurations
      • General Configuration
      • Recipe Configuration
        • Recipe Features
        • Crafting Recipe Examples
      • Recipe groups
      • Recipe Book
    • 🤖Questions | Guides
      • Free vs Premium
      • Install/update/errors
        • How to install correctly
        • How to update correctly
    • ⌨️Commands & Permissions
  • AI Chat Moderation
    • 📌Information ACM
    • 📃Configurations
    • ⌨️Commands & Permissions
  • CustomPiglinsTrades
    • 📌Information CPT
    • ⌨️Commands & Permissions
    • ✔️Compatible Plugins
  • ScreenShop
    • 📌Information ScreenShop
  • TEAM AND DONATIONS
    • 🎆Contact / Support us ?
Powered by GitBook
On this page
  • DELAY
  • DELAY_TICK
  • IF
  • WHILE
  • LOOP
  • FOR - END_FOR
  • Run commands randomly ?
  • RANDOM_RUN / RANDOM_END
  • NOTHING*
  • More Examples:
Edit on GitHub
  1. Tools for all Plugins [Score]
  2. Custom Commands

Utility Commands

If you edit the commands in-game don't add the - that is before all examples.

DELAY

  • Info: Delays a command line for seconds

  • Command: DELAY {amount}

    • {amount}: To how long you want commands to be delayed (In seconds)

  • Example:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands: #There will be a delay of 10 seconds between the command1 and the command2.
    - command1
    - DELAY 10
    - command2

DELAY_TICK

  • Info: Delays a command line for game ticks (20 ticks = 1 second)

  • Command: DELAY_TICK {amount}

    • {amount}: To how long you want commands to be delayed (In ticks)

  • Example:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - command1
    - DELAY_TICK 5 # (0.25 seconds)
    - command2

IF

CURRENTLY ONLY WORKS IN PLAYER RELATED AND ENTITY RELATED COMMANDS

  • Info: Executes commands if condition is met

  • Command: IF {condition_without_spaces} {command1} <+> {command2} <+> ...

    • {condition_without_spaces}: The condition for the IF to decide whether it runs or not.

      • Symbols: =, !=, >=, <=, >, <

      • It supports () for priority , && for AND and || for OR

    • {command1},{command2}: The commands that will be executed

  • Example:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - IF %player_health%>20 say cool
activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - IF %entity%=PIG say I'm a pig <+> SETBABY <+> say I'm now a baby pig
activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - IF 1=1||2=3 BACKDASH 1 # 1=1 OR 2=3 -> YES because 1=1
    - IF 1=1&&2=2||2=3 BACKDASH 1 # 1=1 and 2=2 or 2=3 -> YES because 1=1 and 2=2
    - IF (1=1&&2=2)||(2=3||3=2) BACKDASH 1 # (1=1 and 2=2) or (2=3 or 3=2) -> YES because 1=1 and 2=2

WHILE

  • Info: Repeats indefinitely as long as the condition is met. It is also running in async

  • Command: WHILE {condition_without_spaces} {delay_in_ticks} {command1} <+> {command2} <+> ...

    • {condition_without_spaces}: The condition for the while loop to decide whether it continues or stops

    • {delay_in_ticks}: The delay before the next repetition

      • Delay supports decimals value but they are casted to the next integer (20.1 -> 20)

    • {command},{command2}: The commands that will be executed in repeat

  • Example:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - WHILE %player_health%>10 20 SEND_MESSAGE &eHello &6While <+> minecraft:effect give %player% speed 1 1

It runs async + Condition support double placeholders, example %player_x%>%player_z%

The command will be stopped if the player is offline

LOOP

  • LOOP_START

    • Info: First part of the command

    • Command: LOOP_START loopCount:{number}

      • {number}: Number of times a command gets repeated. Placeholders are supported

  • LOOP_END

    • Info: Last part of the command

    • Command: LOOP_END

  • Example: (This is what you will see on config)

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - 'LOOP_START loopCount:5' # (50%)
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - LOOP_END
    - 'LOOP_START loopCount:3' # (30%)
    - SEND_MESSAGE &7YOU GOT IRON! +++ minecraft:give %player% iron_ingot 1
    - LOOP_END
    - 'LOOP_START loopCount:2' # (20%)
    - SEND_MESSAGE &aYOU GOT DIAMOND! +++ minecraft:give %player% diamond 1
    - LOOP_END
    - RANDOM_END

This is what the ExecutableItems plugin sees when it runs

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - SEND_MESSAGE &cYOU GOT AN APPLE! +++ minecraft:give %player% apple 1
    - SEND_MESSAGE &7YOU GOT IRON! +++ minecraft:give %player% iron_ingot 1
    - SEND_MESSAGE &7YOU GOT IRON! +++ minecraft:give %player% iron_ingot 1
    - SEND_MESSAGE &7YOU GOT IRON! +++ minecraft:give %player% iron_ingot 1
    - SEND_MESSAGE &aYOU GOT DIAMOND! +++ minecraft:give %player% diamond 1
    - SEND_MESSAGE &aYOU GOT DIAMOND! +++ minecraft:give %player% diamond 1
    - RANDOM_END

Explanation:

When the plugin runs the commands, it duplicates the commands inside the loop commands to reduce the number of command lines in your config to make your config cleaner and since RANDOM_RUN gives each command equal rates, the estimated rate will be:

  • 50% chance to get an apple

  • 30% chance to get iron

  • 20% chance to get diamond

It supports placeholders

FOR - END_FOR

  • Command that allows you to target multiple elements inside a list

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - FOR [Special70, Ssomar, Vayk] > for1
    - effect give %for1% speed 60 2
    - END_FOR for1

What exactly happened here is that the FOR command will run 3 times because inside the bracket symbols, there are 3 values which are Special70, Ssomar and Vayk.

The for1 word will be used as an "identifier" for that FOR command so we can use the placeholder for it.

So when the effect command runs for the first time, %for1% will return " Special70" then "Ssomar" for the second and "Vayk" for the third time.

Don't overthink about the > symbol.

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - FOR [Special70, Ssomar, Vayk] > for2
    - FOR [5,4,3,2,1] > for3
    - SEND_MESSAGE >> &e%for2% &a%for3%
    - END_FOR for3
    - END_FOR for2

What exactly happened here is that the FOR loops got stacked so the first FOR command will run the commands in it which is another FOR command that will run 5 times.

If you're gonna focus on the SEND_MESSAGE command, the reason it ran 15 times because the first FOR command executed what's inside it by 3 while the second FOR command executed the SEND_MESSAGE command 5 times which totals 15 times.

It works with score variable list placeholders

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - FOR %score_variables_myList% > for4
    - minecraft:effect give %for4% speed 60 2
    - END_FOR for4

Run commands randomly ?

RANDOM_RUN / RANDOM_END

  • Info: A command mainly used for RNG.

  • RANDOM_RUN

    • Info: The first part of the command

    • Command: RANDOM_RUN selectionCount:{amount}

      • selectionCount: The amount of commands that will be randomly selected inside of the command line. Placeholders are supported

  • RANDOM_END

    • Info: The other part of the command

    • Command: RANDOM_END

To be able to run multiple commands in one command line inside the RANDOM part use +++

  • Example:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - minecraft:give %player% coal 1
    - minecraft:give %player% iron_ingot 1
    - minecraft:give %player% gold_ingot 1
    - RANDOM_END

This means that you have a 1/3 chance of getting coal, iron or gold

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:2'
    - minecraft:give %player% diamond 1 +++ SEND_MESSAGE &aYou receive &b1 Diamond
    - minecraft:give %player% emerald 1 +++ SEND_MESSAGE &aYou receive &21 Emerald
    - minecraft:give %player% diamond_block 1 +++ SEND_MESSAGE &aYou receive &b1 Diamond block
    - RANDOM_END

This means that from the 3 give commands, 2 of the randomly chosen command lines will run.

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - NOTHING*9
    - minecraft:give %player% diamond_block 1
    - RANDOM_END

This means that there's a 10% chance to give you a diamond block.

NOTHING is just a command to adjust y percentage and if you want a case where the RNG will do nothing.

It supports placeholders

NOTHING*

  • Info: Mainly used for RANDOM_RUN commands as a "dummy" command for RNG adjustments

  • Command: NOTHING*{amount}

  • Example of usage:

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - NOTHING*99
    - minecraft:give %player% diamond 1
    - RANDOM_END

This command line means that there is a 1/100 chance it will give you a diamond

More Examples:

  1. I want to make it so 99% chance it will give me dirt and 1% chance to give me diamond BUT I don't want to write 99 lines of the give dirt command.

  • So here is how to do it.

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'LOOP_START loopCount:99' 
    - minecraft:give %player% dirt 1
    - LOOP_END
  • The 99 represents that any commands inside the loop command will be duplicated 99 times. You will only see the give command and the loop command but the plugin sees 99 give commands.

  • Here is what the plugin sees

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1
    - minecraft:give %player% dirt 1

(You get the idea.)

  • So let's go back to our main objective. 99% chance to get dirt, 1% chance to get diamond. The RANDOM_RUN command evenly gives the same RNG rates to all the commands inside the RANDOM_RUN command.

The (5%) percentage stuff is not part of the command. It's written here in the wiki for you to acknowledge the chances for that command to be selected from the list of commands

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - minecraft:give %player% dirt #(1/2 = 50%)
    - minecraft:give %player% diamond #(1/2 = 50%)
    - RANDOM_END
activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - minecraft:give %player% dirt #(1/3 = 33%)
    - minecraft:give %player% diamond #(1/3 = 33%)
    - minecraft:give %player% diamond #(1/3 = 33%)
    - RANDOM_END
activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - minecraft:give %player% dirt #(1/4 = 25%)
    - minecraft:give %player% dirt #(1/4 = 25%)
    - minecraft:give %player% diamond #(1/4 = 25%)
    - NOTHING*1 #(1/4 = 25%)
    - RANDOM_END
  • After seeing these RANDOM_RUN examples, we will acknowledge that it would work like this.

activators:
  activator0: # Activator ID, you can create as many activator on the activators list
    commands:
    - 'RANDOM_RUN selectionCount:1'
    - 'LOOP_START loopCount:99' 
    - minecraft:give %player% dirt 1  #(99/100 = 99%)
    - LOOP_END
    - minecraft:give %player% diamond 1 #(1/100 = 1%)
    - RANDOM_END
  • The total of the supposed lines is 100 so it's going to be (100 command lines / 100% = 1%) rate per command.

It supports placeholders

PreviousItem CommandsNextCustom Conditions

Last updated 1 month ago

📚
Output of the example 2