Skip to content

Commit

Permalink
Merge branch '2.x' into task/new-sign-transaction-events
Browse files Browse the repository at this point in the history
  • Loading branch information
sumsar1812 authored Mar 1, 2025
2 parents cf5b5f4 + 1531cf4 commit 92f7273
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Essentials/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ dependencies {

api 'io.papermc:paperlib:1.0.6'

implementation 'org.spongepowered:configurate-yaml:4.1.2'
implementation 'org.checkerframework:checker-qual:3.21.0'
implementation 'org.spongepowered:configurate-yaml:4.2.0'
implementation 'org.checkerframework:checker-qual:3.49.0'
implementation 'nu.studer:java-ordered-properties:1.0.4'

implementation 'net.kyori:adventure-api:4.18.0'
implementation 'net.kyori:adventure-text-minimessage:4.18.0'
implementation 'net.kyori:adventure-api:4.19.0'
implementation 'net.kyori:adventure-text-minimessage:4.19.0'
implementation 'net.kyori:adventure-platform-bukkit:4.3.4'

// Providers
Expand Down
2 changes: 1 addition & 1 deletion EssentialsDiscord/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

dependencies {
compileOnly project(':EssentialsX')
implementation('net.dv8tion:JDA:5.1.2') {
implementation('net.dv8tion:JDA:5.3.0') {
exclude(module: 'opus-java')
}
implementation 'com.github.MinnDevelopment:emoji-java:v6.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class PaperChatListener extends PaperChatListenerProvider {
private final JDADiscordService jda;

public PaperChatListener(JDADiscordService jda) {
super(false);
this.jda = jda;
}

Expand Down
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ repositories {

dependencies {
implementation("net.kyori", "indra-common", "3.1.3")
implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.3")
implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.6")
implementation("xyz.jpenilla", "run-task", "2.3.1")
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@
import java.util.Map;

public abstract class PaperChatListenerProvider implements Listener {
private final boolean formatParsing;
private final LegacyComponentSerializer serializer;
private final Map<AsyncChatEvent, PaperChatEvent> eventMap = new IdentityHashMap<>();

public PaperChatListenerProvider() {
this(true);
}

public PaperChatListenerProvider(final boolean formatParsing) {
this.formatParsing = formatParsing;
this.serializer = LegacyComponentSerializer.builder()
.flattener(ComponentFlattener.basic())
.extractUrls(AbstractChatEvent.URL_PATTERN)
Expand Down Expand Up @@ -59,6 +65,10 @@ public final void onHighest(final AsyncChatEvent event) {
return;
}

if (!formatParsing) {
return;
}

final TextComponent format = serializer.deserialize(paperChatEvent.getFormat());
final TextComponent eventMessage = serializer.deserialize(paperChatEvent.getMessage());

Expand Down

0 comments on commit 92f7273

Please sign in to comment.