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 160
    • Issues 160
    • 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
    • Conditions
  • VariableContains

Last edited by Lxlp Jul 22, 2025
Page history

VariableContains

Descriptions

Checks if the given variable contains a certain value.

  • For String variables, is it checked if the variable contains a substring. Based on the compareType used, it can also be checked if the variable "starts with" or "ends with" the given value.
  • For List or Set variables
    • If the value is a simple string, it is checked if the List or Set contains the value
    • If the entry is another List or Set, it is checked if the variable contains all or any of the elements of the value, based on the compareType.

Attributes

Attribute Aliases Description Default
variable name, n, var, key, k The name of the variable. Can optionally be prefixed with scope
scope s The scope of the variable, e.g. where the variable is located
compareType compare, comp The comparison type to use. Can be ALL, ANY, STARTS_WITH or ENDS_WITH. ALL
value val, v The value of the comparison

CompareType attribute

If the variable is a String, you can use either the STARTS_WITH or ENDS_WITH to check if the variable starts with or ends with the given value

If the variable is a List or Set and the value is also a List or Set, you can use ALL to check if all elements of the value are present in the variable, or ANY to check if at least one element is present

Examples

  Conditions:
  - variablecontains{var=skill.examplelist;val=hello}

  - variablecontains{var=skill.examplelist;val=hello,world;compareType=ANY}

  - variablecontains{var=skill.examplestring;val=pizza}

  - variablecontains{var=skill.examplestring;val=dungeon_;compareType=STARTS_WITH}

Aliases

  • variableContain
  • varContains
  • varContain
  • varCont
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine

Skills
  • Mechanics
    • Mechanics by Tag
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables

Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework

Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops

Spawning
  • Spawners
  • Random Spawns

Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats

Other
  • Math
  • Pins

Enums
  • Particles Types
  • Audience
  • Equipment Slots
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Shape
Technical
  • Item Matcher
  • SkillTree
  • Advanced User Guides and Techniques