Skip to content

Commit

Permalink
Merge pull request #1754 from Cyramek/via-version-fix
Browse files Browse the repository at this point in the history
warn about `ViaVersion rotation-place fix`
  • Loading branch information
SamB440 authored Oct 16, 2024
2 parents 9599b1c + c8ff110 commit bdf7eb7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
implementation("org.jetbrains:annotations:24.1.0")
compileOnly("org.geysermc.floodgate:api:2.0-SNAPSHOT")
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
compileOnly("com.viaversion:viaversion-api:4.9.4-SNAPSHOT")
compileOnly("com.viaversion:viaversion-api:5.0.4-SNAPSHOT")
//
compileOnly("io.netty:netty-all:4.1.85.Final")
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ac/grim/grimac/manager/InitManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public InitManager() {
.put(DiscordManager.class, GrimAPI.INSTANCE.getDiscordManager())
.put(SpectateManager.class, GrimAPI.INSTANCE.getSpectateManager())
.put(JavaVersion.class, new JavaVersion())
.put(ViaVersion.class, new ViaVersion())
.build();

initializersOnStop = new ImmutableClassToInstanceMap.Builder<Initable>()
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/ac/grim/grimac/manager/init/start/ViaVersion.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package ac.grim.grimac.manager.init.start;

import ac.grim.grimac.manager.init.Initable;
import ac.grim.grimac.utils.anticheat.LogUtil;
import com.viaversion.viaversion.api.Via;
import io.github.retrooper.packetevents.util.viaversion.ViaVersionUtil;

public class ViaVersion implements Initable {
@Override
public void start() {
if (!ViaVersionUtil.isAvailable() || !Via.getConfig().fix1_21PlacementRotation()) {
return;
}

LogUtil.warn("GrimAC has detected that you are using ViaVersion with the `fix-1_21-placement-rotation` option enabled.");
LogUtil.warn("This option is known to cause issues with GrimAC and may result in false positives and bypasses.");
LogUtil.warn("Please disable this option in your ViaVersion configuration to prevent these issues.");
}
}

0 comments on commit bdf7eb7

Please sign in to comment.