Skip to content

Commit 776eb65

Browse files
committed
Fix Stonecutter compilation errors
1 parent b221030 commit 776eb65

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import xyz.srnyx.gradlegalaxy.data.config.JavaSetupConfig
12
import xyz.srnyx.gradlegalaxy.enums.Repository
23
import xyz.srnyx.gradlegalaxy.enums.repository
34
import xyz.srnyx.gradlegalaxy.utility.addReplacementsTask
@@ -8,15 +9,15 @@ import xyz.srnyx.gradlegalaxy.utility.setupJava
89
plugins {
910
java
1011
id("fabric-loom") version "1.11-SNAPSHOT"
11-
id("xyz.srnyx.gradle-galaxy") version "1.3.3"
12+
id("xyz.srnyx.gradle-galaxy") version "2.0.2"
1213
}
1314

1415
// Get Java version
1516
val java = if (stonecutter.eval(stonecutter.current.version, ">=1.20.5")) JavaVersion.VERSION_21 else JavaVersion.VERSION_17
1617
stonecutter.dependency("java", java.majorVersion)
1718

1819
val fullVersion = "${stonecutter.current.version}-${property("mod.version").toString()}"
19-
setupJava("cc.aabss", fullVersion, "Alerting for Event Alerts Minecraft events", java)
20+
setupJava(JavaSetupConfig("cc.aabss", fullVersion, "Alerting for Event Alerts Minecraft events", java))
2021

2122
repository("https://maven.shedaniel.me/", "https://maven.fabricmc.net/", "https://maven.terraformersmc.com/releases/", "https://maven.isxander.dev/releases/", "https://maven.nucleoid.xyz/")
2223
repository(Repository.MAVEN_CENTRAL, Repository.JITPACK)

src/main/java/cc/aabss/eventutils/commands/PriorityCmd.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package cc.aabss.eventutils.commands;
22

33
import cc.aabss.eventutils.EventUtils;
4+
45
import com.mojang.brigadier.context.CommandContext;
56

67
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
8+
79
import net.minecraft.client.MinecraftClient;
810
import net.minecraft.client.network.AbstractClientPlayerEntity;
911
import net.minecraft.text.*;
@@ -107,13 +109,11 @@ public static void priority(@NotNull CommandContext<FabricClientCommandSource> c
107109
"eventutils.command.prioritytop.lastpage",
108110
page - 1
109111
).setStyle(
110-
Style.EMPTY.withClickEvent(
111112
//? if <=1.21.4 {
112-
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/eventutils prioritytop " + (page - 1))
113+
Style.EMPTY.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/eventutils prioritytop " + (page - 1)))
113114
//?} else {
114-
new ClickEvent.RunCommand("/eventutils prioritytop " + (page - 1))
115+
/*Style.EMPTY.withClickEvent(new ClickEvent.RunCommand("/eventutils prioritytop " + (page - 1)))
115116
*///?}
116-
)
117117
);
118118
}
119119

@@ -123,12 +123,10 @@ public static void priority(@NotNull CommandContext<FabricClientCommandSource> c
123123
page + 1
124124
).setStyle(
125125
//? if <=1.21.4 {
126-
Style.EMPTY.withClickEvent(
127-
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/eventutils prioritytop " + (page + 1))
126+
Style.EMPTY.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/eventutils prioritytop " + (page + 1)))
128127
//?} else {
129-
new ClickEvent.RunCommand("/eventutils prioritytop " + (page + 1))
128+
/*Style.EMPTY.withClickEvent(new ClickEvent.RunCommand("/eventutils prioritytop " + (page + 1)))
130129
*///?}
131-
)
132130
);
133131
}
134132

0 commit comments

Comments
 (0)