mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-06-28 11:45:33 +02:00
34 lines
973 B
Java
34 lines
973 B
Java
package com.eu.habbo.habbohotel.navigation;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.Room;
|
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
public class NavigatorPublicCategory {
|
|
public final int id;
|
|
public final String name;
|
|
public final List<Room> rooms;
|
|
public final ListMode image;
|
|
public final int order;
|
|
|
|
public NavigatorPublicCategory(ResultSet set) throws SQLException {
|
|
this.id = set.getInt("id");
|
|
this.name = set.getString("name");
|
|
this.image = set.getString("image").equals("1") ? ListMode.THUMBNAILS : ListMode.LIST;
|
|
this.order = set.getInt("order_num");
|
|
this.rooms = new ArrayList<>();
|
|
}
|
|
|
|
public void addRoom(Room room) {
|
|
room.preventUncaching = true;
|
|
this.rooms.add(room);
|
|
}
|
|
|
|
public void removeRoom(Room room) {
|
|
this.rooms.remove(room);
|
|
room.preventUncaching = room.isPublicRoom();
|
|
}
|
|
} |