mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Merge branch 'dev' of https://git.krews.org/morningstar/Arcturus-Community into dev
This commit is contained in:
commit
3ffd1ea10a
@ -8,6 +8,7 @@ import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUnitOnRollerComposer;
|
||||
import com.eu.habbo.plugin.events.users.UserIdleEvent;
|
||||
|
||||
public class RoomUserWalkEvent extends MessageHandler {
|
||||
@Override
|
||||
@ -49,6 +50,18 @@ public class RoomUserWalkEvent extends MessageHandler {
|
||||
if (habbo.getHabboInfo().getCurrentRoom() == null || habbo.getHabboInfo().getCurrentRoom().getLayout() == null)
|
||||
return;
|
||||
|
||||
if (roomUnit.isIdle()) {
|
||||
UserIdleEvent event = new UserIdleEvent(habbo, UserIdleEvent.IdleReason.WALKED, false);
|
||||
Emulator.getPluginManager().fireEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
if (!event.idle) {
|
||||
roomUnit.getRoom().unIdle(habbo);
|
||||
roomUnit.resetIdleTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RoomTile tile = habbo.getHabboInfo().getCurrentRoom().getLayout().getTile((short) x, (short) y);
|
||||
|
||||
if (tile == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user