From ba5a0976e314b1ecda7baea4dcf22ddc6e511e3c Mon Sep 17 00:00:00 2001 From: Thijmen Date: Wed, 1 Sep 2021 22:43:04 +0000 Subject: [PATCH] Tile error, possible scripting --- .../incoming/rooms/items/RoomPlaceItemEvent.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPlaceItemEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPlaceItemEvent.java index bf3842ce..8cdeb7d0 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPlaceItemEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/RoomPlaceItemEvent.java @@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.rooms.items; import com.eu.habbo.habbohotel.items.FurnitureType; import com.eu.habbo.habbohotel.items.interactions.*; +import com.eu.habbo.habbohotel.modtool.ScripterManager; import com.eu.habbo.habbohotel.rooms.FurnitureMovementError; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.RoomLayout; @@ -78,6 +79,15 @@ public class RoomPlaceItemEvent extends MessageHandler { } RoomTile tile = room.getLayout().getTile(x, y); + + if(tile == null) + { + String userName = this.client.getHabbo().getHabboInfo().getUsername(); + int roomId = room.getId(); + ScripterManager.scripterDetected(this.client, "User [" + userName + "] tried to place a furni with itemId [" + itemId + "] at a tile which is not existing in room [" + roomId + "], tile: [" + x + "," + y + "]"); + return; + } + FurnitureMovementError error = room.canPlaceFurnitureAt(item, this.client.getHabbo(), tile, rotation); if (!error.equals(FurnitureMovementError.NONE)) {