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 152
    • Issues 152
    • 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
  • removehelditem

Last edited by Lxlp Nov 29, 2024
Page history
This is an old version of this page. You can view the most recent version or browse the history.

removehelditem

Description

Removes the given amount from the casting player's held item.

This is a no-target mechanic, and the affected player will always be the caster

Easier Alternative: The consumeslot mechanic is likely an easier choice for most use-cases, since it can target entities directly and choose which slot to remove from.

Attributes

Attribute Aliases Description Default
amount a The amount to remove 1

Examples

As a skill that only targets the casting player, a mob may need to use a sudoskill to remove the player's item:

munchy:
  Type: PIG
  Skills:
  - SudoSkill{s=removeApple} @trigger ~onInteract

This will cause a player to cast the removeApple meta-skill when right-clicking the mob:

removeApple:
  Conditions:
  - holding{m=APPLE} true
  Skills:
  - removeHeldItem{amount=1}

This example checks for if the player (now the caster) is holding an apple, and if so, remove 1 from their hand.

Aliases

  • consumeHeldItem
  • takeHeldItem
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs
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
  • 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
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
  • Equipment Slots
  • SkillTree
  • Intratick Scheduling
  • Dynamic Metaskills
Other
  • Pins