Skip to content

Commit

Permalink
Disable on damage now ignores damage received in creative mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hashalite committed Dec 19, 2022
1 parent 344bf9e commit 60bd22b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private void onIsCamera(CallbackInfoReturnable<Boolean> cir) {
// Disables freecam upon receiving damage if disableOnDamage is enabled.
@Inject(method = "damage", at = @At("HEAD"))
private void onDamage(CallbackInfoReturnable<Boolean> cir) {
if (Freecam.isEnabled() && ModConfig.INSTANCE.disableOnDamage && this.equals(MC.player)) {
if (Freecam.isEnabled() && ModConfig.INSTANCE.disableOnDamage && this.equals(MC.player) && !MC.player.isCreative()) {
Freecam.setDisableNextTick(true);
}
}
Expand Down

0 comments on commit 60bd22b

Please sign in to comment.