From a08f1d1b8a55abd936ec1f3930e28c9262376c2d Mon Sep 17 00:00:00 2001 From: brenoepics <59066707+brenoepics@users.noreply.github.com> Date: Fri, 4 Mar 2022 21:40:13 -0300 Subject: [PATCH] Update RoomPickupItemEvent.java --- .../messages/incoming/rooms/items/RoomPickupItemEvent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPickupItemEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPickupItemEvent.java index fe4ab2c9..c3585ecb 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPickupItemEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPickupItemEvent.java @@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler; public class RoomPickupItemEvent extends MessageHandler { @Override public void handle() throws Exception { - int unknown = this.packet.readInt(); + int category = this.packet.readInt(); //10 = floorItem and 20 = wallItem int itemId = this.packet.readInt(); Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); @@ -31,6 +31,8 @@ public class RoomPickupItemEvent extends MessageHandler { if (room.hasRights(this.client.getHabbo())) { if (this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) { item.setUserId(this.client.getHabbo().getHabboInfo().getId()); + } else if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && item.getUserId() == room.getOwnerId()) { + return; } room.ejectUserItem(item);