fix: resolve all IDE warnings - explicit imports, remove unused code, update branding to BaileyCodes/balls.studio, sync Velocity SKIN_UPDATE handler
This commit is contained in:
@@ -22,9 +22,8 @@ subprojects {
|
||||
apply(plugin = "java")
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(javaVersion.toInt()))
|
||||
}
|
||||
sourceCompatibility = JavaVersion.toVersion(javaVersion.toInt())
|
||||
targetCompatibility = JavaVersion.toVersion(javaVersion.toInt())
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
|
||||
@@ -15,7 +15,13 @@ import com.nickcore.paper.listener.TabCompleteListener;
|
||||
import com.nickcore.paper.repository.DatabaseManager;
|
||||
import com.nickcore.paper.repository.SqlNickRepository;
|
||||
import com.nickcore.paper.scheduler.SchedulerAdapter;
|
||||
import com.nickcore.paper.service.*;
|
||||
import com.nickcore.paper.service.ChatService;
|
||||
import com.nickcore.paper.service.NameOverrideService;
|
||||
import com.nickcore.paper.service.NametagService;
|
||||
import com.nickcore.paper.service.NickService;
|
||||
import com.nickcore.paper.service.PlaceholderService;
|
||||
import com.nickcore.paper.service.RankService;
|
||||
import com.nickcore.paper.service.SkinService;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@@ -24,7 +30,11 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,8 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.nickcore.paper.gui;
|
||||
|
||||
import com.nickcore.paper.cache.ProfileCache;
|
||||
import com.nickcore.paper.service.*;
|
||||
import com.nickcore.paper.service.NickService;
|
||||
import com.nickcore.paper.service.NametagService;
|
||||
import com.nickcore.paper.service.PlaceholderService;
|
||||
import com.nickcore.paper.service.RankService;
|
||||
import com.nickcore.paper.service.SkinService;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@@ -10,7 +14,7 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nickcore.paper.gui;
|
||||
|
||||
import com.nickcore.common.validation.InputSanitizer;
|
||||
import com.nickcore.paper.service.NickService;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
@@ -25,7 +25,7 @@ public final class NickCoreExpansion extends PlaceholderExpansion {
|
||||
public @NotNull String getIdentifier() { return "nickcore"; }
|
||||
|
||||
@Override
|
||||
public @NotNull String getAuthor() { return "NickCore Team"; }
|
||||
public @NotNull String getAuthor() { return "BaileyCodes"; }
|
||||
|
||||
@Override
|
||||
public @NotNull String getVersion() { return plugin.getPluginMeta().getVersion(); }
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.nickcore.paper.listener;
|
||||
|
||||
import com.nickcore.common.model.NickProfile;
|
||||
import com.nickcore.paper.service.*;
|
||||
import com.nickcore.paper.service.NameOverrideService;
|
||||
import com.nickcore.paper.service.NametagService;
|
||||
import com.nickcore.paper.service.NickService;
|
||||
import com.nickcore.paper.service.PlaceholderService;
|
||||
import com.nickcore.paper.service.SkinService;
|
||||
import com.nickcore.paper.scheduler.SchedulerAdapter;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
@@ -8,8 +8,7 @@ import com.nickcore.paper.cache.ProfileCache;
|
||||
import com.nickcore.paper.integration.VelocityMessaging;
|
||||
import com.nickcore.paper.repository.NickRepository;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -37,7 +36,6 @@ public final class NickService {
|
||||
private final ProfileCache cache;
|
||||
private final NicknameValidator validator;
|
||||
private final Logger logger;
|
||||
private final MiniMessage miniMessage;
|
||||
|
||||
// Configurable name pool — loaded from names.yml, swapped atomically on reload
|
||||
private volatile List<String> namePool = List.of();
|
||||
@@ -55,7 +53,6 @@ public final class NickService {
|
||||
this.cache = Objects.requireNonNull(cache);
|
||||
this.validator = Objects.requireNonNull(validator);
|
||||
this.logger = Objects.requireNonNull(logger);
|
||||
this.miniMessage = MiniMessage.miniMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.nickcore.paper.service;
|
||||
import com.nickcore.common.model.NickProfile;
|
||||
import com.nickcore.common.model.RankDefinition;
|
||||
import com.nickcore.paper.cache.ProfileCache;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -5,7 +5,13 @@ import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,15 +6,19 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ main: com.nickcore.paper.NickCorePlugin
|
||||
api-version: '1.21'
|
||||
description: Enterprise Minecraft Nickname Plugin
|
||||
author: BaileyCodes
|
||||
website: https://nickcore.com
|
||||
website: https://balls.studio
|
||||
folia-supported: true
|
||||
|
||||
softdepend:
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.slf4j.Logger;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@@ -108,10 +107,12 @@ public final class NickCoreVelocity {
|
||||
(uuid, p) -> p.withNickname(message.nickname()));
|
||||
case RANK_UPDATE -> proxyCache.computeIfPresent(message.playerUuid(),
|
||||
(uuid, p) -> p.withRank(message.rankId()));
|
||||
case SKIN_UPDATE -> proxyCache.computeIfPresent(message.playerUuid(),
|
||||
(uuid, p) -> p.withSkin(message.skinId(), message.skinValue(), message.skinSignature()));
|
||||
case RESET -> proxyCache.computeIfPresent(message.playerUuid(),
|
||||
(uuid, p) -> p.reset());
|
||||
case CACHE_INVALIDATE -> proxyCache.remove(message.playerUuid());
|
||||
default -> { /* ignore */ }
|
||||
default -> { /* PLAYER_JOIN, PLAYER_QUIT — no proxy-side action needed */ }
|
||||
}
|
||||
|
||||
// Forward to all OTHER servers
|
||||
|
||||
Reference in New Issue
Block a user