mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Update RoomPickupItemEvent.java
This commit is contained in:
parent
d1344c0610
commit
a08f1d1b8a
@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
|||||||
public class RoomPickupItemEvent extends MessageHandler {
|
public class RoomPickupItemEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
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();
|
int itemId = this.packet.readInt();
|
||||||
|
|
||||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
@ -31,6 +31,8 @@ public class RoomPickupItemEvent extends MessageHandler {
|
|||||||
if (room.hasRights(this.client.getHabbo())) {
|
if (room.hasRights(this.client.getHabbo())) {
|
||||||
if (this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
if (this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
||||||
item.setUserId(this.client.getHabbo().getHabboInfo().getId());
|
item.setUserId(this.client.getHabbo().getHabboInfo().getId());
|
||||||
|
} else if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && item.getUserId() == room.getOwnerId()) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
room.ejectUserItem(item);
|
room.ejectUserItem(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user