Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

vectrixdevelops-archive/rxs

Repository files navigation

RXS (ReactiveX for Sponge)

RXS is a ReactiveX wrapper over Sponge events and scheduler with a few common utilities.

Details

  • RxJava 1.3.8
  • SpongeAPI 7.1.0

Using

RXS is a plugin dependency that you can depend on with your plugin to use ReactiveX with Sponge. This also comes with a handy rxdebug command to toggle assembly tracking.

final RxSpongeScheduler syncScheduler = new RxSpongeScheduler(this, false);
final RxSpongeScheduler asyncScheduler = new RxSpongeScheduler(this, true);
final RxSpongeEventStreamer eventStreamer = new RxSpongeEventStreamer(this, syncScheduler, asyncScheduler);
final RxSpongePlayerStreamer playerStreamer = new RxSpongePlayerStreamer(this, syncScheduler, asyncScheduler);

eventStreamer.observeEvent(ClientConnectionEvent.Join.class)
                .subscribe(result -> result.getTargetEntity().sendMessage(Text.of("Hello there.")));

Credits

About

RXS - ReactiveX wrapper for Sponge.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages