This commit is contained in:
Color_yr committed 2026-03-28 22:42:13 +08:00
1 parent 7681c06115
commit 52e61e92cb
3 files changed
+7 -4

No files matched your search

@@ -31,7 +31,7 @@ public class PluginMessage implements PluginMessageListener {
lyric = (TopLyricSave) PlayMusic.lyric;
service = Executors.newSingleThreadScheduledExecutor();
service.scheduleAtFixedRate(PluginMessage::clear, 0, 30, TimeUnit.SECONDS);
service.scheduleAtFixedRate(PluginMessage::clear, 0, 10, TimeUnit.SECONDS);
}
private static void clear() {
@@ -37,7 +37,9 @@ public class AllMusicVelocity {
public void onProxyInitialization(ProxyInitializeEvent event) {
plugin = this;
AllMusic.log = new LogVelocity();
AllMusic.side = new SideVelocity();
SideVelocity side = new SideVelocity();
AllMusic.side = side;
AllMusic.economy = side;
AllMusic.init(dataDirectory.toFile());
@@ -18,6 +18,7 @@ import com.velocitypowered.api.permission.PermissionSubject;
import com.velocitypowered.api.proxy.ConsoleCommandSource;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ServerConnection;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import io.netty.buffer.ByteBuf;
import net.kyori.adventure.text.Component;
@@ -333,8 +334,8 @@ public class SideVelocity extends BaseSide implements IEconomy {
SendToBackend.put(uuid, -1);
String server = AllMusic.getConfig().economy.backend;
ServerConnection toServer = null;
for (ServerConnection connection : TopServers) {
RegisteredServer toServer = null;
for (RegisteredServer connection : AllMusicVelocity.plugin.server.getAllServers()) {
if (connection.getServerInfo().getName().equalsIgnoreCase(server)) {
toServer = connection;
}