jdash-events

A Java library for Geometry Dash events.

License

License

GroupId

GroupId

com.github.alex1304
ArtifactId

ArtifactId

jdash-events
Last Version

Last Version

2.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

jdash-events
A Java library for Geometry Dash events.
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/Alex1304/jdash-events/tree/master

Download jdash-events

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.alex1304/jdash-events/ -->
<dependency>
    <groupId>com.github.alex1304</groupId>
    <artifactId>jdash-events</artifactId>
    <version>2.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.alex1304/jdash-events/
implementation 'com.github.alex1304:jdash-events:2.0.4'
// https://jarcasting.com/artifacts/com.github.alex1304/jdash-events/
implementation ("com.github.alex1304:jdash-events:2.0.4")
'com.github.alex1304:jdash-events:jar:2.0.4'
<dependency org="com.github.alex1304" name="jdash-events" rev="2.0.4">
  <artifact name="jdash-events" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.alex1304', module='jdash-events', version='2.0.4')
)
libraryDependencies += "com.github.alex1304" % "jdash-events" % "2.0.4"
[com.github.alex1304/jdash-events "2.0.4"]

Dependencies

compile (1)

Group / Artifact Type Version
com.github.alex1304 : jdash jar 3.3.7

Project Modules

There are no modules declared in this project.

JDash Events

Maven Central

A Java library for Geometry Dash events.

Installation

You can install the latest version with Maven:

<dependency>
	<groupId>com.github.alex1304</groupId>
	<artifactId>jdash-events</artifactId>
	<version><!-- Latest version number --></version>
</dependency>

How to use it

// Build an authenticated GD client
AuthenticatedGDClient client = GDClientBuilder.create().buildAuthenticated(args[0], args[1]);
// Create the event dispatcher
GDEventDispatcher dispatcher = new GDEventDispatcher();
// Subscribe to any events you want!
dispatcher.on(AwardedLevelAddedGDEvent.class)
		.subscribe(System.out::println);
// In order to dispatch new events, you can either do it manually...
client.getLevelById(10565740)
		.map(AwardedLevelAddedGDEvent::new)
		.subscribe(dispatcher::dispatch);
// ...or automatically via a scanner loop!
// Scanners are capable of refreshing a certain resource in the game at regular intervals
// in order to produce new events.
Collection<GDEventScanner> scanners = new ArrayList<>();
scanners.add(new AwardedSectionScanner());
scanners.add(new DailyLevelScanner());
scanners.add(new WeeklyDemonScanner());
// Create the scanner loop and start scanning for events
GDEventScannerLoop scannerLoop = new GDEventScannerLoop(client, dispatcher, scanners, Duration.ofSeconds(5));
scannerLoop.start();

License

MIT

Contribute

Issues and Pull requests are more than welcome ! There is no guide that tells how to structure them, but if you explain clearly what you did in your pull request, we will be able to dicuss about it and getting it eventually merged. This is the same for issues, feel free to submit them as long as they are clear.

Contact

E-mail: [email protected]

Discord: Alex1304#9704

Twitter: @gd_alex1304

Versions

Version
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.1
1.0.0