Merge branch 'code-readability' into 'ms4/dev'

Fix build

See merge request morningstar/Arcturus-Community!31
This commit is contained in:
brenoepic 2023-01-12 08:39:03 +00:00
commit 8ba06449ff
3 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,7 @@
package com.eu.habbo.database;
public class DatabaseConstants {
public static final String CAUGHT_SQL_EXCEPTION = "Caught SQL exception";
public final static String USER_ID = DatabaseConstants.USER_ID;
}

View File

@ -8,6 +8,7 @@ import com.eu.habbo.messages.outgoing.users.NavigatorSettingsComposer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ForwardToSomeRoomEvent extends MessageHandler {
@Override
@ -15,7 +16,7 @@ public class ForwardToSomeRoomEvent extends MessageHandler {
String data = this.packet.readString();
if (data.equals("random_friending_room")) {
ArrayList<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms();
List<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms();
if (!rooms.isEmpty()) {
Collections.shuffle(rooms);
this.client.sendResponse(new RoomForwardMessageComposer(rooms.get(0).getId()));

View File

@ -32,7 +32,7 @@ public class ModeratorUserInfoComposer extends MessageComposer {
try {
int totalBans = 0;
totalBans = getTotalBansFromDB(totalBans);
totalBans = getTotalBansFromDB();
this.response.appendInt(this.set.getInt(DatabaseConstants.USER_ID));
this.response.appendString(this.set.getString("username"));