diff --git a/src/main/java/com/convallyria/taleofkingdoms/client/packet/outgoing/OutgoingBankerInteractPacketHandler.java b/src/main/java/com/convallyria/taleofkingdoms/client/packet/outgoing/OutgoingBankerInteractPacketHandler.java index 16b997f5..c5847570 100644 --- a/src/main/java/com/convallyria/taleofkingdoms/client/packet/outgoing/OutgoingBankerInteractPacketHandler.java +++ b/src/main/java/com/convallyria/taleofkingdoms/client/packet/outgoing/OutgoingBankerInteractPacketHandler.java @@ -17,7 +17,7 @@ public OutgoingBankerInteractPacketHandler() { } @Override - public void handleIncomingPacket( PacketContext context, PacketByteBuf attachedData) { + public void handleIncomingPacket(PacketContext context, PacketByteBuf attachedData) { throw new IllegalArgumentException("Not supported"); } diff --git a/src/main/java/com/convallyria/taleofkingdoms/common/item/common/ItemPouch.java b/src/main/java/com/convallyria/taleofkingdoms/common/item/common/ItemPouch.java index 3308e376..311e2a7c 100644 --- a/src/main/java/com/convallyria/taleofkingdoms/common/item/common/ItemPouch.java +++ b/src/main/java/com/convallyria/taleofkingdoms/common/item/common/ItemPouch.java @@ -31,7 +31,7 @@ public ItemPouch(Settings settings) { @Override public TypedActionResult use(World world, PlayerEntity user, Hand hand) { final UUID uuid = user.getUuid(); - if (!world.isClient()) return TypedActionResult.fail(user.getStackInHand(hand)); + if (world.isClient()) return TypedActionResult.fail(user.getStackInHand(hand)); ConquestInstance instance = TaleOfKingdoms.getAPI().getConquestInstanceStorage().mostRecentInstance().get(); final GuildPlayer guildPlayer = instance.getPlayer(user); ItemStack itemStack = user.getStackInHand(hand); diff --git a/src/main/java/com/convallyria/taleofkingdoms/server/packet/incoming/IncomingBankerInteractPacketHandler.java b/src/main/java/com/convallyria/taleofkingdoms/server/packet/incoming/IncomingBankerInteractPacketHandler.java index e63f0449..20210bba 100644 --- a/src/main/java/com/convallyria/taleofkingdoms/server/packet/incoming/IncomingBankerInteractPacketHandler.java +++ b/src/main/java/com/convallyria/taleofkingdoms/server/packet/incoming/IncomingBankerInteractPacketHandler.java @@ -26,7 +26,7 @@ public IncomingBankerInteractPacketHandler() { @Override public void handleIncomingPacket(PacketContext context, PacketByteBuf attachedData) { - ServerPlayerEntity player = (ServerPlayerEntity) context; + ServerPlayerEntity player = (ServerPlayerEntity) context.player(); UUID uuid = player.getUuid(); BankerMethod method = attachedData.readEnumConstant(BankerMethod.class); int coins = attachedData.readInt();