diff --git a/worldedit-forge/build.gradle.kts b/worldedit-forge/build.gradle.kts index 4d3eebf64d..84c5c694ad 100644 --- a/worldedit-forge/build.gradle.kts +++ b/worldedit-forge/build.gradle.kts @@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import net.minecraftforge.gradle.common.util.RunConfig import net.minecraftforge.gradle.userdev.UserDevExtension import net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace +import org.spongepowered.asm.gradle.plugins.MixinExtension.ConfigureReobfTask plugins { id("net.minecraftforge.gradle") @@ -73,6 +74,13 @@ configure { config("worldedit-forge.mixins.json") } +// Workaround until SpongePowered/MixinGradle#51 is merged +afterEvaluate { + tasks.withType().configureEach { + dependsOn(tasks.compileJava) + } +} + configure { archivesName.set("${archivesName.get()}-mc$minecraftVersion") } diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/net/handler/WECUIPacketHandler.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/net/handler/WECUIPacketHandler.java index 928f53c0d8..8cbf60868d 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/net/handler/WECUIPacketHandler.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/net/handler/WECUIPacketHandler.java @@ -46,6 +46,10 @@ public static void init() { } public static void onPacketData(CustomPayloadEvent event) { + if (event.getSource().isClientSide()) { + // Ignore client-side packets + return; + } ServerPlayer player = event.getSource().getSender(); LocalSession session = ForgeWorldEdit.inst.getSession(player); String text = event.getPayload().toString(StandardCharsets.UTF_8);