Updated to 1.21 by switching to cosmos
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user