Skip to content

A small java event system with preferential dispatch

License

Notifications You must be signed in to change notification settings

collarmc/pounce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pounce

A small event system with preferential dispatch

Example

class MyEvent {}

class CallerListener {
    @Subscribe(Preference.CALLER)
    public void exec(MyEvent event) {
        System.out.println("event recieved")
    }
}

EventBus eventBus = new EventBus(Runnable::run);

CallerListener listener = new CallerListener();
eventBus.subscribe(listener);

eventBus.publish(new MyEvent());

About

A small java event system with preferential dispatch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages