Updated to 1.21 by switching to cosmos

This commit is contained in:
2025-06-21 00:53:55 +02:00
parent 1dd19f0543
commit fc7860145f
40 changed files with 965 additions and 1015 deletions
@@ -3,7 +3,7 @@ package com.alttd.velocitychat.data;
import com.alttd.chat.config.ServerConfig;
import com.alttd.chat.managers.ChatUserManager;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import java.util.UUID;
@@ -31,8 +31,7 @@ public class ServerWrapper {
return serverName;
}
public boolean globalChat()
{
public boolean globalChat() {
return globalChat;
}
@@ -40,10 +39,11 @@ public class ServerWrapper {
return joinMessages;
}
public void sendJoinLeaveMessage(UUID uuid, Component component) {
if(joinMessages())
public void sendJoinLeaveMessage(UUID uuid, ComponentLike component) {
if (joinMessages()) {
getRegisteredServer().getPlayersConnected().stream()
.filter(p -> !ChatUserManager.getChatUser(p.getUniqueId()).getIgnoredPlayers().contains(uuid))
.forEach(p -> p.sendMessage(component));
}
}
}