Skip to content

Commit

Permalink
Fix banker packet error
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Mar 26, 2023
1 parent cf74a6e commit 4b16948
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ItemPouch(Settings settings) {
@Override
public TypedActionResult<ItemStack> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4b16948

Please sign in to comment.