From 112d4b6d926388e3fb230711eef76351fdc3b38f Mon Sep 17 00:00:00 2001 From: hammy3502 Date: Fri, 29 Apr 2022 17:22:52 -0400 Subject: [PATCH] Server-Side Config Gating for Backpack --- .../immersivemc/common/network/packet/InventorySwapPacket.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/blf02/immersivemc/common/network/packet/InventorySwapPacket.java b/src/main/java/net/blf02/immersivemc/common/network/packet/InventorySwapPacket.java index c55b59f0..7613d5fb 100644 --- a/src/main/java/net/blf02/immersivemc/common/network/packet/InventorySwapPacket.java +++ b/src/main/java/net/blf02/immersivemc/common/network/packet/InventorySwapPacket.java @@ -1,5 +1,6 @@ package net.blf02.immersivemc.common.network.packet; +import net.blf02.immersivemc.common.config.ActiveConfig; import net.blf02.immersivemc.server.swap.Swap; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.network.PacketBuffer; @@ -26,6 +27,7 @@ public static InventorySwapPacket decode(PacketBuffer buffer) { public static void handle(InventorySwapPacket message, Supplier ctx) { ctx.get().enqueueWork(() -> { + if (!ActiveConfig.useBackpack) return; ServerPlayerEntity player = ctx.get().getSender(); if (player != null) { Swap.handleInventorySwap(player, message.slot, Hand.MAIN_HAND);