Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
    • Mechanics
  • command

command · Changes

Page history
Create skills/mechanics/command authored Aug 11, 2020 by Ashen's avatar Ashen
Hide whitespace changes
Inline Side-by-side
Showing with 55 additions and 0 deletions
+55 -0
  • skills/mechanics/command.md skills/mechanics/command.md +55 -0
  • No files found.
skills/mechanics/command.md 0 → 100644
View page @ b961120b
Mechanic: Command
=================
Executes a command for each target supplied.
Color codes and variables are allowed. For a list of color codes look
[here](/databases/misc/colorcodes). Variables can be found
[here](/skills/stringvariables).
The command specified will not function correctly if it contains double
quotes " or curly brackets {} and must be substitued with their
respective [message variables](/skills/stringvariables). For a more
in-depth tutorial on how to use command-skills see [command-skills
tutorial](/tutorials/commandskills). That happens because the double
quotes and curly brackets are reserved for MythicMobs itself trying to
read the syntax you supplied.
`Update: as of MythicMobs 2.4 curly brackets {} do not need to be replaced with message variables anymore. Double quotes " however, still need replacements.`
Attributes
----------
| Attribute | Aliases | Description | Default |
|---------------|---------|--------------------------------------------------------------------------|---------|
| command | c | The command to execute | |
| asCaster | ac | If true the command will execute from the caster instead of the console. | false |
| asOp | op | Whether to execute the command with all permissions | false |
| asTarget | at | Executes the command as the skill target | false |
| requireTarget | rt | Only executes if the skill has a target | false |
Examples
--------
### Correctly written command-skills
Skills:
- command{c="give <target.name> gold_bar 20"} @trigger ~onInteract
- command{c="minecraft:tp <target.name> <mob.uuid>"} @self ~onDamaged
- command{c="minecraft:summon Zombie ~ ~ ~ <&lc>NoAI:true,CustomName:<&dq>Summoned Zombie<&dq><&rc>"}
- command{c="minecraft:summon Zombie ~ ~ ~ {NoAI:true,CustomName:<&dq>Summoned Zombie<&dq>}"}
### Invalid command-skills
The below example(s) won't work because certain symbols haven't been
substituted with message variables.
Skills:
- command{c="minecraft:summon Zombie ~ ~ ~ {NoAI:true,CustomName:"Summoned Zombie"}"}
Tutorials
---------
- [Villager trades using cmd-mechanics by
Krowerom](https://www.youtube.com/watch?v=p71bl_W3a4I&feature=youtu.be)
Clone repository
  • Home
  • Changelogs
  • Premium Features
  • Commands and Permissions
  • FAQ / Common Issues
  • Mythic Add-ons
  • Compatible Plugins
  • API Information

Mobs

  • Overview
  • Types
  • Mob Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Extra: Disguises
  • Extra: MiniaturePets

Skills

  • Overview
  • Mechanics
  • Effects
  • Targeters
  • Triggers
  • Conditions
  • Placeholders
  • Variables

Items & Drops

  • Drops and Drop Tables
  • Options
  • Attributes
  • Common Item ID's
  • Enchantments
  • Potions
  • Banner Layers

Spawning

  • Spawners
  • Random Spawns