AMP icon indicating copy to clipboard operation
AMP copied to clipboard

Custom events

Open zer0origin opened this issue 3 months ago • 5 comments

I confirm that

  • [x] I have searched for an existing feature request matching the description.

Feature Description

It would be really cool if i could create a custom event with logic, say "send input to console -> tellraw @a HEY EVERYONE!!" and then be able to trigger this event from anywhere inside that instance for example

trigger event -> select custom event -> MyCustomEvent

zer0origin avatar Sep 13 '25 23:09 zer0origin

It sounds like you're looking for the scheduler. You can make a disabled event that you hit the play button on whenever you want to run it.

IceOfWraith avatar Sep 13 '25 23:09 IceOfWraith

@IceOfWraith the idea would be to have the same code block used in multiple places, and changes only neededing to be made once. A code block that can be triggered programmically and reused.

zer0origin avatar Sep 13 '25 23:09 zer0origin

Yeah that sounds like what you're wanting. What does the scheduler not do that is what you're describing?

IceOfWraith avatar Sep 13 '25 23:09 IceOfWraith

I think they more mean a way to define a collection of tasks, then trigger that "function" like it were a task itself. Not sure how it would fit into the existing system, but it sounds neat.

p0t4t0sandwich avatar Sep 14 '25 00:09 p0t4t0sandwich

@p0t4t0sandwich yeah.

well you can set a trigger to be an event, so instead of it being some kind of new function feature, it could just be an extention of the event system. we get given the ability to emit (custom) events and then that code block can then be executed. I think it should be a per-instance deal like everything else, and it should be defined in the schedule where events get acted upon.

zer0origin avatar Sep 14 '25 03:09 zer0origin