mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 06:28:54 +00:00
idek anymore dude
This commit is contained in:
1 parent
224c7723d6
commit
8a7ab5f858
9 files changed
+80
-8
No files matched your search
+8
-2
@@ -38,17 +38,23 @@ public class CarbonChatChannel implements TextChannel {
|
||||
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
private final @NonNull ChannelOptions options;
|
||||
private @NonNull ChannelOptions options;
|
||||
|
||||
public CarbonChatChannel(final @NonNull CarbonChat carbonChat, final @NonNull ChannelOptions options) {
|
||||
this.carbonChat = carbonChat;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NonNull ChannelOptions options() {
|
||||
return this.options;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void options(final @NonNull ChannelOptions options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public @NonNull CarbonChat carbonChat() {
|
||||
return this.carbonChat;
|
||||
}
|
||||
|
||||
+11
@@ -3,6 +3,7 @@ package net.draycia.carbon.common.channels;
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
import net.draycia.carbon.api.CarbonChatProvider;
|
||||
import net.draycia.carbon.api.channels.WhisperChannel;
|
||||
import net.draycia.carbon.api.config.ChannelOptions;
|
||||
import net.draycia.carbon.api.events.ChatComponentEvent;
|
||||
import net.draycia.carbon.api.events.ChatFormatEvent;
|
||||
import net.draycia.carbon.api.events.misc.CarbonEvents;
|
||||
@@ -37,6 +38,16 @@ public class CarbonWhisperChannel implements WhisperChannel {
|
||||
this.audience = audience;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull ChannelOptions options() {
|
||||
return ChannelOptions.defaultChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void options(final @NonNull ChannelOptions options) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull PlayerUser sender() {
|
||||
return this.sender;
|
||||
|
||||
+12
@@ -112,4 +112,16 @@ public class ChannelManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void reloadChannels() {
|
||||
for (final Map.Entry<String, ChannelOptions> options :
|
||||
this.carbonChat.channelSettings().channelOptions().entrySet()) {
|
||||
|
||||
final ChatChannel channel = this.registry().get(options.getValue().key());
|
||||
|
||||
if (channel != null) {
|
||||
channel.options(options.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class ChatReloadCommand {
|
||||
}
|
||||
|
||||
private void reloadConfig(final @NonNull CommandContext<CarbonUser> context) {
|
||||
this.carbonChat.reloadConfig();
|
||||
this.carbonChat.reload();
|
||||
|
||||
final Component message = this.carbonChat.messageProcessor()
|
||||
.processMessage(this.carbonChat.translations().reloaded().replace("br", "\n"));
|
||||
|
||||
Reference in new issue
Block a user