Skip to content

Releases: Siroshun09/Event4J

Version 4.0.1

27 Aug 18:20
4e40c1a
Compare
Choose a tag to compare
  • Add missing javadoc
  • Fix deploying javadoc page

Version 4.0.0

27 Aug 17:44
c484489
Compare
Choose a tag to compare

Changes from v3

  • The module name and package has been renamed to dev.siroshun.event4j
  • Redesign API structure and its implementation
  • The implementation of API has been moved to own module (event4j-tree)

Version 4.0.0-rc.2

29 Mar 09:55
88bc576
Compare
Choose a tag to compare
Version 4.0.0-rc.2 Pre-release
Pre-release
release: version 4.0.0-rc.2

Version 4.0.0-rc.1

18 Dec 19:34
7e08648
Compare
Choose a tag to compare
Version 4.0.0-rc.1 Pre-release
Pre-release
release: version 4.0.0-rc.1

Version 3.2.1

24 Apr 08:00
5d59f8c
Compare
Choose a tag to compare
  • Optimize the process that consumes PostResult
  • Update dependencies

Version 3.2.0

26 Jun 13:31
8ecd70f
Compare
Choose a tag to compare

Remove deprecated method

  • EventBus#unsubscribeAll(MultipleListeners)

Version 3.1.0

08 Jun 20:34
6d0cb92
Compare
Choose a tag to compare

Addition

  • EventBus#unsubscribe(SubscribedListener) and EventBus#unsubscribeAll(List)

Deprecates for Removal

  • EventBus#unsubscribeAll(MultipleListeners)
    • MultipleListeners instances should not be held in the EventBus; unsubscribing a listener using Key will not remove the MultipleListeners instance from the map.

Version 3.0.1

13 Apr 15:03
7fc96c7
Compare
Choose a tag to compare

Improvements

Documentation

  • mark PostResult passed to Consumer as @NotNull (e884f05)
  • improve Priority javadoc (320346b)

Internal Code

  • simplify consumeResult calls (f964a05)

Version 3.0.0

17 Dec 14:10
938fb77
Compare
Choose a tag to compare

⚠️ THIS UPDATE HAS BREAKING API CHANGES ⚠️

API Changes

  • EventBus can have any event type.
    • The default EventBus created by EventBus#create uses Event as the top-level event type.
  • HandlerList has been renamed to EventSubscriber
    • To get the EventSubscriber, use EventBus#getSubscriber(Class)
  • EventSubscriber#post (HandlerList#post in v2) returns PostResult
  • EventBus and EventSubscriber is closeable (not Java's Closeable).
  • EventSubscriber#subscribe (HandlerList#subscribe in v2) returns SubscribedListener.
  • Priority#of -> Priority#value

Added APIs

PostResult

PostResult indicates the result of posting the event to listeners in the EventSubscriber.

To use this, add Consumer<PostResult<?>> to EventBus (EventBus#addResultConsumer).

MultipleListeners

MultipleListeners is an interface to create multiple listeners in the class.

Example:

 public class SampleListeners implements MultipleListeners {
     @Subscribe
     public void onEventNormal(@NotNull Event event) {
         // do something
     }

     @Subscribe(priority = Priority.HIGH_VALUE)
     public void onEventHigh(@NotNull Event event) {
         // do something
     }
 }

To subscribe listeners, use EventBus#subscribeAll.

For more information, please read the Javadoc.

Version 2.2.0

13 Nov 06:57
9782e45
Compare
Choose a tag to compare

add EventBus#callEventAsync