diff --git a/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java index 16a4473fc..33727eba1 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java @@ -340,7 +340,6 @@ public class LivingEventHandler { player.getCapability(ModCapabilities.LASER_CAPABILITY).ifPresent(LaserCapability.ILaserCapability::stop); if (player instanceof ServerPlayer serverPlayer) { - ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new DrawClientMessage(true)); if (newStack.getItem() != oldStack.getItem() || newStack.getTag() == null || oldStack.getTag() == null || (newStack.is(ModTags.Items.GUN) && !GunsTool.getGunData(newStack).hasUUID("UUID")) @@ -422,6 +421,10 @@ public class LivingEventHandler { GunsTool.setPerkIntTag(newStack, "KillingTally", 0); } + if (player.level() instanceof ServerLevel) { + ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new DrawClientMessage(true)); + } + player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> { capability.tacticalSprint = false; capability.syncPlayerVariables(player);