Editing
MinecraftCommands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== effect === {{/infobox |effect |op |1.5|13w09b }} The '''effect''' command manages [[status effect]]s on players and other entities. ;Syntax : <code>effect <''player''> clear</code> (removes all effects) : <code>effect <''player''> <''effect''> [''seconds''] [''amplifier''] [''hideParticles'']</code> (gives an effect) ;Arguments : ''player'' :: Specifies the target(s). Must be a player name or a [[#Target selectors|target selector]] (<code>@e</code> is permitted to target entities other than players). : ''effect'' :: Specifies the effect to grant. Must be a [[Data values#Status effects|status effect id]] (for example, <code>1</code> or <code>minecraft:speed</code>). : ''seconds'' (optional) :: Specifies the effect's duration in seconds. Must be between 0 and 1,000,000 (inclusive). If not specified, defaults to 30 seconds. : ''amplifier'' (optional) :: Specifies the number of additional levels to add to the effect. Must be between 0 and 255 (inclusive). If not specified, defaults to 0. Note that the first tier of a status effect (e.g. Regeneration I) is 0, so the second tier, for example Regeneration II, would be specified by an amplifier level of 1. : ''hideParticles'' (optional) :: Specifies whether the [[particle]]s of the status effect should be hidden. Must be either <code>true</code> or <code>false</code>. If not specified, defaults to <code>false</code>. ;Result : Fails if arguments are not specified correctly, if ''player'' fails to resolve to one or more valid entities (named players must be online), if ''seconds'' was specified as 0 and the target did not have the effect, or if no effects were removed in <code>clear</code> mode. : On success: :* <code>clear</code> β clears all status effects from the target(s). :* ''effect'' β Adds the status effect to the target(s). If a target already has the status effect, a new status effect with the same amplifier will only override the old duration if it is longer, but a new status effect with a higher duration will override any previous duration. If seconds is set to 0, cancels the specified effect instead. ;Examples : To grant a Speed 1 effect to the nearest player for 60 seconds: <code>effect @p 1 60</code> : To grant a Speed 3 effect to the nearest player for 60 seconds: <code>effect @p minecraft:speed 60 2</code> : To clear any Haste effects from all players: <code>effect @a minecraft:haste 0</code> : To clear all effects from all zombies: <code>effect @e[type=Zombie] clear</code> <!-- please retain double newline above for section differentiation -->
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information