mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Initial abstraction -> ChatUser
This commit is contained in:
1 parent
03e8f4ec53
commit
97089de7ef
22 files changed
+396
-365
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package net.draycia.simplechat.channels;
|
||||
|
||||
import net.draycia.simplechat.SimpleChat;
|
||||
import net.draycia.simplechat.storage.ChatUser;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@@ -104,11 +105,11 @@ public abstract class ChatChannel {
|
||||
/**
|
||||
* @return If the player can use this channel.
|
||||
*/
|
||||
public abstract boolean canPlayerUse(Player player);
|
||||
public abstract boolean canPlayerUse(ChatUser user);
|
||||
|
||||
public abstract boolean canPlayerSee(OfflinePlayer offlinePlayer, Player player);
|
||||
public abstract boolean canPlayerSee(ChatUser sender, ChatUser target);
|
||||
|
||||
public abstract List<Player> getAudience(OfflinePlayer offlinePlayer);
|
||||
public abstract List<Player> getAudience(ChatUser user);
|
||||
|
||||
/**
|
||||
* @return If the channel should forward its formatting / formatted message to other servers
|
||||
@@ -119,12 +120,12 @@ public abstract class ChatChannel {
|
||||
|
||||
/**
|
||||
* Parses the specified message, calls a {@link net.draycia.simplechat.events.ChannelChatEvent}, and sends the message to everyone who can view this channel.
|
||||
* @param player The player who is saying the message.
|
||||
* @param user The player who is saying the message.
|
||||
* @param message The message to be sent.
|
||||
*/
|
||||
public abstract void sendMessage(OfflinePlayer player, String message);
|
||||
public abstract void sendMessage(ChatUser user, String message, boolean fromBungee);
|
||||
|
||||
public abstract void sendComponent(OfflinePlayer player, Component component);
|
||||
public abstract void sendComponent(ChatUser user, Component component);
|
||||
|
||||
public abstract void processDiscordMessage(MessageCreateEvent event);
|
||||
|
||||
|
||||
Reference in new issue
Block a user