Custom events
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
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 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.
Yeah that sounds like what you're wanting. What does the scheduler not do that is what you're describing?
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 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.