mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Complete some TODOs
This commit is contained in:
1 parent
548955134e
commit
4d547f80c7
27 files changed
+155
-67
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package net.draycia.carbon;
|
||||
|
||||
import cloud.commandframework.CommandManager;
|
||||
import cloud.commandframework.execution.CommandExecutionCoordinator;
|
||||
import cloud.commandframework.paper.PaperCommandManager;
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
@@ -91,16 +92,14 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
|
||||
|
||||
private ChannelManager channelManager;
|
||||
private AdventureManager messageProcessor;
|
||||
|
||||
private CommandSettingsRegistry commandSettings;
|
||||
private ModerationSettings moderationSettings;
|
||||
private CarbonSettings carbonSettings;
|
||||
private ChannelSettings channelSettings;
|
||||
|
||||
private UserService<BukkitPlayerUser> userService;
|
||||
private MessageManager messageManager;
|
||||
|
||||
private CarbonTranslations translations;
|
||||
private CommandManager<CarbonUser> commandManager;
|
||||
|
||||
private Logger logger;
|
||||
|
||||
@@ -393,6 +392,11 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
|
||||
return this.commandSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull CommandManager<CarbonUser> commandManager() {
|
||||
return this.commandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull MessageProcessor messageProcessor() {
|
||||
return this.messageProcessor;
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ public class PAPIContext {
|
||||
final String[] pieces = context.asString().split("=");
|
||||
|
||||
if (pieces.length != 2) {
|
||||
return; // TODO: maybe alert of misconfiguration?
|
||||
return;
|
||||
}
|
||||
|
||||
final Player receiver = Bukkit.getPlayer(event.recipient().uuid());
|
||||
@@ -59,7 +59,7 @@ public class PAPIContext {
|
||||
final String[] pieces = context.asString().split("=");
|
||||
|
||||
if (pieces.length != 2) {
|
||||
return; // TODO: maybe alert of misconfiguration?
|
||||
return;
|
||||
}
|
||||
|
||||
final Player receiver = Bukkit.getPlayer(event.user().uuid());
|
||||
|
||||
+2
-2
@@ -38,11 +38,11 @@ public class BukkitChatListener implements Listener {
|
||||
ChatChannel channel = user.selectedChannel();
|
||||
|
||||
if (channel == null) {
|
||||
if (this.carbonChat.channelRegistry().defaultChannel() == null) {
|
||||
if (this.carbonChat.channelRegistry().defaultValue() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
channel = this.carbonChat.channelRegistry().defaultChannel();
|
||||
channel = this.carbonChat.channelRegistry().defaultValue();
|
||||
}
|
||||
|
||||
// if (channel.shouldCancelChatEvent()) {
|
||||
|
||||
@@ -197,7 +197,7 @@ public class BukkitPlayerUser implements PlayerUser, ForwardingAudience {
|
||||
|
||||
@Override
|
||||
public void clearSelectedChannel() {
|
||||
this.selectedChannel(this.carbonChat.channelRegistry().defaultChannel());
|
||||
this.selectedChannel(this.carbonChat.channelRegistry().defaultValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -79,7 +79,7 @@ public class CarbonPlaceholders extends PlaceholderExpansion {
|
||||
} else if (key.startsWith("selected_channel")) {
|
||||
final ChatChannel channel = this.carbonChat.userService().wrap(player.getUniqueId()).selectedChannel();
|
||||
|
||||
return channel == null ? this.carbonChat.channelRegistry().defaultChannel().name() : channel.name();
|
||||
return channel == null ? this.carbonChat.channelRegistry().defaultValue().name() : channel.name();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user