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>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.0.1</version> <!-- Latest java 8 release -->
<version>4.0.3</version> <!-- Latest java 8 release -->
<optional>true</optional>
<exclusions>
<exclusion>
@ -700,7 +700,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<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>
</dependency>

View File

@ -73,7 +73,7 @@ public class AntiBotService implements SettingsDependent {
// Delay the schedule on first start
if (startup) {
int delay = settings.getProperty(ProtectionSettings.ANTIBOT_DELAY);
bukkitService.scheduleSyncDelayedTask(enableTask, delay * TICKS_PER_SECOND);
bukkitService.scheduleSyncDelayedTask(enableTask, (long) delay * TICKS_PER_SECOND);
startup = false;
} else {
enableTask.run();
@ -91,7 +91,7 @@ public class AntiBotService implements SettingsDependent {
disableTask.cancel();
}
// 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;
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> {
// Inform admins