mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'code-readability' into 'ms4/dev'
Fix build See merge request morningstar/Arcturus-Community!31
This commit is contained in:
commit
8ba06449ff
@ -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;
|
||||||
|
}
|
@ -8,6 +8,7 @@ import com.eu.habbo.messages.outgoing.users.NavigatorSettingsComposer;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ForwardToSomeRoomEvent extends MessageHandler {
|
public class ForwardToSomeRoomEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -15,7 +16,7 @@ public class ForwardToSomeRoomEvent extends MessageHandler {
|
|||||||
String data = this.packet.readString();
|
String data = this.packet.readString();
|
||||||
|
|
||||||
if (data.equals("random_friending_room")) {
|
if (data.equals("random_friending_room")) {
|
||||||
ArrayList<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms();
|
List<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms();
|
||||||
if (!rooms.isEmpty()) {
|
if (!rooms.isEmpty()) {
|
||||||
Collections.shuffle(rooms);
|
Collections.shuffle(rooms);
|
||||||
this.client.sendResponse(new RoomForwardMessageComposer(rooms.get(0).getId()));
|
this.client.sendResponse(new RoomForwardMessageComposer(rooms.get(0).getId()));
|
||||||
|
@ -32,7 +32,7 @@ public class ModeratorUserInfoComposer extends MessageComposer {
|
|||||||
try {
|
try {
|
||||||
int totalBans = 0;
|
int totalBans = 0;
|
||||||
|
|
||||||
totalBans = getTotalBansFromDB(totalBans);
|
totalBans = getTotalBansFromDB();
|
||||||
|
|
||||||
this.response.appendInt(this.set.getInt(DatabaseConstants.USER_ID));
|
this.response.appendInt(this.set.getInt(DatabaseConstants.USER_ID));
|
||||||
this.response.appendString(this.set.getString("username"));
|
this.response.appendString(this.set.getString("username"));
|
||||||
|
Loading…
Reference in New Issue
Block a user