From f18eeb7d678b775cd8c8614ff6010c1f4d2e3266 Mon Sep 17 00:00:00 2001 From: duckietm Date: Mon, 13 Apr 2026 08:31:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20Fix=20idle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Emulator/pom.xml | 6 +++--- .../habbo/habbohotel/rooms/RoomUnitManager.java | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Emulator/pom.xml b/Emulator/pom.xml index 12411054..7d0c83b5 100644 --- a/Emulator/pom.xml +++ b/Emulator/pom.xml @@ -10,8 +10,8 @@ UTF-8 - 21 - 21 + 25 + 25 @@ -19,7 +19,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.15.0 19 19 diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnitManager.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnitManager.java index e18b3823..df7fae6b 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnitManager.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnitManager.java @@ -12,11 +12,11 @@ import com.eu.habbo.habbohotel.users.DanceType; import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.habbohotel.users.HabboGender; import com.eu.habbo.habbohotel.users.HabboItem; +import com.eu.habbo.habbohotel.wired.WiredUserActionType; import com.eu.habbo.habbohotel.wired.core.WiredFreezeUtil; import com.eu.habbo.habbohotel.wired.core.WiredManager; import com.eu.habbo.habbohotel.wired.core.WiredMoveCarryHelper; import com.eu.habbo.habbohotel.wired.core.WiredUserMovementHelper; -import com.eu.habbo.habbohotel.wired.WiredUserActionType; import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorMessagesComposer; import com.eu.habbo.messages.outgoing.inventory.AddPetComposer; import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer; @@ -1262,9 +1262,14 @@ public class RoomUnitManager { if (habbo == null || habbo.getRoomUnit() == null) { return; } + + boolean wasIdle = habbo.getRoomUnit().isIdle(); habbo.getRoomUnit().resetIdleTimer(); - this.room.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); - WiredManager.triggerUserUnidles(this.room, habbo.getRoomUnit()); + + if (wasIdle) { + this.room.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); + WiredManager.triggerUserUnidles(this.room, habbo.getRoomUnit()); + } } /** @@ -1446,11 +1451,6 @@ public class RoomUnitManager { } } - // ==================== DISPOSAL ==================== - - /** - * Disposes the unit manager. - */ public void dispose() { this.currentHabbos.clear(); this.currentBots.clear();