SQL support for Java8

This commit is contained in:
HaHaWTH 2023-11-11 14:43:59 +08:00
parent 7475cd8ea4
commit ee58da2b39
2 changed files with 4 additions and 4 deletions

View File

@ -687,7 +687,7 @@
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
<version>5.0.1</version> <!-- Latest java 8 release --> <version>4.0.3</version> <!-- Latest java 8 release -->
<optional>true</optional> <optional>true</optional>
<exclusions> <exclusions>
<exclusion> <exclusion>
@ -700,7 +700,7 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId> <artifactId>slf4j-simple</artifactId>
<version>2.0.5</version> <!-- We can't update to 2.x as long as we use HikariCP for java 8 --> <version>1.7.36</version> <!-- We can't update to 2.x as long as we use HikariCP for java 8 -->
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>

View File

@ -73,7 +73,7 @@ public class AntiBotService implements SettingsDependent {
// Delay the schedule on first start // Delay the schedule on first start
if (startup) { if (startup) {
int delay = settings.getProperty(ProtectionSettings.ANTIBOT_DELAY); int delay = settings.getProperty(ProtectionSettings.ANTIBOT_DELAY);
bukkitService.scheduleSyncDelayedTask(enableTask, delay * TICKS_PER_SECOND); bukkitService.scheduleSyncDelayedTask(enableTask, (long) delay * TICKS_PER_SECOND);
startup = false; startup = false;
} else { } else {
enableTask.run(); enableTask.run();
@ -91,7 +91,7 @@ public class AntiBotService implements SettingsDependent {
disableTask.cancel(); disableTask.cancel();
} }
// Schedule auto-disable // Schedule auto-disable
disableTask = bukkitService.runTaskLater(this::stopProtection, duration * TICKS_PER_MINUTE); disableTask = bukkitService.runTaskLater(this::stopProtection, (long) duration * TICKS_PER_MINUTE);
antiBotStatus = AntiBotStatus.ACTIVE; antiBotStatus = AntiBotStatus.ACTIVE;
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> { bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> {
// Inform admins // Inform admins