Skip to content

Commit

Permalink
Extinguish only works in survival - resolves #263
Browse files Browse the repository at this point in the history
  • Loading branch information
Direwolf20-MC committed Nov 2, 2024
1 parent 097b5d8 commit be2c6f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public static boolean jumpBoost(Level level, Player player, ItemStack itemStack)

public static boolean extinguish(Level level, Player player, ItemStack itemStack) {
if (level.isClientSide) return false;
if (player.isOnFire()) {
if (player.isOnFire() && ((ServerPlayer) player).gameMode.isSurvival()) {
int currentCooldown = ToggleableTool.getAnyCooldown(itemStack, Ability.EXTINGUISH);
if (currentCooldown != -1) return false;
if (itemStack.getItem() instanceof ToggleableTool toggleableTool && toggleableTool.canUseAbilityAndDurability(itemStack, Ability.EXTINGUISH)) {
Expand Down

0 comments on commit be2c6f0

Please sign in to comment.