JavaUtils is hosted on a custom repository at https://maven.mineking.dev. Replace VERSION with the lastest version (without the v prefix).
Alternatively, you can download the artifacts from jitpack (not recommended).
repositories {
maven { url "https://maven.mineking.dev/releases" }
}
dependencies {
implementation "de.mineking:JavaUtils:VERSION"
}<repositories>
<repository>
<id>mineking</id>
<url>https://maven.mineking.dev/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>de.mineking</groupId>
<artifactId>JavaUtils</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>JavaUtils provides a simple id system that allows you to generate id's that are guaranteed to be unique, based on the current time. You can generate such an id by using:
var id = ID.generate();
System.out.println(id.asString());To extract the timestamp out of an exsiting id you can use
var id = ID.decode("...");
System.out.println(id.getTimeCreated());