Skip to content

Commit

Permalink
Merge branch 'verbose-on-join' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Nov 30, 2024
2 parents f755f2d + 4887415 commit 02f030f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ bukkit {
description = "Exempt from all checks"
default = Permission.Default.FALSE
}

register("grim.verbose") {
description = "Receive verbose alerts for violations. Requires grim.alerts"
default = Permission.Default.OP
}

register("grim.verbose.enable-on-join") {
description = "Enable verbose alerts on join. Requires grim.alerts and grim.alerts.enable-on-join"
default = Permission.Default.OP
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void onPacketSend(final PacketSendEvent event) {
if (playerVelocity.getY() == -0.04) {
velocity.setVelocity(playerVelocity.add(new Vector3d(0, 1 / 8000D, 0)));
playerVelocity = velocity.getVelocity();
event.markForReEncode(true);
}

// Wrap velocity between two transactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void onUserLogin(UserLoginEvent event) {
}
if (player.hasPermission("grim.alerts") && player.hasPermission("grim.alerts.enable-on-join")) {
GrimAPI.INSTANCE.getAlertManager().toggleAlerts(player);
if (player.hasPermission("grim.verbose") && player.hasPermission("grim.verbose.enable-on-join")) {
GrimAPI.INSTANCE.getAlertManager().toggleVerbose(player);
}
}
if (player.hasPermission("grim.verbose") && player.hasPermission("grim.verbose.enable-on-join")) {
GrimAPI.INSTANCE.getAlertManager().toggleVerbose(player);
Expand Down

0 comments on commit 02f030f

Please sign in to comment.