From cb3486418d33a2d5f2189ccdd8b05d859564346d Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Sat, 30 Apr 2022 02:06:45 -0300 Subject: [PATCH] replace to math min --- src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java index f699715d..fd8f1fe5 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java @@ -1289,7 +1289,7 @@ public class RoomManager { Collections.sort(rooms); - return rooms.subList(0, (rooms.size() > limit ? limit : rooms.size())); + return rooms.subList(0, (Math.min(rooms.size(), limit))); } public ArrayList getRoomsWithRights(Habbo habbo) {