Skip to content

Usage, #2

@aKardasz

Description

@aKardasz

Hello,
It is surprising that you don't study too far from me, especially since you were a minecraft idol on hf for me when I was younger. ( I go to WIU ) but that is besides the point.

I was looking at the eventmanager and I get the basic use of it, however I don't feel as if I am properly implementing it. I am used to the basic module class that has onEnabled, OnDisable, OnTick etc.

Would having something like:
emitter.on(keyPressEvent.class, e -> this.onToggle(e.getKey()));
in the constructor of the module be the proper way to use this?
So then all I would have to do is in my main class just do something like
MyModule module = new MyModule() to have it registered.

Then in ontoggle the you enable or disable, so that when you enable that is when you register all other events as needed.

(I pm'd you on hf, but saw that it has been a really long time since you last posted, figured I'd ask on here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions