From 631dbe9d38740da7f861e56a2853269bf8b8def5 Mon Sep 17 00:00:00 2001 From: ArpyAge Date: Fri, 15 Apr 2022 01:08:23 +0200 Subject: [PATCH] Changed order or operations so Buildheight event can override max/min height of tiles --- src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index 1dc2ac38..c408c069 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -4732,6 +4732,9 @@ public class Room implements Comparable, ISerialize, Runnable { } } + if(height > MAXIMUM_FURNI_HEIGHT) return FurnitureMovementError.CANT_STACK; + if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) return FurnitureMovementError.CANT_STACK; //prevent furni going under the floor + if (Emulator.getPluginManager().isRegistered(FurnitureBuildheightEvent.class, true)) { FurnitureBuildheightEvent event = Emulator.getPluginManager().fireEvent(new FurnitureBuildheightEvent(item, actor, 0.00, height)); if (event.hasChangedHeight()) { @@ -4739,9 +4742,6 @@ public class Room implements Comparable, ISerialize, Runnable { } } - if(height > MAXIMUM_FURNI_HEIGHT) return FurnitureMovementError.CANT_STACK; - if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) return FurnitureMovementError.CANT_STACK; //prevent furni going under the floor - item.setX(tile.x); item.setY(tile.y); item.setZ(height);