diff --git a/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts b/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts index b7eda148..7262ec7f 100644 --- a/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/carbon.base-conventions.gradle.kts @@ -22,6 +22,8 @@ indra { license { header.set(resources.text.fromFile(rootProject.file("LICENSE_HEADER"))) exclude("net/draycia/carbon/common/command/argument/OptionValueParser.java") + exclude("net/draycia/carbon/common/messages/PrefixedDelegateIterator.java") + exclude("net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java") } tasks { diff --git a/common/src/main/java/net/draycia/carbon/common/command/commands/MuteCommand.java b/common/src/main/java/net/draycia/carbon/common/command/commands/MuteCommand.java index 5f3a07aa..78c20ebc 100644 --- a/common/src/main/java/net/draycia/carbon/common/command/commands/MuteCommand.java +++ b/common/src/main/java/net/draycia/carbon/common/command/commands/MuteCommand.java @@ -22,7 +22,6 @@ package net.draycia.carbon.common.command.commands; import cloud.commandframework.ArgumentDescription; import cloud.commandframework.CommandManager; import cloud.commandframework.arguments.standard.UUIDArgument; -import cloud.commandframework.exceptions.CommandExecutionException; import cloud.commandframework.minecraft.extras.MinecraftExtrasMetaKeys; import com.google.inject.Inject; import java.util.Objects; diff --git a/common/src/main/java/net/draycia/carbon/common/command/commands/UnmuteCommand.java b/common/src/main/java/net/draycia/carbon/common/command/commands/UnmuteCommand.java index 14dcc313..3a3e8d94 100644 --- a/common/src/main/java/net/draycia/carbon/common/command/commands/UnmuteCommand.java +++ b/common/src/main/java/net/draycia/carbon/common/command/commands/UnmuteCommand.java @@ -22,7 +22,6 @@ package net.draycia.carbon.common.command.commands; import cloud.commandframework.ArgumentDescription; import cloud.commandframework.CommandManager; import cloud.commandframework.arguments.standard.UUIDArgument; -import cloud.commandframework.exceptions.CommandExecutionException; import cloud.commandframework.minecraft.extras.MinecraftExtrasMetaKeys; import com.google.inject.Inject; import java.util.Objects; diff --git a/common/src/main/java/net/draycia/carbon/common/messages/PrefixedDelegateIterator.java b/common/src/main/java/net/draycia/carbon/common/messages/PrefixedDelegateIterator.java index c6fccea2..2e03a2ad 100644 --- a/common/src/main/java/net/draycia/carbon/common/messages/PrefixedDelegateIterator.java +++ b/common/src/main/java/net/draycia/carbon/common/messages/PrefixedDelegateIterator.java @@ -20,6 +20,7 @@ package net.draycia.carbon.common.messages; import java.util.Iterator; public final class PrefixedDelegateIterator implements Iterator { + private final T prefix; private final Iterator delegate; private boolean seenPrefix = false; @@ -52,4 +53,5 @@ public final class PrefixedDelegateIterator implements Iterator { this.delegate.remove(); } + } diff --git a/common/src/main/java/net/draycia/carbon/common/messages/Recipient.java b/common/src/main/java/net/draycia/carbon/common/messages/Recipient.java index 96cf4562..5044910d 100644 --- a/common/src/main/java/net/draycia/carbon/common/messages/Recipient.java +++ b/common/src/main/java/net/draycia/carbon/common/messages/Recipient.java @@ -1,18 +1,20 @@ /* - * moonshine - A localisation library for Java. - * Copyright (C) Mariell Hoversholm + * CarbonChat + * + * Copyright (c) 2021 Josua Parks (Vicarious) + * Contributors * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package net.draycia.carbon.common.messages; diff --git a/common/src/main/java/net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java b/common/src/main/java/net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java index 8f532b15..195a8a1b 100644 --- a/common/src/main/java/net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java +++ b/common/src/main/java/net/draycia/carbon/common/messages/StandardPlaceholderResolverStrategyButDifferent.java @@ -17,8 +17,6 @@ */ package net.draycia.carbon.common.messages; -import static java.util.Collections.emptyNavigableSet; - import io.leangen.geantyref.GenericTypeReflector; import java.lang.reflect.Parameter; import java.lang.reflect.Type; @@ -39,9 +37,11 @@ import net.kyori.moonshine.strategy.supertype.ISupertypeStrategy; import net.kyori.moonshine.strategy.supertype.StandardSupertypeThenInterfaceSupertypeStrategy; import org.checkerframework.checker.nullness.qual.Nullable; +import static java.util.Collections.emptyNavigableSet; + @ThreadSafe -public final class StandardPlaceholderResolverStrategyButDifferent implements - IPlaceholderResolverStrategy { +public final class StandardPlaceholderResolverStrategyButDifferent implements IPlaceholderResolverStrategy { + private final ISupertypeStrategy supertypeStrategy = new StandardSupertypeThenInterfaceSupertypeStrategy(false); @Override @@ -149,4 +149,5 @@ public final class StandardPlaceholderResolverStrategyButDifferent impl } } } + }