mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-26 18:19:10 +00:00
Cluster support
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package me.william278.husksync;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Settings class, holds values loaded from the plugin config (either Bukkit or Bungee)
|
||||
*/
|
||||
@@ -27,6 +29,9 @@ public class Settings {
|
||||
// Messages language
|
||||
public static String language;
|
||||
|
||||
// Cluster IDs
|
||||
public static ArrayList<SynchronisationCluster> clusters = new ArrayList<>();
|
||||
|
||||
// SQL settings
|
||||
public static DataStorageType dataStorageType;
|
||||
|
||||
@@ -61,6 +66,9 @@ public class Settings {
|
||||
public static boolean syncAdvancements;
|
||||
public static boolean syncLocation;
|
||||
|
||||
// This Cluster ID
|
||||
public static String cluster;
|
||||
|
||||
/*
|
||||
* Enum definitions
|
||||
*/
|
||||
@@ -74,4 +82,10 @@ public class Settings {
|
||||
MYSQL,
|
||||
SQLITE
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines information for a synchronisation cluster as listed on the proxy
|
||||
*/
|
||||
public record SynchronisationCluster(String clusterId, String databaseName, String playerTableName, String dataTableName) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class RedisMessage {
|
||||
* A record that defines the target of a plugin message; a spigot server or the proxy server(s).
|
||||
* For Bukkit servers, the name of the server must also be specified
|
||||
*/
|
||||
public record MessageTarget(Settings.ServerType targetServerType, UUID targetPlayerUUID) implements Serializable { }
|
||||
public record MessageTarget(Settings.ServerType targetServerType, UUID targetPlayerUUID, String targetClusterId) implements Serializable { }
|
||||
|
||||
/**
|
||||
* Deserialize an object from a Base64 string
|
||||
|
||||
Reference in New Issue
Block a user