A Java API for Dubtrack.
This project uses JitPack as a maven repository (for now).
Respository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Dependency:
<dependency>
<groupId>com.github.sponges</groupId>
<artifactId>dubtrack4j</artifactId>
<version>1.06-SNAPSHOT</version>
</dependency>
DubtrackBuilder builder = new DubtrackBuilder(username, password);
// here you can set the properties with the builder instance
DubtrackAPI dubtrack = builder.buildAndLogin();
This method takes a String room name, which is found at the end of the join url. http://dubtrack.fm/join/RoomName
Room room = dubtrack.joinRoom(roomName);
The EventBus
class uses consumers to handle events.
dubtrack.getEventBus().register(UserChatEvent.class, event -> {
System.out.println("Got message: " + event.getMessage().getContent());
});
See the Event package to see all the available events.
room.sendMessage("This is a message!");
Check out the javadocs @ placeholder.exe