Progress but no progress?
This commit is contained in:
parent
95d219d546
commit
2c0d255219
|
|
@ -3,23 +3,18 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
// Galaxy
|
||||
compileOnly("com.alttd:galaxy-api:1.17.1-R0.1-SNAPSHOT")
|
||||
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT")
|
||||
compileOnly("net.kyori:adventure-text-minimessage:4.2.0-SNAPSHOT") // Minimessage
|
||||
compileOnly("org.spongepowered:configurate-yaml:4.1.2") // Configurate
|
||||
compileOnly("net.luckperms:api:5.3") // Luckperms
|
||||
}
|
||||
|
||||
//publishing {
|
||||
// publications {
|
||||
// create<MavenPublication>("mavenJava") {
|
||||
// from(components["java"])
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// repositories{
|
||||
// maven {
|
||||
// name = "maven"
|
||||
// url = uri("http://leo:8081/")
|
||||
// isAllowInsecureProtocol = true
|
||||
// credentials(PasswordCredentials::class)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
publishing {
|
||||
repositories{
|
||||
maven {
|
||||
name = "maven"
|
||||
url = uri("https://repo.destro.xyz/snapshots")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.alttd.boosters.api;
|
||||
package com.alttd.boosterapi;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -35,4 +35,8 @@ public interface Booster {
|
|||
void stopBooster();
|
||||
|
||||
void saveBooster();
|
||||
|
||||
void finish();
|
||||
|
||||
boolean finished();
|
||||
}
|
||||
14
api/src/main/java/com/alttd/boosterapi/BoosterAPI.java
Normal file
14
api/src/main/java/com/alttd/boosterapi/BoosterAPI.java
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package com.alttd.boosterapi;
|
||||
|
||||
import net.luckperms.api.LuckPerms;
|
||||
|
||||
public interface BoosterAPI {
|
||||
|
||||
static BoosterAPI get() {
|
||||
return BoosterImplementation.get();
|
||||
}
|
||||
|
||||
LuckPerms getLuckPerms();
|
||||
|
||||
void reloadConfig();
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.alttd.boosterapi;
|
||||
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.alttd.boosterapi.database.Database;
|
||||
import net.luckperms.api.LuckPerms;
|
||||
import net.luckperms.api.LuckPermsProvider;
|
||||
|
||||
public class BoosterImplementation implements BoosterAPI {
|
||||
|
||||
private static BoosterAPI instance;
|
||||
|
||||
private LuckPerms luckPerms;
|
||||
private Database database;
|
||||
|
||||
public BoosterImplementation() {
|
||||
instance = this;
|
||||
reloadConfig();
|
||||
|
||||
luckPerms = getLuckPerms();
|
||||
}
|
||||
|
||||
public static BoosterAPI get() {
|
||||
if (instance == null)
|
||||
instance = new BoosterImplementation();
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LuckPerms getLuckPerms() {
|
||||
if(luckPerms == null)
|
||||
luckPerms = LuckPermsProvider.get();
|
||||
return luckPerms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadConfig() {
|
||||
Config.init();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.alttd.boosters.api;
|
||||
package com.alttd.boosterapi;
|
||||
|
||||
public enum BoosterType {
|
||||
|
||||
|
|
@ -6,6 +6,7 @@ public enum BoosterType {
|
|||
* MCMMO - implies all mcmmo skills are boosted
|
||||
*/
|
||||
MCMMO("mcmmo"),
|
||||
// TODO : add individual mcmmo skills
|
||||
/**
|
||||
* MYPET - Boosts MyPet exp gains
|
||||
*/
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
package com.alttd.vboosters.config;
|
||||
package com.alttd.boosterapi.config;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.reflect.TypeToken;
|
||||
import ninja.leaping.configurate.ConfigurationNode;
|
||||
import ninja.leaping.configurate.ConfigurationOptions;
|
||||
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
|
||||
import ninja.leaping.configurate.yaml.YAMLConfigurationLoader;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import com.alttd.boosterapi.util.ALogger;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import org.spongepowered.configurate.ConfigurationNode;
|
||||
import org.spongepowered.configurate.ConfigurationOptions;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
import org.spongepowered.configurate.yaml.NodeStyle;
|
||||
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class Config {
|
||||
|
|
@ -23,7 +22,7 @@ public final class Config {
|
|||
|
||||
private static File CONFIG_FILE;
|
||||
public static ConfigurationNode config;
|
||||
public static YAMLConfigurationLoader configLoader;
|
||||
public static YamlConfigurationLoader configLoader;
|
||||
|
||||
static int version;
|
||||
static boolean verbose;
|
||||
|
|
@ -32,9 +31,9 @@ public final class Config {
|
|||
public static void init() {
|
||||
CONFIGPATH = new File(System.getProperty("user.home") + File.separator + "share" + File.separator + "configs" + File.separator + "Boosters");
|
||||
CONFIG_FILE = new File(CONFIGPATH, "config.yml");
|
||||
configLoader = YAMLConfigurationLoader.builder()
|
||||
.setFile(CONFIG_FILE)
|
||||
.setFlowStyle(DumperOptions.FlowStyle.BLOCK)
|
||||
configLoader = YamlConfigurationLoader.builder()
|
||||
.file(CONFIG_FILE)
|
||||
.nodeStyle(NodeStyle.BLOCK)
|
||||
.build();
|
||||
if (!CONFIG_FILE.getParentFile().exists()) {
|
||||
if(!CONFIG_FILE.getParentFile().mkdirs()) {
|
||||
|
|
@ -52,7 +51,7 @@ public final class Config {
|
|||
}
|
||||
|
||||
try {
|
||||
config = configLoader.load(ConfigurationOptions.defaults().setHeader(HEADER));
|
||||
config = configLoader.load(ConfigurationOptions.defaults().header(HEADER));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
@ -76,23 +75,19 @@ public final class Config {
|
|||
method.setAccessible(true);
|
||||
method.invoke(instance);
|
||||
} catch (InvocationTargetException | IllegalAccessException ex) {
|
||||
throw Throwables.propagate(ex.getCause());
|
||||
ALogger.fatal("Error reading config", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
configLoader.save(config);
|
||||
} catch (IOException ex) {
|
||||
throw Throwables.propagate(ex.getCause());
|
||||
}
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
public static void saveConfig() {
|
||||
try {
|
||||
configLoader.save(config);
|
||||
} catch (IOException ex) {
|
||||
throw Throwables.propagate(ex.getCause());
|
||||
ALogger.fatal("Error saving config", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,66 +96,85 @@ public final class Config {
|
|||
}
|
||||
|
||||
private static void set(String path, Object def) {
|
||||
if(config.getNode(splitPath(path)).isVirtual())
|
||||
config.getNode(splitPath(path)).setValue(def);
|
||||
if(config.node(splitPath(path)).virtual()) {
|
||||
try {
|
||||
config.node(splitPath(path)).set(def);
|
||||
} catch (SerializationException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setString(String path, String def) {
|
||||
try {
|
||||
if(config.getNode(splitPath(path)).isVirtual())
|
||||
config.getNode(splitPath(path)).setValue(TypeToken.of(String.class), def);
|
||||
} catch(ObjectMappingException ex) {
|
||||
if(config.node(splitPath(path)).virtual())
|
||||
config.node(splitPath(path)).set(TypeToken.get(String.class), def);
|
||||
} catch(SerializationException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean getBoolean(String path, boolean def) {
|
||||
set(path, def);
|
||||
return config.getNode(splitPath(path)).getBoolean(def);
|
||||
return config.node(splitPath(path)).getBoolean(def);
|
||||
}
|
||||
|
||||
private static double getDouble(String path, double def) {
|
||||
set(path, def);
|
||||
return config.getNode(splitPath(path)).getDouble(def);
|
||||
return config.node(splitPath(path)).getDouble(def);
|
||||
}
|
||||
|
||||
private static int getInt(String path, int def) {
|
||||
set(path, def);
|
||||
return config.getNode(splitPath(path)).getInt(def);
|
||||
return config.node(splitPath(path)).getInt(def);
|
||||
}
|
||||
|
||||
private static String getString(String path, String def) {
|
||||
setString(path, def);
|
||||
return config.getNode(splitPath(path)).getString(def);
|
||||
return config.node(splitPath(path)).getString(def);
|
||||
}
|
||||
|
||||
private static Long getLong(String path, Long def) {
|
||||
set(path, def);
|
||||
return config.getNode(splitPath(path)).getLong(def);
|
||||
return config.node(splitPath(path)).getLong(def);
|
||||
}
|
||||
|
||||
private static <T> List<String> getList(String path, T def) {
|
||||
try {
|
||||
set(path, def);
|
||||
return config.getNode(splitPath(path)).getList(TypeToken.of(String.class));
|
||||
} catch(ObjectMappingException ex) {
|
||||
return config.node(splitPath(path)).getList(TypeToken.get(String.class));
|
||||
} catch(SerializationException ex) {
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private static ConfigurationNode getNode(String path) {
|
||||
if(config.getNode(splitPath(path)).isVirtual()) {
|
||||
//new RegexConfig("Dummy");
|
||||
}
|
||||
config.getChildrenMap();
|
||||
return config.getNode(splitPath(path));
|
||||
/** ONLY EDIT ANYTHING BELOW THIS LINE **/
|
||||
public static String driver = "com.mysql.cj.jdbc.Driver";
|
||||
public static String host = "13.11.1.78";
|
||||
public static String port = "3306";
|
||||
public static String database = "McTestSql";
|
||||
public static String user = "root";
|
||||
public static String password = "foobar";
|
||||
public static String options = "?MaxPooledStatements=250&useSSL=false&autoReconnect=true&maxReconnects=3";
|
||||
private static void databaseSettings() {
|
||||
String path = "database.";
|
||||
driver = getString(path + "driver", driver);
|
||||
host = getString(path + "host", host);
|
||||
port = getString(path + "port", port);
|
||||
database = getString(path + "database", database);
|
||||
user = getString(path + "user", user);
|
||||
password = getString(path + "password", password);
|
||||
options = getString(path + "options", options);
|
||||
}
|
||||
|
||||
/** ONLY EDIT ANYTHING BELOW THIS LINE **/
|
||||
public static Long queueTaskCheckFrequency = 1L;
|
||||
public static Long activeTaskCheckFrequency = 1L;
|
||||
private static void BoosterTaskSettings() {
|
||||
queueTaskCheckFrequency = getLong("task.queue-frequency", queueTaskCheckFrequency);
|
||||
public static Long taskCheckFrequency = 1L;
|
||||
private static void boosterTaskSettings() {
|
||||
activeTaskCheckFrequency = getLong("task.queue-frequency", activeTaskCheckFrequency);
|
||||
taskCheckFrequency = getLong("task.check-frequency", taskCheckFrequency);
|
||||
}
|
||||
|
||||
public static String pluginMessageChannel = "altitude:boosterplugin";
|
||||
private static void pluginMessageSettings() {
|
||||
pluginMessageChannel = getString("settings.message-channel", pluginMessageChannel);
|
||||
}
|
||||
|
||||
}
|
||||
74
api/src/main/java/com/alttd/boosterapi/config/ServerConfig.java
Executable file
74
api/src/main/java/com/alttd/boosterapi/config/ServerConfig.java
Executable file
|
|
@ -0,0 +1,74 @@
|
|||
package com.alttd.boosterapi.config;
|
||||
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class ServerConfig {
|
||||
private static final Pattern PATH_PATTERN = Pattern.compile("\\.");
|
||||
|
||||
private final String serverName;
|
||||
private final String configPath;
|
||||
private final String defaultPath;
|
||||
|
||||
public ServerConfig(String serverName) {
|
||||
this.serverName = serverName;
|
||||
this.configPath = "server-settings." + this.serverName + ".";
|
||||
this.defaultPath = "server-settings.default.";
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Config.readConfig(ServerConfig.class, this);
|
||||
Config.saveConfig();
|
||||
}
|
||||
|
||||
public static Object[] splitPath(String key) {
|
||||
return PATH_PATTERN.split(key);
|
||||
}
|
||||
|
||||
private static void set(String path, Object def) {
|
||||
if(Config.config.node(splitPath(path)).virtual()) {
|
||||
try {
|
||||
Config.config.node(splitPath(path)).set(def);
|
||||
} catch (SerializationException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setString(String path, String def) {
|
||||
try {
|
||||
if(Config.config.node(splitPath(path)).virtual())
|
||||
Config.config.node(splitPath(path)).set(TypeToken.get(String.class), def);
|
||||
} catch(SerializationException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getBoolean(String path, boolean def) {
|
||||
set(defaultPath +path, def);
|
||||
return Config.config.node(splitPath(configPath+path)).getBoolean(
|
||||
Config.config.node(splitPath(defaultPath +path)).getBoolean(def));
|
||||
}
|
||||
|
||||
private double getDouble(String path, double def) {
|
||||
set(defaultPath +path, def);
|
||||
return Config.config.node(splitPath(configPath+path)).getDouble(
|
||||
Config.config.node(splitPath(defaultPath +path)).getDouble(def));
|
||||
}
|
||||
|
||||
private int getInt(String path, int def) {
|
||||
set(defaultPath +path, def);
|
||||
return Config.config.node(splitPath(configPath+path)).getInt(
|
||||
Config.config.node(splitPath(defaultPath +path)).getInt(def));
|
||||
}
|
||||
|
||||
private String getString(String path, String def) {
|
||||
set(defaultPath +path, def);
|
||||
return Config.config.node(splitPath(configPath+path)).getString(
|
||||
Config.config.node(splitPath(defaultPath +path)).getString(def));
|
||||
}
|
||||
|
||||
/** DO NOT EDIT ANYTHING ABOVE **/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.alttd.boosterapi.database;
|
||||
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.alttd.boosterapi.util.ALogger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Database {
|
||||
|
||||
private static Connection connection;
|
||||
|
||||
public static Connection getConnection() {
|
||||
if (connection == null) {
|
||||
try {
|
||||
Class.forName(Config.driver);
|
||||
|
||||
connection = DriverManager.getConnection("jdbc:mysql://" + Config.host + ":" + Config.port + "/" + Config.database + Config.options, Config.user, Config.password);
|
||||
} catch (ClassNotFoundException | SQLException ex) {
|
||||
ALogger.fatal("Failed to connect to sql.", ex);
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
if (connection != null) {
|
||||
try {
|
||||
connection.close();
|
||||
|
||||
connection = null;
|
||||
|
||||
} catch (SQLException ex) {
|
||||
ALogger.fatal("Failed to disconnect from sql.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
32
api/src/main/java/com/alttd/boosterapi/util/ALogger.java
Executable file
32
api/src/main/java/com/alttd/boosterapi/util/ALogger.java
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
package com.alttd.boosterapi.util;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
|
||||
public class ALogger {
|
||||
|
||||
private static org.slf4j.Logger logger;
|
||||
|
||||
public static void init(org.slf4j.Logger log) {
|
||||
logger = log;
|
||||
}
|
||||
|
||||
private void log(String message) {
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
public static void warn(String message) {
|
||||
logger.warn(message);
|
||||
}
|
||||
|
||||
public static void info(String message) {
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
public static void error(String message) {
|
||||
logger.error(message);
|
||||
}
|
||||
|
||||
public static void fatal(String error, Exception exception) {
|
||||
logger.error(error + "\n" + ExceptionUtils.getStackTrace(exception));
|
||||
}
|
||||
}
|
||||
21
api/src/main/java/com/alttd/boosterapi/util/Utils.java
Normal file
21
api/src/main/java/com/alttd/boosterapi/util/Utils.java
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package com.alttd.boosterapi.util;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.kyori.adventure.text.minimessage.Template;
|
||||
import net.kyori.adventure.text.minimessage.template.TemplateResolver;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static Component parseMiniMessage(String message, List<Template> templates) {
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
if (templates == null) {
|
||||
return miniMessage.deserialize(message);
|
||||
} else {
|
||||
return miniMessage.deserialize(message, TemplateResolver.templates(templates));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package com.alttd.boosters.api;
|
||||
|
||||
public interface BoosterAPI {
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package com.alttd.boosters.api;
|
||||
|
||||
public class BoosterManager {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||
id("com.github.johnrengelman.shadow") version "7.1.0"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
||||
group = "com.alttd.boosters"
|
||||
version = "1.0.0-BETA-$build"
|
||||
version = "1.0.0-BETA-SNAPSHOT"
|
||||
description = "Easily manage all boosters on the Altitude Minecraft Server Network."
|
||||
}
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ subprojects {
|
|||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(16))
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,9 +40,8 @@ subprojects {
|
|||
configure<PublishingExtension> {
|
||||
repositories {
|
||||
maven {
|
||||
name = "nexus"
|
||||
url = uri("http://$name:8081/snapshots")
|
||||
isAllowInsecureProtocol = true
|
||||
name = "maven"
|
||||
url = uri("https://repo.destro.xyz/snapshots/")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
|
|
@ -55,20 +53,27 @@ dependencies {
|
|||
implementation(project(":boosters-api"))
|
||||
implementation(project(":plugin"))
|
||||
implementation(project(":velocity"))
|
||||
implementation("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT")
|
||||
// implementation("net.kyori", "adventure-text-minimessage", "4.2.0-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||
minimize() {
|
||||
exclude { it.moduleName == "boosters-api" }
|
||||
exclude { it.moduleName == "plugin" }
|
||||
exclude { it.moduleName == "velocity" }
|
||||
}
|
||||
listOf(
|
||||
"net.kyori.adventure.text.minimessage"
|
||||
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
|
||||
"net.kyori.adventure.text.minimessage",
|
||||
"org.spongepowered.configurate"
|
||||
).forEach { relocate(it, "${rootProject.name}.lib.$it") }
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -1,10 +1,30 @@
|
|||
plugins {
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// API
|
||||
implementation(project(":boosters-api"))
|
||||
// Galaxy
|
||||
compileOnly("com.alttd:galaxy-api:1.17.1-R0.1-SNAPSHOT")
|
||||
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT")
|
||||
// MyPet
|
||||
compileOnly("de.keyle:mypet:3.12-SNAPSHOT")
|
||||
// mcMMO
|
||||
compileOnly("com.gmail.nossr50.mcMMO:mcMMO:2.1.206")
|
||||
compileOnly("com.sk89q.worldguard:worldguard-core:7.0.4") {
|
||||
exclude("com.google.code.findbugs")
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package com.alttd.boosters;
|
||||
|
||||
import com.alttd.boosters.api.BoosterAPI;
|
||||
|
||||
public class BoosterAPIProvider implements BoosterAPI {
|
||||
}
|
||||
|
|
@ -1,6 +1,13 @@
|
|||
package com.alttd.boosters;
|
||||
|
||||
import com.alttd.boosters.api.BoosterAPI;
|
||||
import com.alttd.boosterapi.BoosterAPI;
|
||||
import com.alttd.boosterapi.BoosterImplementation;
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.alttd.boosters.listeners.MCmmoListener;
|
||||
import com.alttd.boosters.listeners.MyPetListener;
|
||||
import com.alttd.boosters.listeners.PhantomSpawnListener;
|
||||
import com.alttd.boosters.listeners.PluginMessage;
|
||||
import com.alttd.boosters.managers.BoosterManager;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
|
@ -9,16 +16,29 @@ public final class BoostersPlugin extends JavaPlugin {
|
|||
|
||||
private static BoostersPlugin instance;
|
||||
private static BoosterAPI boosterAPI;
|
||||
private static BoosterManager boosterManager;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
boosterAPI = new BoosterAPIProvider();
|
||||
boosterAPI = new BoosterImplementation();
|
||||
boosterManager = new BoosterManager();
|
||||
if (getServer().getPluginManager().isPluginEnabled("MyPet")) {
|
||||
registerListener(new MyPetListener());
|
||||
}
|
||||
if (getServer().getPluginManager().isPluginEnabled("mcMMO")) {
|
||||
registerListener(new MCmmoListener());
|
||||
}
|
||||
registerListener(new PhantomSpawnListener());
|
||||
|
||||
getServer().getMessenger().registerOutgoingPluginChannel(this, Config.pluginMessageChannel);
|
||||
getServer().getMessenger().registerIncomingPluginChannel(this, Config.pluginMessageChannel, new PluginMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
instance = null;
|
||||
boosterAPI = null;
|
||||
}
|
||||
|
||||
public void registerListener(Listener... listeners) {
|
||||
|
|
@ -38,4 +58,8 @@ public final class BoostersPlugin extends JavaPlugin {
|
|||
public BoosterAPI getAPI() {
|
||||
return boosterAPI;
|
||||
}
|
||||
|
||||
public BoosterManager getBoosterManager() {
|
||||
return boosterManager;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.alttd.boosters.data;
|
||||
|
||||
import com.alttd.boosters.api.BoosterType;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class Booster implements com.alttd.boosters.api.Booster {
|
||||
public class Booster implements com.alttd.boosterapi.Booster {
|
||||
|
||||
private UUID uuid;
|
||||
private String activator;
|
||||
|
|
@ -114,4 +114,16 @@ public class Booster implements com.alttd.boosters.api.Booster {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean finished() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
23
plugin/src/main/java/com/alttd/boosters/listeners/MCmmoListener.java
Executable file
23
plugin/src/main/java/com/alttd/boosters/listeners/MCmmoListener.java
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
package com.alttd.boosters.listeners;
|
||||
|
||||
import com.alttd.boosterapi.Booster;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
import com.alttd.boosters.BoostersPlugin;
|
||||
import com.alttd.boosters.managers.BoosterManager;
|
||||
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public class MCmmoListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onMcMMOExperienceEvent(McMMOPlayerXpGainEvent event) {
|
||||
BoosterManager bm = BoostersPlugin.getInstance().getBoosterManager();
|
||||
if(bm.isBoosted(BoosterType.MCMMO)) {
|
||||
Booster b = bm.getBoosted(BoosterType.MCMMO);
|
||||
int multiplier = b.getMultiplier();
|
||||
event.setRawXpGained(event.getRawXpGained() * multiplier);
|
||||
}
|
||||
}
|
||||
// TODO : add individual mcmmo skill boosters
|
||||
}
|
||||
22
plugin/src/main/java/com/alttd/boosters/listeners/MyPetListener.java
Executable file
22
plugin/src/main/java/com/alttd/boosters/listeners/MyPetListener.java
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
package com.alttd.boosters.listeners;
|
||||
|
||||
import com.alttd.boosterapi.Booster;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
import com.alttd.boosters.BoostersPlugin;
|
||||
import com.alttd.boosters.managers.BoosterManager;
|
||||
import de.Keyle.MyPet.api.event.MyPetExpEvent;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public class MyPetListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onMyPetExpEvent(MyPetExpEvent event) {
|
||||
BoosterManager bm = BoostersPlugin.getInstance().getBoosterManager();
|
||||
if(bm.isBoosted(BoosterType.MYPET)) {
|
||||
Booster b = bm.getBoosted(BoosterType.MYPET);
|
||||
int multiplier = b.getMultiplier();
|
||||
event.setExp(event.getExp() * multiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
22
plugin/src/main/java/com/alttd/boosters/listeners/PhantomSpawnListener.java
Executable file
22
plugin/src/main/java/com/alttd/boosters/listeners/PhantomSpawnListener.java
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
package com.alttd.boosters.listeners;
|
||||
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
import com.alttd.boosters.BoostersPlugin;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public class PhantomSpawnListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPhantomPreSpawn(com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event) {
|
||||
Entity spawningEntity = event.getSpawningEntity();
|
||||
if (spawningEntity instanceof Player player
|
||||
&& BoostersPlugin.getInstance().getBoosterManager().isBoosted(BoosterType.PHANTOM)) {
|
||||
event.setCancelled(true);
|
||||
event.setShouldAbortSpawn(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.alttd.boosters.listeners;
|
||||
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.messaging.PluginMessageListener;
|
||||
|
||||
public class PluginMessage implements PluginMessageListener {
|
||||
|
||||
@Override
|
||||
public void onPluginMessageReceived(String channel, Player player, byte[] bytes) {
|
||||
if(!channel.equals(Config.pluginMessageChannel)) return;
|
||||
ByteArrayDataInput in = ByteStreams.newDataInput(bytes);
|
||||
String subChannel = in.readUTF();
|
||||
// Listen to plugin messages from velocity to either activate or deactive a booster.
|
||||
switch (subChannel) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.alttd.boosters.managers;
|
||||
|
||||
import com.alttd.boosterapi.Booster;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BoosterManager {
|
||||
|
||||
private static List<Booster> activeBoosters;
|
||||
|
||||
public boolean isBoosted(BoosterType type) {
|
||||
for (Booster b : activeBoosters) {
|
||||
if (b.getType() == type && b.isActive()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Booster getBoosted(BoosterType type) {
|
||||
for (Booster b : activeBoosters) {
|
||||
if (b.getType() == type && b.isActive()) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,17 +5,20 @@ include(":velocity")
|
|||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
// Altitude - Galaxy
|
||||
maven {
|
||||
name = "maven"
|
||||
url = uri("http://leo:8081/")
|
||||
isAllowInsecureProtocol = true
|
||||
//credentials(PasswordCredentials::class)
|
||||
mavenCentral()
|
||||
maven("https://repo.destro.xyz/snapshots") // Altitude - Galaxy
|
||||
maven("https://oss.sonatype.org/content/groups/public/") // Adventure
|
||||
maven("https://nexus.velocitypowered.com/repository/maven-public/") // Velocity
|
||||
maven("https://repo.spongepowered.org/maven") // Configurate
|
||||
maven("https://nexus.neetgames.com/repository/maven-releases/") // mcMMO
|
||||
maven("https://maven.enginehub.org/repo/") // worldguard
|
||||
maven { // mypet
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/MyPetORG/MyPet")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
// Velocity
|
||||
maven("https://nexus.velocitypowered.com/repository/maven-public/")
|
||||
|
||||
}
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
plugins {
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
@ -10,4 +11,27 @@ dependencies {
|
|||
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
||||
// DiscordLink
|
||||
compileOnly("com.alttd.proxydiscordlink:ProxyDiscordLink:1.0.0-BETA-SNAPSHOT")
|
||||
|
||||
implementation("mysql:mysql-connector-java:8.0.27") // mysql
|
||||
implementation("org.spongepowered", "configurate-yaml", "4.1.2")
|
||||
implementation("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT") {
|
||||
exclude("net.kyori")
|
||||
exclude("net.kyori.examination")
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||
listOf(
|
||||
"net.kyori.adventure.text.minimessage",
|
||||
"org.spongepowered.configurate"
|
||||
).forEach { relocate(it, "${rootProject.name}.lib.$it") }
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,17 @@
|
|||
package com.alttd.vboosters;
|
||||
|
||||
import com.alttd.boosterapi.BoosterAPI;
|
||||
import com.alttd.boosterapi.BoosterImplementation;
|
||||
import com.alttd.boosterapi.util.ALogger;
|
||||
import com.alttd.proxydiscordlink.DiscordLink;
|
||||
import com.alttd.proxydiscordlink.bot.api.DiscordSendMessage;
|
||||
import com.alttd.vboosters.commands.BoosterCommand;
|
||||
import com.alttd.vboosters.listeners.PluginMessageListener;
|
||||
import com.alttd.vboosters.managers.BoosterManager;
|
||||
import com.google.inject.Inject;
|
||||
import com.velocitypowered.api.event.Subscribe;
|
||||
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||
import com.velocitypowered.api.event.proxy.ProxyShutdownEvent;
|
||||
import com.velocitypowered.api.plugin.Dependency;
|
||||
import com.velocitypowered.api.plugin.Plugin;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
|
|
@ -26,6 +31,9 @@ public class VelocityBoosters {
|
|||
private final ProxyServer server;
|
||||
private final Logger logger;
|
||||
|
||||
private BoosterAPI boosterAPI;
|
||||
private BoosterManager boosterManager;
|
||||
|
||||
private ChannelIdentifier channelIdentifier = MinecraftChannelIdentifier.from("altitude:boosterplugin");
|
||||
|
||||
@Inject
|
||||
|
|
@ -37,12 +45,25 @@ public class VelocityBoosters {
|
|||
|
||||
@Subscribe
|
||||
public void onProxyInitialization(ProxyInitializeEvent event) {
|
||||
ALogger.init(logger);
|
||||
boosterAPI = new BoosterImplementation();
|
||||
boosterManager = new BoosterManager(this);
|
||||
|
||||
server.getChannelRegistrar().register(channelIdentifier);
|
||||
server.getEventManager().register(this, new PluginMessageListener(channelIdentifier));
|
||||
|
||||
loadCommands();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onShutdown(ProxyShutdownEvent event) {
|
||||
boosterManager.saveAllBoosters();
|
||||
}
|
||||
|
||||
public void reloadConfig() {
|
||||
boosterAPI.reloadConfig();
|
||||
}
|
||||
|
||||
public static VelocityBoosters getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
|
@ -64,4 +85,8 @@ public class VelocityBoosters {
|
|||
return channelIdentifier;
|
||||
}
|
||||
|
||||
public BoosterManager getBoosterManager() {
|
||||
return boosterManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
package com.alttd.vboosters.data;
|
||||
|
||||
import com.alttd.boosters.api.BoosterType;
|
||||
import com.alttd.boosterapi.Booster;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class VelocityBooster implements com.alttd.boosters.api.Booster{
|
||||
public class VelocityBooster implements Booster {
|
||||
|
||||
private UUID uuid;
|
||||
private String activator;
|
||||
|
|
@ -30,7 +31,6 @@ public class VelocityBooster implements com.alttd.boosters.api.Booster{
|
|||
this(UUID.randomUUID(), type, playerName, duration, multiplier);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
|
|
@ -106,12 +106,24 @@ public class VelocityBooster implements com.alttd.boosters.api.Booster{
|
|||
|
||||
@Override
|
||||
public void stopBooster() {
|
||||
|
||||
setDuration(getTimeRemaining());
|
||||
setActive(false);
|
||||
saveBooster();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBooster() {
|
||||
// logic to save to yaml or to db
|
||||
}
|
||||
|
||||
public void finish() {
|
||||
finished = true;
|
||||
stopBooster();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean finished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
package com.alttd.vboosters.managers;
|
||||
|
||||
import com.alttd.boosters.api.Booster;
|
||||
import com.alttd.boosters.api.BoosterType;
|
||||
import com.alttd.boosterapi.Booster;
|
||||
import com.alttd.boosterapi.BoosterType;
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.alttd.vboosters.VelocityBoosters;
|
||||
import com.alttd.vboosters.config.Config;
|
||||
import com.velocitypowered.api.scheduler.ScheduledTask;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -19,27 +18,38 @@ public class BoosterManager {
|
|||
|
||||
private static List<Booster> queuedBoosters;
|
||||
private static List<Booster> activeBoosters;
|
||||
private static ScheduledTask queueBoosterTask;
|
||||
private static ScheduledTask activeBoostersTask;
|
||||
private static ScheduledTask boostersTask;
|
||||
|
||||
public void init() {
|
||||
plugin = VelocityBoosters.getPlugin();
|
||||
public BoosterManager(VelocityBoosters velocityBoosters) {
|
||||
plugin = velocityBoosters;
|
||||
activeBoosters = new ArrayList<>();
|
||||
queuedBoosters = new ArrayList<>();
|
||||
/*
|
||||
* This is mainly used to count down the active boosters and
|
||||
* let backend servers know if one should be activated/deactivated
|
||||
*/
|
||||
activeBoostersTask = plugin.getProxy().getScheduler().buildTask(plugin, () -> {
|
||||
boostersTask = plugin.getProxy().getScheduler().buildTask(plugin, () -> {
|
||||
for (Booster booster: getActiveBoosters()) {
|
||||
if (booster.getTimeRemaining() <= 0) {
|
||||
|
||||
if (booster.getTimeRemaining() > 0) continue;
|
||||
booster.finish();
|
||||
// send data to the backend servers to let them know the booster is no longer active
|
||||
}
|
||||
getActiveBoosters().removeIf(Booster::finished);
|
||||
for (BoosterType type : BoosterType.values()) {
|
||||
if (!isBoosted(type)) { // activate a queud booster if needed
|
||||
Booster queuedBooster = getHighestBooster(type);
|
||||
if (queuedBooster == null)
|
||||
continue;
|
||||
activateBooster(queuedBooster);
|
||||
// send an update to the backend servers to let them know this booster is active
|
||||
}
|
||||
}
|
||||
getQueuedBoosters().removeIf(Booster::finished);
|
||||
}).repeat(Config.activeTaskCheckFrequency, TimeUnit.SECONDS).schedule();
|
||||
}
|
||||
|
||||
public void loadBoosters() {
|
||||
// load boosters from datastorage and check them one by one to activate them
|
||||
for (BoosterType type : BoosterType.values()) {
|
||||
if (isBoosted(type)) {
|
||||
Booster activeBooster = getBoosted(type);
|
||||
|
|
@ -72,27 +82,6 @@ public class BoosterManager {
|
|||
public void removeBooster(Booster booster) {
|
||||
activeBoosters.remove(booster);
|
||||
booster.stopBooster();
|
||||
// final TextComponent message = new TextComponent(booster.getType().name() + " by " + booster.getPlayerName() + " has ended.");
|
||||
// message.setColor(ChatColor.DARK_PURPLE);
|
||||
// message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( "Duration" + booster.getTimeLeft()).create() ));
|
||||
// plugin.getServer().broadcast(message);
|
||||
|
||||
// for(Booster qb : queuedBoosters) {
|
||||
// boolean active = false;
|
||||
// BoosterType qType = qb.getType();
|
||||
// if(qType == booster.getType()) {
|
||||
// for(Booster b : activeBoosters) {
|
||||
// if(b.getType() == qType) {
|
||||
// active = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if(!active) {
|
||||
// activateBooster(qb);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public void swapBooster(Booster activeBooster, Booster queuedBooster) {
|
||||
|
|
@ -104,20 +93,12 @@ public class BoosterManager {
|
|||
queuedBoosters.remove(booster);
|
||||
activeBoosters.add(booster);
|
||||
booster.setActive(true);
|
||||
// final TextComponent message = new TextComponent(booster.getType().name() + " activated by " + booster.getPlayerName());
|
||||
// message.setColor(ChatColor.DARK_PURPLE);
|
||||
// message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( "Duration" + booster.getTimeLeft()).create() ));
|
||||
// plugin.getServer().broadcast(message);
|
||||
}
|
||||
|
||||
public void deactivateBooster(Booster booster) {
|
||||
queuedBoosters.add(booster);
|
||||
activeBoosters.remove(booster);
|
||||
booster.setActive(false);
|
||||
// final TextComponent message = new TextComponent(booster.getType().name() + " activated by " + booster.getPlayerName());
|
||||
// message.setColor(ChatColor.DARK_PURPLE);
|
||||
// message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( "Duration" + booster.getTimeLeft()).create() ));
|
||||
// plugin.getServer().broadcast(message);
|
||||
}
|
||||
|
||||
public boolean isBoosted(BoosterType type) {
|
||||
|
|
@ -156,11 +137,13 @@ public class BoosterManager {
|
|||
|
||||
public void saveAllBoosters() {
|
||||
for (Booster b : activeBoosters) {
|
||||
b.saveBooster();
|
||||
b.stopBooster();
|
||||
}
|
||||
for (Booster b : queuedBoosters) {
|
||||
b.saveBooster();
|
||||
}
|
||||
activeBoosters = null;
|
||||
queuedBoosters = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.alttd.vboosters.task;
|
||||
|
||||
import com.alttd.boosterapi.config.Config;
|
||||
import com.alttd.vboosters.VelocityBoosters;
|
||||
import com.alttd.vboosters.config.Config;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ public class BoosterTask {
|
|||
public void init() {
|
||||
plugin.getProxy().getScheduler().buildTask(plugin, () -> {
|
||||
|
||||
}).repeat(Config.TaskCheckFrequency, TimeUnit.SECONDS).schedule();
|
||||
}).repeat(Config.taskCheckFrequency, TimeUnit.SECONDS).schedule();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user