Skip to content

Commit

Permalink
don't allow magnet upgrade to work in spectator mode
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Sep 7, 2024
1 parent a88f687 commit 37308cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public EquipmentSlot getEquipmentSlot() {
public void tick(ICommonArmorHandler commonArmorHandler, boolean enabled) {
Player player = commonArmorHandler.getPlayer();

if (player.level().isClientSide || !enabled
if (player.level().isClientSide || player.isSpectator() || !enabled
|| (player.level().getGameTime() & 0x3) != 0
|| !commonArmorHandler.hasMinPressure(EquipmentSlot.CHEST))
return;
Expand Down

0 comments on commit 37308cf

Please sign in to comment.