mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 06:28:54 +00:00
Fix annotation inconsistency and other nonsense
This commit is contained in:
1 parent
3f6d47be1c
commit
8a1b574d62
48 files changed
+182
-326
No files matched your search
+4
-7
@@ -12,14 +12,11 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class AdventureManager implements MessageProcessor {
|
||||
|
||||
@NonNull
|
||||
private final AudienceProvider provider;
|
||||
private final @NonNull AudienceProvider provider;
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
@NonNull
|
||||
private final FormatType formatType;
|
||||
private final @NonNull FormatType formatType;
|
||||
|
||||
public AdventureManager(final @NonNull AudienceProvider provider, final @NonNull FormatType formatType) {
|
||||
this.provider = provider;
|
||||
@@ -28,7 +25,7 @@ public class AdventureManager implements MessageProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Component processMessage(@Nullable final String input, final @NonNull String @NonNull ... placeholders) {
|
||||
public @NonNull Component processMessage(final @Nullable String input, final @NonNull String @NonNull ... placeholders) {
|
||||
if (input == null || input.trim().isEmpty()) {
|
||||
return Component.empty();
|
||||
}
|
||||
|
||||
+20
-39
@@ -33,13 +33,11 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class CarbonChatChannel implements TextChannel {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
@NonNull
|
||||
private final ChannelOptions options;
|
||||
private final @NonNull ChannelOptions options;
|
||||
|
||||
public CarbonChatChannel(final @NonNull CarbonChat carbonChat, @Nullable final ChannelOptions options) {
|
||||
public CarbonChatChannel(final @NonNull CarbonChat carbonChat, final @Nullable ChannelOptions options) {
|
||||
this.carbonChat = carbonChat;
|
||||
this.options = options;
|
||||
}
|
||||
@@ -234,8 +232,7 @@ public class CarbonChatChannel implements TextChannel {
|
||||
return this.parseMessage(user, this.audiences(), message, fromRemote);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String format(final @NonNull ChatUser user) {
|
||||
public @Nullable String format(final @NonNull ChatUser user) {
|
||||
for (final String group : this.groupOverrides()) {
|
||||
if (this.userHasGroup(user, group)) {
|
||||
final String format = this.format(group);
|
||||
@@ -296,14 +293,12 @@ public class CarbonChatChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String format(final @NonNull Group group) {
|
||||
public @Nullable String format(final @NonNull Group group) {
|
||||
return this.format(group.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String format(final @NonNull String group) {
|
||||
public @Nullable String format(final @NonNull String group) {
|
||||
return this.options().format(group);
|
||||
}
|
||||
|
||||
@@ -364,8 +359,7 @@ public class CarbonChatChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public TextColor channelColor(final @NonNull ChatUser user) {
|
||||
public @Nullable TextColor channelColor(final @NonNull ChatUser user) {
|
||||
final TextColor userColor = user.channelSettings(this).color();
|
||||
|
||||
if (userColor != null) {
|
||||
@@ -388,8 +382,7 @@ public class CarbonChatChannel implements TextChannel {
|
||||
return color;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String defaultFormatName() {
|
||||
public @Nullable String defaultFormatName() {
|
||||
return this.options().defaultFormatName();
|
||||
}
|
||||
|
||||
@@ -431,62 +424,52 @@ public class CarbonChatChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String messagePrefix() {
|
||||
public @Nullable String messagePrefix() {
|
||||
return this.options().messagePrefix();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String switchMessage() {
|
||||
public @Nullable String switchMessage() {
|
||||
return this.options().switchMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String switchOtherMessage() {
|
||||
public @Nullable String switchOtherMessage() {
|
||||
return this.options().switchOtherMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String switchFailureMessage() {
|
||||
public @Nullable String switchFailureMessage() {
|
||||
return this.options().switchFailureMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String cannotIgnoreMessage() {
|
||||
public @Nullable String cannotIgnoreMessage() {
|
||||
return this.options().cannotIgnoreMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String toggleOffMessage() {
|
||||
public @Nullable String toggleOffMessage() {
|
||||
return this.options().toggleOffMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String toggleOnMessage() {
|
||||
public @Nullable String toggleOnMessage() {
|
||||
return this.options().toggleOnMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String toggleOtherOnMessage() {
|
||||
public @Nullable String toggleOtherOnMessage() {
|
||||
return this.options().toggleOtherOnMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String toggleOtherOffMessage() {
|
||||
public @Nullable String toggleOtherOffMessage() {
|
||||
return this.options().toggleOtherOffMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String cannotUseMessage() {
|
||||
public @Nullable String cannotUseMessage() {
|
||||
return this.options().cannotUseMessage();
|
||||
}
|
||||
|
||||
@@ -507,14 +490,12 @@ public class CarbonChatChannel implements TextChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public List<String> aliases() {
|
||||
public @Nullable List<String> aliases() {
|
||||
return this.options().aliases();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Context context(final @NonNull String key) {
|
||||
public @Nullable Context context(final @NonNull String key) {
|
||||
return this.options().context(key);
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -46,20 +46,20 @@ public class CarbonWhisperChannel implements WhisperChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable TextColor channelColor(@NonNull final ChatUser user) {
|
||||
public @Nullable TextColor channelColor(final @NonNull ChatUser user) {
|
||||
return NamedTextColor.WHITE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Map<ChatUser, Component> parseMessage(@NonNull final ChatUser user, @NonNull final String message,
|
||||
public @NonNull Map<ChatUser, Component> parseMessage(final @NonNull ChatUser user, final @NonNull String message,
|
||||
final boolean fromRemote) {
|
||||
return this.parseMessage(user, Collections.singleton(this.audience()), message, fromRemote);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Map<ChatUser, Component> parseMessage(@NonNull final ChatUser user,
|
||||
@NonNull final Collection<@NonNull ChatUser> recipients,
|
||||
@NonNull final String message, final boolean fromRemote) {
|
||||
public @NonNull Map<ChatUser, Component> parseMessage(final @NonNull ChatUser user,
|
||||
final @NonNull Collection<@NonNull ChatUser> recipients,
|
||||
final @NonNull String message, final boolean fromRemote) {
|
||||
// TODO: extract to method, this is just the same thing but twice
|
||||
final Map<ChatUser, Component> result = new HashMap<>();
|
||||
|
||||
@@ -167,17 +167,17 @@ public class CarbonWhisperChannel implements WhisperChannel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayerUse(@NonNull final ChatUser user) {
|
||||
public boolean canPlayerUse(final @NonNull ChatUser user) {
|
||||
return user.equals(this.sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayerSee(@NonNull final ChatUser sender, @NonNull final ChatUser target, final boolean checkSpying) {
|
||||
public boolean canPlayerSee(final @NonNull ChatUser sender, final @NonNull ChatUser target, final boolean checkSpying) {
|
||||
return (checkSpying && target.spyingWhispers()) || (sender.equals(this.sender) && target.equals(this.audience));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayerSee(@NonNull final ChatUser target, final boolean checkSpying) {
|
||||
public boolean canPlayerSee(final @NonNull ChatUser target, final boolean checkSpying) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -16,11 +16,9 @@ import java.util.Map;
|
||||
|
||||
public class ChannelManager {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
@NonNull
|
||||
private final ChannelRegistry registry;
|
||||
private final @NonNull ChannelRegistry registry;
|
||||
|
||||
@Nullable
|
||||
@MonotonicNonNull
|
||||
@@ -73,7 +71,7 @@ public class ChannelManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
public @Nullable ChatChannel channelOrDefault(@Nullable final String key) {
|
||||
public @Nullable ChatChannel channelOrDefault(final @Nullable String key) {
|
||||
if (key == null) {
|
||||
return this.defaultChannel();
|
||||
}
|
||||
|
||||
+1
-2
@@ -14,8 +14,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ChannelCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ChannelCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class ChannelListCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ChannelListCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -11,8 +11,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ChatReloadCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ChatReloadCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -11,8 +11,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ClearChatCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ClearChatCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class IgnoreCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public IgnoreCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class MeCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public MeCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ import java.util.Optional;
|
||||
|
||||
public class MessageCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public MessageCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class MuteCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public MuteCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class NicknameCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public NicknameCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ReplyCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ReplyCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class SetColorCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public SetColorCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ShadowMuteCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ShadowMuteCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class SpyChannelCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public SpyChannelCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class SudoChannelCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public SudoChannelCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ToggleCommand {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public ToggleCommand(final @NonNull CommandManager<ChatUser> commandManager) {
|
||||
this.carbonChat = CarbonChatProvider.carbonChat();
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ public final class SoundSerializer implements TypeSerializer<Sound> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Sound deserialize(@NonNull final Type type, @NonNull final ConfigurationNode value) throws ObjectMappingException {
|
||||
public @Nullable Sound deserialize(final @NonNull Type type, final @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
if (value.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public final class SoundSerializer implements TypeSerializer<Sound> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(@NonNull final Type type, @Nullable final Sound obj, @NonNull final ConfigurationNode value) throws ObjectMappingException {
|
||||
public void serialize(final @NonNull Type type, final @Nullable Sound obj, final @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
if (obj == null) {
|
||||
value.setValue(null);
|
||||
return;
|
||||
|
||||
+1
-2
@@ -16,8 +16,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class FilterContext {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public FilterContext(final @NonNull CarbonChat carbonChat) {
|
||||
this.carbonChat = carbonChat;
|
||||
|
||||
+2
-4
@@ -15,11 +15,9 @@ import java.util.function.Consumer;
|
||||
|
||||
public class MessageManager {
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
@NonNull
|
||||
private final MessageService messageService;
|
||||
private final @NonNull MessageService messageService;
|
||||
|
||||
public MessageManager(final @NonNull CarbonChat carbonChat, final @NonNull MessageService messageService) {
|
||||
this.carbonChat = carbonChat;
|
||||
|
||||
+6
-12
@@ -22,23 +22,17 @@ import java.util.function.Consumer;
|
||||
|
||||
public class RedisMessageService implements MessageService {
|
||||
|
||||
@NonNull
|
||||
private final Map<@NonNull String, @NonNull BiConsumer<@NonNull ChatUser, @NonNull ByteArrayDataInput>> userLoadedListeners = new HashMap<>();
|
||||
private final @NonNull Map<@NonNull String, @NonNull BiConsumer<@NonNull ChatUser, @NonNull ByteArrayDataInput>> userLoadedListeners = new HashMap<>();
|
||||
|
||||
@NonNull
|
||||
private final Map<@NonNull String, @NonNull BiConsumer<@NonNull UUID, @NonNull ByteArrayDataInput>> userNotLoadedListeners = new HashMap<>();
|
||||
private final @NonNull Map<@NonNull String, @NonNull BiConsumer<@NonNull UUID, @NonNull ByteArrayDataInput>> userNotLoadedListeners = new HashMap<>();
|
||||
|
||||
@NonNull
|
||||
private final RedisPubSubCommands<@NonNull String, @NonNull String> subscribeSync;
|
||||
private final @NonNull RedisPubSubCommands<@NonNull String, @NonNull String> subscribeSync;
|
||||
|
||||
@NonNull
|
||||
private final RedisPubSubCommands<@NonNull String, @NonNull String> publishSync;
|
||||
private final @NonNull RedisPubSubCommands<@NonNull String, @NonNull String> publishSync;
|
||||
|
||||
@NonNull
|
||||
private final UUID serverUUID = UUID.randomUUID();
|
||||
private final @NonNull UUID serverUUID = UUID.randomUUID();
|
||||
|
||||
@NonNull
|
||||
private final CarbonChat carbonChat;
|
||||
private final @NonNull CarbonChat carbonChat;
|
||||
|
||||
public RedisMessageService(final @NonNull CarbonChat carbonChat, final @NonNull RedisCredentials credentials) {
|
||||
this.carbonChat = carbonChat;
|
||||
|
||||
+3
-6
@@ -72,8 +72,7 @@ public class JSONUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrap(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrap(final @NonNull UUID uuid) {
|
||||
try {
|
||||
return this.userCache.get(uuid);
|
||||
} catch (final ExecutionException exception) {
|
||||
@@ -83,14 +82,12 @@ public class JSONUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
return this.userCache.getIfPresent(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T refreshUser(final @NonNull UUID uuid) {
|
||||
public @Nullable T refreshUser(final @NonNull UUID uuid) {
|
||||
this.userCache.invalidate(uuid);
|
||||
|
||||
return this.wrap(uuid);
|
||||
|
||||
+3
-6
@@ -107,8 +107,7 @@ public class MySQLUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrap(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrap(final @NonNull UUID uuid) {
|
||||
try {
|
||||
return this.userCache.get(uuid);
|
||||
} catch (final ExecutionException exception) {
|
||||
@@ -118,14 +117,12 @@ public class MySQLUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
return this.userCache.getIfPresent(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T refreshUser(final @NonNull UUID uuid) {
|
||||
public @Nullable T refreshUser(final @NonNull UUID uuid) {
|
||||
this.userCache.invalidate(uuid);
|
||||
|
||||
return this.wrap(uuid);
|
||||
|
||||
@@ -12,13 +12,11 @@ public final class ColorUtils {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static TextColor parseColor(@Nullable final String input) {
|
||||
public @Nullable static TextColor parseColor(final @Nullable String input) {
|
||||
return parseColor(null, input);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static TextColor parseColor(@Nullable final ChatUser user, @Nullable String input) {
|
||||
public @Nullable static TextColor parseColor(final @Nullable ChatUser user, @Nullable String input) {
|
||||
if (input == null || input.isEmpty()) {
|
||||
return NamedTextColor.WHITE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user