From a92813a06e97b10d59e322f07b2653d0af82894a Mon Sep 17 00:00:00 2001 From: Draycia Date: Wed, 5 Jan 2022 20:21:00 -0800 Subject: [PATCH] 2.0.7 --- .../java/net/draycia/carbon/api/channels/ChatChannel.java | 3 +-- .../net/draycia/carbon/common/channels/BasicChatChannel.java | 5 +++++ .../carbon/common/command/commands/ContinueCommand.java | 5 +---- .../draycia/carbon/common/command/commands/ReplyCommand.java | 5 +---- .../carbon/common/command/commands/WhisperCommand.java | 5 +---- gradle.properties | 2 +- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/api/src/main/java/net/draycia/carbon/api/channels/ChatChannel.java b/api/src/main/java/net/draycia/carbon/api/channels/ChatChannel.java index 0034f3ac..7798c446 100644 --- a/api/src/main/java/net/draycia/carbon/api/channels/ChatChannel.java +++ b/api/src/main/java/net/draycia/carbon/api/channels/ChatChannel.java @@ -113,8 +113,7 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer { List commandAliases(); /** - * The base permission players must have in order to use the channel. - * + * The base permission players must have in order to use the channel.
* Null return means players do not need any permission. * * @return the permission required to use the channel, or null diff --git a/common/src/main/java/net/draycia/carbon/common/channels/BasicChatChannel.java b/common/src/main/java/net/draycia/carbon/common/channels/BasicChatChannel.java index 1666ff83..a1ded054 100644 --- a/common/src/main/java/net/draycia/carbon/common/channels/BasicChatChannel.java +++ b/common/src/main/java/net/draycia/carbon/common/channels/BasicChatChannel.java @@ -92,6 +92,11 @@ public final class BasicChatChannel implements ChatChannel { return Collections.emptyList(); } + @Override + public @Nullable String permission() { + return null; + } + @Override public ChannelPermissionResult speechPermitted(final CarbonPlayer carbonPlayer) { return ChannelPermissionResult.allowed(); diff --git a/common/src/main/java/net/draycia/carbon/common/command/commands/ContinueCommand.java b/common/src/main/java/net/draycia/carbon/common/command/commands/ContinueCommand.java index f51b9ca7..d52302f4 100644 --- a/common/src/main/java/net/draycia/carbon/common/command/commands/ContinueCommand.java +++ b/common/src/main/java/net/draycia/carbon/common/command/commands/ContinueCommand.java @@ -103,10 +103,7 @@ public class ContinueCommand extends CarbonCommand { return; } - if (!recipient.online() - || (!sender.awareOf(recipient) - && !sender.hasPermission("carbon.whisper.vanished")) - ) { + if (!recipient.online() || !sender.awareOf(recipient) && !sender.hasPermission("carbon.whisper.vanished")) { final var rawNameInput = CloudUtils.rawInputByMatchingName(handler.getRawInput(), recipient); final var exception = new CarbonPlayerArgument.CarbonPlayerParseException(rawNameInput, handler, this.messageService); diff --git a/common/src/main/java/net/draycia/carbon/common/command/commands/ReplyCommand.java b/common/src/main/java/net/draycia/carbon/common/command/commands/ReplyCommand.java index c3ccdd05..9adb9178 100644 --- a/common/src/main/java/net/draycia/carbon/common/command/commands/ReplyCommand.java +++ b/common/src/main/java/net/draycia/carbon/common/command/commands/ReplyCommand.java @@ -103,10 +103,7 @@ public class ReplyCommand extends CarbonCommand { return; } - if (!recipient.online() - || (!sender.awareOf(recipient) - && !sender.hasPermission("carbon.whisper.vanished")) - ) { + if (!recipient.online() || !sender.awareOf(recipient) && !sender.hasPermission("carbon.whisper.vanished")) { final var rawNameInput = CloudUtils.rawInputByMatchingName(handler.getRawInput(), recipient); final var exception = new CarbonPlayerArgument.CarbonPlayerParseException(rawNameInput, handler, this.messageService); diff --git a/common/src/main/java/net/draycia/carbon/common/command/commands/WhisperCommand.java b/common/src/main/java/net/draycia/carbon/common/command/commands/WhisperCommand.java index e5b8f2b7..c29abfd5 100644 --- a/common/src/main/java/net/draycia/carbon/common/command/commands/WhisperCommand.java +++ b/common/src/main/java/net/draycia/carbon/common/command/commands/WhisperCommand.java @@ -97,10 +97,7 @@ public class WhisperCommand extends CarbonCommand { return; } - if (!recipient.online() - || (!sender.awareOf(recipient) - && !sender.hasPermission("carbon.whisper.vanished")) - ) { + if (!recipient.online() || !sender.awareOf(recipient) && !sender.hasPermission("carbon.whisper.vanished")) { final var rawNameInput = CloudUtils.rawInputByMatchingName(handler.getRawInput(), recipient); final var exception = new CarbonPlayerArgument.CarbonPlayerParseException(rawNameInput, handler, this.messageService); diff --git a/gradle.properties b/gradle.properties index c523f3bd..f70cb3a2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Project Properties -projectVersion=2.0.6 +projectVersion=2.0.7 # Gradle Properties org.gradle.configureondemand=true