Skip to content

Commit

Permalink
[Dependencies] Bump and remove unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
NEZNAMY committed Feb 1, 2025
1 parent 0f85aa5 commit dd1524c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ dependencies {
compileOnlyApi("net.luckperms:api:5.4")
compileOnlyApi("com.google.guava:guava:31.1-jre")
compileOnlyApi("org.geysermc.floodgate:api:2.2.0-SNAPSHOT")
compileOnlyApi("net.kyori:adventure-api:4.17.0")
compileOnlyApi("net.kyori:adventure-text-serializer-legacy:4.17.0")
compileOnlyApi("net.kyori:adventure-text-minimessage:4.17.0")
compileOnlyApi("net.kyori:adventure-api:4.18.0")
compileOnlyApi("net.kyori:adventure-text-minimessage:4.18.0")
}

blossom {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import me.neznamy.tab.shared.TAB;
import me.neznamy.tab.shared.chat.component.TabComponent;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -19,11 +18,10 @@ public class MiniMessageHook {
@Nullable
private static MiniMessage createMiniMessage() {
try {
if (ReflectionUtils.classExists("net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer")) {
return MiniMessage.builder().postProcessor(c->c).build();
}
} catch (Throwable ignored) {}
return null;
return MiniMessage.builder().postProcessor(c -> c).build();
} catch (Throwable ignored) {
return null;
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import me.neznamy.tab.shared.TAB;
import me.neznamy.tab.shared.TabConstants;
import me.neznamy.tab.shared.chat.component.TabComponent;
import me.neznamy.tab.shared.platform.TabPlayer;
import net.kyori.adventure.identity.Identity;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.api.command.Command;
import org.spongepowered.api.command.CommandCause;
Expand Down Expand Up @@ -36,7 +36,7 @@ public CommandResult process(@NotNull CommandCause cause, @NotNull ArgumentReade
boolean hasAdminPermission = cause.hasPermission(TabConstants.Permission.COMMAND_ALL);
List<String> messages = TAB.getInstance().getDisabledCommand().execute(args, hasReloadPermission, hasAdminPermission);
for (String message : messages) {
cause.sendMessage(Identity.nil(), LegacyComponentSerializer.legacySection().deserialize(message));
cause.sendMessage(Identity.nil(), TabComponent.fromColoredText(message).toAdventure());
}
return CommandResult.success();
}
Expand Down

0 comments on commit dd1524c

Please sign in to comment.