New /Execute feature! - /execute inEvent (or) /execute whenEvent
inEvent, whenEvent (or when), and whileEvent (or while), anything like this, would be an condition when an player execute an action, example, walk, pressKey (A, C, W, 5, etc.), jump, rightClick, leftClick, middleClick (or just "click" for detect any of the 3 click types), scroll, etc., an good idea for scripting in command blocks
Here is some examples of an command block using that.
Command 1: /execute inEvent click at @s run summon fireball ^ ^ 1.2 ^1.3
Command 2: /execute when rightClick at @s run summon fireball ^ ^ 1.2 ^1.3
(Command 1: While the command block is activated, when an player click middle, right or left, it will summon an fireball for him)
(Command 2: While the command block is activated, when an player right click it will summon an fireball for him)
Please sign in to leave a comment.