Refactor package to net.william278; update dependencies & stop shading internal modules

feat/data-edit-commands
William 3 years ago
parent 2f3b0f37e8
commit a76aecdd23

2
.gitignore vendored

@ -106,7 +106,7 @@ build/
# Ignore Gradle GUI config # Ignore Gradle GUI config
gradle-app.setting gradle-app.setting
# me.william278.crossserversync.bungeecord.data.DataManager.PlayerDataCache of project # net.william278.crossserversync.bungeecord.data.DataManager.PlayerDataCache of project
.gradletasknamecache .gradletasknamecache
**/build/ **/build/

@ -5,10 +5,10 @@ plugins {
} }
dependencies { dependencies {
compileOnly project(path: ':common', configuration: 'shadow') implementation project(path: ':common')
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:22.0.0' compileOnly 'org.jetbrains:annotations:23.0.0'
} }
repositories { repositories {

@ -1,8 +1,9 @@
package me.william278.husksync.bukkit.api; package net.william278.husksync.bukkit.api;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import net.william278.husksync.bukkit.data.DataSerializer;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
@ -37,7 +38,7 @@ public class HuskSyncAPI {
public static HashMap<UUID, CompletableFuture<PlayerData>> apiRequests = new HashMap<>(); public static HashMap<UUID, CompletableFuture<PlayerData>> apiRequests = new HashMap<>();
/** /**
* Returns a {@link CompletableFuture} that will fetch the {@link PlayerData} for a user given their {@link UUID}, which contains synchronised data that can then be deserialized into ItemStacks and other usable values using the {@link me.william278.husksync.bukkit.data.DataSerializer} class. If no data could be returned, such as if an invalid UUID is specified, the CompletableFuture will be cancelled. Note that this only returns the last cached data of the user; not necessarily the current state of their inventory if they are online. * Returns a {@link CompletableFuture} that will fetch the {@link PlayerData} for a user given their {@link UUID}, which contains synchronised data that can then be deserialized into ItemStacks and other usable values using the {@link DataSerializer} class. If no data could be returned, such as if an invalid UUID is specified, the CompletableFuture will be cancelled. Note that this only returns the last cached data of the user; not necessarily the current state of their inventory if they are online.
* *
* @param playerUUID The {@link UUID} of the player to get data for * @param playerUUID The {@link UUID} of the player to get data for
* @return a {@link CompletableFuture} with the user's {@link PlayerData} accessible on completion * @return a {@link CompletableFuture} with the user's {@link PlayerData} accessible on completion

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.api.events; package net.william278.husksync.bukkit.api.events;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerEvent;

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.api.events; package net.william278.husksync.bukkit.api.events;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.data; package net.william278.husksync.bukkit.data;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import org.bukkit.*; import org.bukkit.*;
import org.bukkit.advancement.Advancement; import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress; import org.bukkit.advancement.AdvancementProgress;
@ -20,7 +20,7 @@ import java.time.Instant;
import java.util.*; import java.util.*;
/** /**
* Class that contains static methods for serializing and deserializing data from {@link me.william278.husksync.PlayerData} * Class that contains static methods for serializing and deserializing data from {@link net.william278.husksync.PlayerData}
*/ */
public class DataSerializer { public class DataSerializer {

@ -4,7 +4,7 @@ plugins {
id 'java' id 'java'
} }
group 'me.william278' group 'net.william278'
version "$ext.plugin_version+${versionMetadata()}" version "$ext.plugin_version+${versionMetadata()}"
ext { ext {
@ -34,7 +34,7 @@ allprojects {
} }
dependencies { dependencies {
implementation('redis.clients:jedis:4.1.1') { implementation('redis.clients:jedis:4.2.3') {
//noinspection GroovyAssignabilityCheck //noinspection GroovyAssignabilityCheck
exclude module: 'slf4j-api' exclude module: 'slf4j-api'
} }
@ -50,7 +50,7 @@ subprojects {
version rootProject.version version rootProject.version
archivesBaseName = "${rootProject.name}-${project.name.capitalize()}" archivesBaseName = "${rootProject.name}-${project.name.capitalize()}"
if (['bukkit', 'bungeecord', 'velocity', 'plugin'].contains(project.name)) { if (['bukkit', 'bungeecord', 'velocity', 'api', 'plugin'].contains(project.name)) {
shadowJar { shadowJar {
destinationDirectory.set(file("$rootDir/target")) destinationDirectory.set(file("$rootDir/target"))
archiveClassifier.set('') archiveClassifier.set('')

@ -1,19 +1,18 @@
dependencies { dependencies {
implementation project(':api') implementation project(':api')
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common')
implementation 'org.bstats:bstats-bukkit:3.0.0' implementation 'org.bstats:bstats-bukkit:3.0.0'
implementation 'de.themoep:minedown:1.7.1-SNAPSHOT' implementation 'de.themoep:minedown:1.7.1-SNAPSHOT'
compileOnly 'net.craftersland.data:bridge:4.0.1' compileOnly 'net.craftersland.data:bridge:4.0.1'
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:22.0.0' compileOnly 'org.jetbrains:annotations:23.0.0'
} }
shadowJar { shadowJar {
relocate 'de.themoep', 'me.william278.husksync.libraries' relocate 'de.themoep', 'net.william278.husksync.libraries'
relocate 'org.bstats', 'me.william278.husksync.libraries.bstats' relocate 'org.bstats', 'net.william278.husksync.libraries.bstats'
relocate 'redis.clients', 'net.william278.husksync.libraries'
relocate 'redis.clients', 'me.william278.husksync.libraries' relocate 'org.apache', 'net.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries'
} }

@ -1,13 +1,14 @@
package me.william278.husksync; package net.william278.husksync;
import me.william278.husksync.bukkit.util.BukkitUpdateChecker; import net.william278.husksync.Settings;
import me.william278.husksync.bukkit.util.PlayerSetter; import net.william278.husksync.bukkit.util.BukkitUpdateChecker;
import me.william278.husksync.bukkit.config.ConfigLoader; import net.william278.husksync.bukkit.util.PlayerSetter;
import me.william278.husksync.bukkit.data.BukkitDataCache; import net.william278.husksync.bukkit.config.ConfigLoader;
import me.william278.husksync.bukkit.listener.BukkitRedisListener; import net.william278.husksync.bukkit.data.BukkitDataCache;
import me.william278.husksync.bukkit.listener.BukkitEventListener; import net.william278.husksync.bukkit.listener.BukkitRedisListener;
import me.william278.husksync.bukkit.migrator.MPDBDeserializer; import net.william278.husksync.bukkit.listener.BukkitEventListener;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.bukkit.migrator.MPDBDeserializer;
import net.william278.husksync.redis.RedisMessage;
import org.bstats.bukkit.Metrics; import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.config; package net.william278.husksync.bukkit.config;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
public class ConfigLoader { public class ConfigLoader {

@ -1,4 +1,4 @@
package me.william278.husksync.bukkit.data; package net.william278.husksync.bukkit.data;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;

@ -1,10 +1,10 @@
package me.william278.husksync.bukkit.data; package net.william278.husksync.bukkit.data;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.bukkit.util.PlayerSetter; import net.william278.husksync.bukkit.util.PlayerSetter;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;

@ -1,9 +1,9 @@
package me.william278.husksync.bukkit.listener; package net.william278.husksync.bukkit.listener;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.bukkit.data.DataViewer; import net.william278.husksync.bukkit.data.DataViewer;
import me.william278.husksync.bukkit.util.PlayerSetter; import net.william278.husksync.bukkit.util.PlayerSetter;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;

@ -1,18 +1,18 @@
package me.william278.husksync.bukkit.listener; package net.william278.husksync.bukkit.listener;
import de.themoep.minedown.MineDown; import de.themoep.minedown.MineDown;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.bukkit.api.HuskSyncAPI; import net.william278.husksync.bukkit.api.HuskSyncAPI;
import me.william278.husksync.bukkit.config.ConfigLoader; import net.william278.husksync.bukkit.config.ConfigLoader;
import me.william278.husksync.bukkit.data.DataViewer; import net.william278.husksync.bukkit.data.DataViewer;
import me.william278.husksync.bukkit.migrator.MPDBDeserializer; import net.william278.husksync.bukkit.migrator.MPDBDeserializer;
import me.william278.husksync.bukkit.util.PlayerSetter; import net.william278.husksync.bukkit.util.PlayerSetter;
import me.william278.husksync.migrator.MPDBPlayerData; import net.william278.husksync.migrator.MPDBPlayerData;
import me.william278.husksync.redis.RedisListener; import net.william278.husksync.redis.RedisListener;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

@ -1,10 +1,10 @@
package me.william278.husksync.bukkit.migrator; package net.william278.husksync.bukkit.migrator;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.bukkit.util.PlayerSetter; import net.william278.husksync.bukkit.util.PlayerSetter;
import me.william278.husksync.bukkit.data.DataSerializer; import net.william278.husksync.bukkit.data.DataSerializer;
import me.william278.husksync.migrator.MPDBPlayerData; import net.william278.husksync.migrator.MPDBPlayerData;
import net.craftersland.data.bridge.PD; import net.craftersland.data.bridge.PD;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;

@ -1,7 +1,7 @@
package me.william278.husksync.bukkit.util; package net.william278.husksync.bukkit.util;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.util.UpdateChecker; import net.william278.husksync.util.UpdateChecker;
import java.util.logging.Level; import java.util.logging.Level;

@ -1,13 +1,13 @@
package me.william278.husksync.bukkit.util; package net.william278.husksync.bukkit.util;
import me.william278.husksync.HuskSyncBukkit; import net.william278.husksync.HuskSyncBukkit;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.bukkit.api.events.SyncCompleteEvent; import net.william278.husksync.bukkit.api.events.SyncCompleteEvent;
import me.william278.husksync.bukkit.api.events.SyncEvent; import net.william278.husksync.bukkit.api.events.SyncEvent;
import me.william278.husksync.bukkit.data.DataSerializer; import net.william278.husksync.bukkit.data.DataSerializer;
import me.william278.husksync.bukkit.util.nms.AdvancementUtils; import net.william278.husksync.bukkit.util.nms.AdvancementUtils;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import org.bukkit.*; import org.bukkit.*;
import org.bukkit.advancement.Advancement; import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress; import org.bukkit.advancement.AdvancementProgress;

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.util.nms; package net.william278.husksync.bukkit.util.nms;
import me.william278.husksync.util.ThrowSupplier; import net.william278.husksync.util.ThrowSupplier;
import org.bukkit.advancement.Advancement; import org.bukkit.advancement.Advancement;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

@ -1,6 +1,6 @@
package me.william278.husksync.bukkit.util.nms; package net.william278.husksync.bukkit.util.nms;
import me.william278.husksync.util.ThrowSupplier; import net.william278.husksync.util.ThrowSupplier;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

@ -1,7 +1,7 @@
package me.william278.husksync.bukkit.util.nms; package net.william278.husksync.bukkit.util.nms;
import me.william278.husksync.util.ThrowSupplier; import net.william278.husksync.util.ThrowSupplier;
import me.william278.husksync.util.VersionUtils; import net.william278.husksync.util.VersionUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
public class MinecraftVersionUtils { public class MinecraftVersionUtils {

@ -1,6 +1,6 @@
name: HuskSync name: HuskSync
version: ${version} version: ${version}
main: me.william278.husksync.HuskSyncBukkit main: net.william278.husksync.HuskSyncBukkit
api-version: 1.16 api-version: 1.16
author: William278 author: William278
description: 'A modern, cross-server player data synchronization system' description: 'A modern, cross-server player data synchronization system'

@ -1,5 +1,5 @@
dependencies { dependencies {
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common')
implementation 'com.zaxxer:HikariCP:5.0.1' implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'org.bstats:bstats-bungeecord:3.0.0' implementation 'org.bstats:bstats-bungeecord:3.0.0'
@ -10,14 +10,14 @@ dependencies {
} }
shadowJar { shadowJar {
relocate 'de.themoep', 'me.william278.husksync.libraries' relocate 'de.themoep', 'net.william278.husksync.libraries'
relocate 'net.byteflux', 'me.william278.husksync.libraries' relocate 'net.byteflux', 'net.william278.husksync.libraries'
relocate 'org.bstats', 'me.william278.husksync.libraries.bstats' relocate 'org.bstats', 'net.william278.husksync.libraries.bstats'
relocate 'redis.clients', 'me.william278.husksync.libraries' relocate 'redis.clients', 'net.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries' relocate 'org.apache', 'net.william278.husksync.libraries'
relocate 'com.zaxxer', 'me.william278.husksync.libraries' relocate 'com.zaxxer', 'net.william278.husksync.libraries'
dependencies { dependencies {
//noinspection GroovyAssignabilityCheck //noinspection GroovyAssignabilityCheck

@ -1,16 +1,18 @@
package me.william278.husksync; package net.william278.husksync;
import me.william278.husksync.bungeecord.command.BungeeCommand; import net.william278.husksync.Server;
import me.william278.husksync.bungeecord.config.ConfigLoader; import net.william278.husksync.Settings;
import me.william278.husksync.bungeecord.config.ConfigManager; import net.william278.husksync.bungeecord.command.BungeeCommand;
import me.william278.husksync.bungeecord.listener.BungeeEventListener; import net.william278.husksync.bungeecord.config.ConfigLoader;
import me.william278.husksync.bungeecord.listener.BungeeRedisListener; import net.william278.husksync.bungeecord.config.ConfigManager;
import me.william278.husksync.bungeecord.util.BungeeLogger; import net.william278.husksync.bungeecord.listener.BungeeEventListener;
import me.william278.husksync.bungeecord.util.BungeeUpdateChecker; import net.william278.husksync.bungeecord.listener.BungeeRedisListener;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.bungeecord.util.BungeeLogger;
import me.william278.husksync.proxy.data.DataManager; import net.william278.husksync.bungeecord.util.BungeeUpdateChecker;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.util.Logger; import net.william278.husksync.proxy.data.DataManager;
import net.william278.husksync.redis.RedisMessage;
import net.william278.husksync.util.Logger;
import net.byteflux.libby.BungeeLibraryManager; import net.byteflux.libby.BungeeLibraryManager;
import net.byteflux.libby.Library; import net.byteflux.libby.Library;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
@ -155,7 +157,7 @@ public final class HuskSyncBungeeCord extends Plugin {
Library mySqlLib = Library.builder() Library mySqlLib = Library.builder()
.groupId("mysql") .groupId("mysql")
.artifactId("mysql-connector-java") .artifactId("mysql-connector-java")
.version("8.0.27") .version("8.0.29")
.build(); .build();
Library sqLiteLib = Library.builder() Library sqLiteLib = Library.builder()

@ -1,17 +1,17 @@
package me.william278.husksync.bungeecord.command; package net.william278.husksync.bungeecord.command;
import de.themoep.minedown.MineDown; import de.themoep.minedown.MineDown;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Server; import net.william278.husksync.Server;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.bungeecord.config.ConfigLoader; import net.william278.husksync.bungeecord.config.ConfigLoader;
import me.william278.husksync.bungeecord.config.ConfigManager; import net.william278.husksync.bungeecord.config.ConfigManager;
import me.william278.husksync.bungeecord.util.BungeeUpdateChecker; import net.william278.husksync.bungeecord.util.BungeeUpdateChecker;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.proxy.command.HuskSyncCommand; import net.william278.husksync.proxy.command.HuskSyncCommand;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;

@ -1,8 +1,8 @@
package me.william278.husksync.bungeecord.config; package net.william278.husksync.bungeecord.config;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import net.md_5.bungee.config.Configuration; import net.md_5.bungee.config.Configuration;
import java.util.HashMap; import java.util.HashMap;

@ -1,7 +1,7 @@
package me.william278.husksync.bungeecord.config; package net.william278.husksync.bungeecord.config;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import net.md_5.bungee.config.Configuration; import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider; import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration; import net.md_5.bungee.config.YamlConfiguration;

@ -1,9 +1,9 @@
package me.william278.husksync.bungeecord.listener; package net.william278.husksync.bungeecord.listener;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PostLoginEvent; import net.md_5.bungee.api.event.PostLoginEvent;

@ -1,14 +1,14 @@
package me.william278.husksync.bungeecord.listener; package net.william278.husksync.bungeecord.listener;
import de.themoep.minedown.MineDown; import de.themoep.minedown.MineDown;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.Server; import net.william278.husksync.Server;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.redis.RedisListener; import net.william278.husksync.redis.RedisListener;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;

@ -1,6 +1,6 @@
package me.william278.husksync.bungeecord.util; package net.william278.husksync.bungeecord.util;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.util.logging.Level; import java.util.logging.Level;

@ -1,7 +1,7 @@
package me.william278.husksync.bungeecord.util; package net.william278.husksync.bungeecord.util;
import me.william278.husksync.HuskSyncBungeeCord; import net.william278.husksync.HuskSyncBungeeCord;
import me.william278.husksync.util.UpdateChecker; import net.william278.husksync.util.UpdateChecker;
import java.util.logging.Level; import java.util.logging.Level;

@ -1,5 +1,5 @@
name: HuskSync name: HuskSync
version: ${version} version: ${version}
main: me.william278.husksync.HuskSyncBungeeCord main: net.william278.husksync.HuskSyncBungeeCord
author: William278 author: William278
description: 'A modern, cross-server player data synchronization system' description: 'A modern, cross-server player data synchronization system'

@ -3,5 +3,5 @@ dependencies {
} }
shadowJar { shadowJar {
relocate 'com.zaxxer', 'me.william278.husksync.libraries' relocate 'com.zaxxer', 'net.william278.husksync.libraries'
} }

@ -1,4 +1,4 @@
package me.william278.husksync; package net.william278.husksync;
import java.io.*; import java.io.*;
import java.time.Instant; import java.time.Instant;

@ -1,4 +1,4 @@
package me.william278.husksync; package net.william278.husksync;
import java.util.UUID; import java.util.UUID;

@ -1,4 +1,4 @@
package me.william278.husksync; package net.william278.husksync;
import java.util.ArrayList; import java.util.ArrayList;

@ -1,14 +1,14 @@
package me.william278.husksync.migrator; package net.william278.husksync.migrator;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Server; import net.william278.husksync.Server;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.proxy.data.DataManager; import net.william278.husksync.proxy.data.DataManager;
import me.william278.husksync.proxy.data.sql.Database; import net.william278.husksync.proxy.data.sql.Database;
import me.william278.husksync.proxy.data.sql.MySQL; import net.william278.husksync.proxy.data.sql.MySQL;
import me.william278.husksync.redis.RedisListener; import net.william278.husksync.redis.RedisListener;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.io.IOException; import java.io.IOException;
import java.sql.Connection; import java.sql.Connection;

@ -1,4 +1,4 @@
package me.william278.husksync.migrator; package net.william278.husksync.migrator;
import java.io.Serializable; import java.io.Serializable;
import java.util.UUID; import java.util.UUID;

@ -1,4 +1,4 @@
package me.william278.husksync.proxy.command; package net.william278.husksync.proxy.command;
public interface HuskSyncCommand { public interface HuskSyncCommand {

@ -1,11 +1,11 @@
package me.william278.husksync.proxy.data; package net.william278.husksync.proxy.data;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.proxy.data.sql.Database; import net.william278.husksync.proxy.data.sql.Database;
import me.william278.husksync.proxy.data.sql.MySQL; import net.william278.husksync.proxy.data.sql.MySQL;
import me.william278.husksync.proxy.data.sql.SQLite; import net.william278.husksync.proxy.data.sql.SQLite;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.io.File; import java.io.File;
import java.sql.*; import java.sql.*;

@ -1,7 +1,7 @@
package me.william278.husksync.proxy.data.sql; package net.william278.husksync.proxy.data.sql;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;

@ -1,8 +1,8 @@
package me.william278.husksync.proxy.data.sql; package net.william278.husksync.proxy.data.sql;
import com.zaxxer.hikari.HikariDataSource; import com.zaxxer.hikari.HikariDataSource;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;

@ -1,8 +1,8 @@
package me.william278.husksync.proxy.data.sql; package net.william278.husksync.proxy.data.sql;
import com.zaxxer.hikari.HikariDataSource; import com.zaxxer.hikari.HikariDataSource;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

@ -1,6 +1,6 @@
package me.william278.husksync.redis; package net.william278.husksync.redis;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import redis.clients.jedis.*; import redis.clients.jedis.*;
import redis.clients.jedis.exceptions.JedisConnectionException; import redis.clients.jedis.exceptions.JedisConnectionException;
import redis.clients.jedis.exceptions.JedisException; import redis.clients.jedis.exceptions.JedisException;

@ -1,7 +1,7 @@
package me.william278.husksync.redis; package net.william278.husksync.redis;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import redis.clients.jedis.Jedis; import redis.clients.jedis.Jedis;
import java.io.*; import java.io.*;

@ -1,4 +1,4 @@
package me.william278.husksync.util; package net.william278.husksync.util;
import java.util.logging.Level; import java.util.logging.Level;

@ -1,4 +1,4 @@
package me.william278.husksync.util; package net.william278.husksync.util;
import java.util.HashMap; import java.util.HashMap;

@ -1,4 +1,4 @@
package me.william278.husksync.util; package net.william278.husksync.util;
public interface ThrowSupplier<T> { public interface ThrowSupplier<T> {
T get() throws Exception; T get() throws Exception;

@ -1,4 +1,4 @@
package me.william278.husksync.util; package net.william278.husksync.util;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;

@ -1,4 +1,4 @@
package me.william278.husksync.util; package net.william278.husksync.util;
import java.util.Arrays; import java.util.Arrays;

@ -1,5 +1,3 @@
org.gradle.parallel=true
javaVersion=16 javaVersion=16
plugin_version=1.4
plugin_version=1.3.3
plugin_archive=husksync plugin_archive=husksync

@ -19,7 +19,7 @@ shadowJar {
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
groupId = 'me.william278' groupId = 'net.william278'
artifactId = 'husksync-plugin' artifactId = 'husksync-plugin'
version = "$rootProject.version" version = "$rootProject.version"

@ -1,5 +1,5 @@
dependencies { dependencies {
implementation project(path: ':common', configuration: 'shadow') implementation project(path: ':common')
implementation 'com.zaxxer:HikariCP:5.0.1' implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'org.bstats:bstats-velocity:3.0.0' implementation 'org.bstats:bstats-velocity:3.0.0'
@ -10,14 +10,12 @@ dependencies {
} }
shadowJar { shadowJar {
relocate 'de.themoep', 'me.william278.husksync.libraries' relocate 'de.themoep', 'net.william278.husksync.libraries'
relocate 'net.byteflux', 'me.william278.husksync.libraries' relocate 'net.byteflux', 'net.william278.husksync.libraries'
relocate 'org.bstats', 'me.william278.husksync.libraries.bstats' relocate 'org.bstats', 'net.william278.husksync.libraries.bstats'
relocate 'redis.clients', 'net.william278.husksync.libraries'
relocate 'redis.clients', 'me.william278.husksync.libraries' relocate 'org.apache', 'net.william278.husksync.libraries'
relocate 'org.apache', 'me.william278.husksync.libraries' relocate 'com.zaxxer', 'net.william278.husksync.libraries'
relocate 'com.zaxxer', 'me.william278.husksync.libraries'
dependencies { dependencies {
//noinspection GroovyAssignabilityCheck //noinspection GroovyAssignabilityCheck

@ -1,4 +1,4 @@
package me.william278.husksync; package net.william278.husksync;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.velocitypowered.api.command.CommandManager; import com.velocitypowered.api.command.CommandManager;
@ -10,16 +10,18 @@ import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.plugin.PluginContainer; import com.velocitypowered.api.plugin.PluginContainer;
import com.velocitypowered.api.plugin.annotation.DataDirectory; import com.velocitypowered.api.plugin.annotation.DataDirectory;
import com.velocitypowered.api.proxy.ProxyServer; import com.velocitypowered.api.proxy.ProxyServer;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.Server;
import me.william278.husksync.proxy.data.DataManager; import net.william278.husksync.Settings;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.velocity.command.VelocityCommand; import net.william278.husksync.proxy.data.DataManager;
import me.william278.husksync.velocity.config.ConfigLoader; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.velocity.config.ConfigManager; import net.william278.husksync.velocity.command.VelocityCommand;
import me.william278.husksync.velocity.listener.VelocityEventListener; import net.william278.husksync.velocity.config.ConfigLoader;
import me.william278.husksync.velocity.listener.VelocityRedisListener; import net.william278.husksync.velocity.config.ConfigManager;
import me.william278.husksync.velocity.util.VelocityLogger; import net.william278.husksync.velocity.listener.VelocityEventListener;
import me.william278.husksync.velocity.util.VelocityUpdateChecker; import net.william278.husksync.velocity.listener.VelocityRedisListener;
import net.william278.husksync.velocity.util.VelocityLogger;
import net.william278.husksync.velocity.util.VelocityUpdateChecker;
import net.byteflux.libby.Library; import net.byteflux.libby.Library;
import net.byteflux.libby.VelocityLibraryManager; import net.byteflux.libby.VelocityLibraryManager;
import org.bstats.velocity.Metrics; import org.bstats.velocity.Metrics;
@ -202,7 +204,7 @@ public class HuskSyncVelocity {
Library mySqlLib = Library.builder() Library mySqlLib = Library.builder()
.groupId("mysql") .groupId("mysql")
.artifactId("mysql-connector-java") .artifactId("mysql-connector-java")
.version("8.0.27") .version("8.0.29")
.build(); .build();
Library sqLiteLib = Library.builder() Library sqLiteLib = Library.builder()

@ -1,20 +1,20 @@
package me.william278.husksync.velocity.command; package net.william278.husksync.velocity.command;
import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.command.SimpleCommand; import com.velocitypowered.api.command.SimpleCommand;
import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.Player;
import de.themoep.minedown.adventure.MineDown; import de.themoep.minedown.adventure.MineDown;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Server; import net.william278.husksync.Server;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.proxy.command.HuskSyncCommand; import net.william278.husksync.proxy.command.HuskSyncCommand;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import me.william278.husksync.velocity.util.VelocityUpdateChecker; import net.william278.husksync.velocity.util.VelocityUpdateChecker;
import me.william278.husksync.velocity.config.ConfigLoader; import net.william278.husksync.velocity.config.ConfigLoader;
import me.william278.husksync.velocity.config.ConfigManager; import net.william278.husksync.velocity.config.ConfigManager;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;

@ -1,8 +1,8 @@
package me.william278.husksync.velocity.config; package net.william278.husksync.velocity.config;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import ninja.leaping.configurate.ConfigurationNode; import ninja.leaping.configurate.ConfigurationNode;
import java.util.HashMap; import java.util.HashMap;

@ -1,7 +1,7 @@
package me.william278.husksync.velocity.config; package net.william278.husksync.velocity.config;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import ninja.leaping.configurate.ConfigurationNode; import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.yaml.YAMLConfigurationLoader; import ninja.leaping.configurate.yaml.YAMLConfigurationLoader;
import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.DumperOptions;

@ -1,12 +1,13 @@
package me.william278.husksync.velocity.listener; package net.william278.husksync.velocity.listener;
import com.velocitypowered.api.event.PostOrder;
import com.velocitypowered.api.event.Subscribe; import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.connection.PostLoginEvent; import com.velocitypowered.api.event.connection.PostLoginEvent;
import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.Player;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -16,7 +17,7 @@ public class VelocityEventListener {
private static final HuskSyncVelocity plugin = HuskSyncVelocity.getInstance(); private static final HuskSyncVelocity plugin = HuskSyncVelocity.getInstance();
@Subscribe @Subscribe(order = PostOrder.FIRST)
public void onPostLogin(PostLoginEvent event) { public void onPostLogin(PostLoginEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
plugin.getProxyServer().getScheduler().buildTask(plugin, () -> { plugin.getProxyServer().getScheduler().buildTask(plugin, () -> {

@ -1,15 +1,15 @@
package me.william278.husksync.velocity.listener; package net.william278.husksync.velocity.listener;
import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.Player;
import de.themoep.minedown.adventure.MineDown; import de.themoep.minedown.adventure.MineDown;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.PlayerData; import net.william278.husksync.PlayerData;
import me.william278.husksync.Server; import net.william278.husksync.Server;
import me.william278.husksync.Settings; import net.william278.husksync.Settings;
import me.william278.husksync.migrator.MPDBMigrator; import net.william278.husksync.migrator.MPDBMigrator;
import me.william278.husksync.redis.RedisListener; import net.william278.husksync.redis.RedisListener;
import me.william278.husksync.redis.RedisMessage; import net.william278.husksync.redis.RedisMessage;
import me.william278.husksync.util.MessageManager; import net.william278.husksync.util.MessageManager;
import java.io.IOException; import java.io.IOException;
import java.util.Objects; import java.util.Objects;

@ -1,6 +1,6 @@
package me.william278.husksync.velocity.util; package net.william278.husksync.velocity.util;
import me.william278.husksync.util.Logger; import net.william278.husksync.util.Logger;
import java.util.logging.Level; import java.util.logging.Level;

@ -1,7 +1,7 @@
package me.william278.husksync.velocity.util; package net.william278.husksync.velocity.util;
import me.william278.husksync.HuskSyncVelocity; import net.william278.husksync.HuskSyncVelocity;
import me.william278.husksync.util.UpdateChecker; import net.william278.husksync.util.UpdateChecker;
import java.util.logging.Level; import java.util.logging.Level;

@ -8,5 +8,5 @@
"William278" "William278"
], ],
"dependencies": [], "dependencies": [],
"main": "me.william278.husksync.HuskSyncVelocity" "main": "net.william278.husksync.HuskSyncVelocity"
} }
Loading…
Cancel
Save