
Official plugin created for mclista.pl website.
Simple configuration, very fast and reliable.
⚙️ Requirements
- Paper engine (1.8 - 1.21.8)
- Server on website mclista.pl
- OPTIONAL: Database mysql/mariadb/mongodb
💛 API module
Api may add to project maven/gradle
Currently supported platforms:
- bukkit
- velocity (in feature)
Maven
<repositories>
<repository>
<id>mclista-repository-releases</id>
<name>Repozytorium McLista</name>
<url>https://repository.mclista.pl/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>pl.mclista</groupId>
<artifactId>mclista-{platform}-api</artifactId>
<version>1.1.0-beta2</version>
</dependency>
</dependencies>
Gradle
maven {
name = "mclistaRepositoryReleases"
url = uri("https://repository.mclista.pl/releases")
}
implementation("pl.mclista:mclista-{platform}-api:1.1.0-beta2")
🤖 API usage
In first order i recommend get class DeveloperService by registry.
Example for bukkit api:
RegisteredServiceProvider<DeveloperService> provider = Bukkit.getServicesManager().getRegistration(DeveloperService.class);
if (provider != null) {
DeveloperService developerService = provider.getProvider();
}
DeveloperService returns two objects, UserService and RewardApiClient.
Every action that returns object will return DeveloperService:
@NotNull RESULT getResult();
@Nullable Optional<Throwable> getThrowable();
Event handling
Plugin currently has 2 events:
- PostRewardReceiveEvent (Event calling after receive reward)
- PreRewardReceiveEvent (Event calling beforce receive reward, is cancellable)
Event for every module has prefix {platform}, e.g.:
BukkitPreRewardReceiveEvent.
UserService
Class UserService allows to operate on users, include offline users.
It gives you complete freedom in managing users.
void addUser(@NotNull User user);
void removeUser(@NotNull UUID uuid);
Optional<User> getUser(@NotNull UUID uuid);
@NotNull CompletableFuture<DeveloperAction<User>> loadUser(@NotNull UUID uuid);
@NotNull CompletableFuture<DeveloperAction<User>> modifyUser(@NotNull UUID uuid, @NotNull Consumer<User> userConsumer);
@NotNull CompletableFuture<DeveloperAction<Boolean>> saveUser(@NotNull User user);
@NotNull Set<User> getUsers();
@NotNull CompletableFuture<DeveloperAction<Set<User>>> loadUsers();
RewardApiClient
This object allows you to send a query to the API and receive a response indicating whether the player has voted on the list on our server or not.
To check whether the user has received a reward today, you need to compare the delay with the current time from the User object.
Alternatively, you can also set your own delay—the choice is yours!

