Hello everyone,
I’m still a bit confused about the new event cause system.
I get that most points just omit the cause argument (and somehow still work ) but let’s say I want to write custom events that trigger at some point (maybe from the scheduler and an admin command)
Let’s assume it’s a time-based rank event to “level up”:
public class LevelUpEvent extends AbstractEvent implements TargetWarCraftEvent, Cancellable {
...
public LevelUpEvent(Profile target, int levels, Cause cause) {
...
}
How would I build the cause now form the scheduler with only the plugin and for the command containing the command sender as cause - or would that be more fitting for context? and how would I do that if so?
Maybe this was asked before and I’m horrible at searching, but I’m at least as horrible at code-surfing other project, and for anyone else I guess it would be a nice thing to have a topic for this until the docs get updated.
So thanks for any help and hints in advance
Have a nice weekend,
DosMike