Merge branch 'feature/remove-redundant-exceptions' into 'ms4/dev'

Feature/remove redundant exceptions

See merge request morningstar/Arcturus-Community!25
This commit is contained in:
John 2023-01-10 14:36:39 +00:00
commit b7794d239a
530 changed files with 558 additions and 563 deletions

View File

@ -24,7 +24,7 @@ public class TextsManager {
}
}
public void reload() throws Exception {
public void reload() {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts")) {
while (set.next()) {
if (this.texts.containsKey(set.getString("key"))) {

View File

@ -14,7 +14,7 @@ public class ConsoleInfoCommand extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
int seconds = Emulator.getIntUnixTimestamp() - Emulator.getTimeStarted();
int day = (int) TimeUnit.SECONDS.toDays(seconds);
long hours = TimeUnit.SECONDS.toHours(seconds) - (day * 24);

View File

@ -11,7 +11,7 @@ public class ConsoleReconnectCameraCommand extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
log.info("Connecting to the camera...");
CameraClient.attemptReconnect = true;
}

View File

@ -13,7 +13,7 @@ public class ConsoleTestCommand extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
if (Emulator.debugging) {
log.info("This is a test command for live debugging.");

View File

@ -11,7 +11,7 @@ public class ShowInteractionsCommand extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
for (String interaction : Emulator.getGameEnvironment().getItemManager().getInteractionList()) {
log.info(interaction);
}

View File

@ -11,7 +11,7 @@ public class ShowRCONCommands extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
for (String command : Emulator.getRconServer().getCommands()) {
log.info(command);
}

View File

@ -11,7 +11,7 @@ public class ThankyouArcturusCommand extends ConsoleCommand {
}
@Override
public void handle(String[] args) throws Exception {
public void handle(String[] args) {
log.info("Arcturus Morningstar is an opensource community fork of Arcturus Emulator by TheGeneral");
log.info("Thankyou to the following people who have helped with it's development:");
log.info("TheGeneral - For Creating Arcturus.");

View File

@ -9,7 +9,7 @@ public class ArcturusCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
gameClient.getHabbo().whisper("This hotel is powered by Arcturus Emulator! \r" +
"Cet hôtel est alimenté par Arcturus émulateur! \r" +

View File

@ -21,7 +21,7 @@ public class BadgeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.forgot_username"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -15,7 +15,7 @@ public class BanCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_ban.forgot_user"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -10,7 +10,7 @@ public class BlockAlertCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
gameClient.getHabbo().getHabboStats().setBlockStaffAlerts(!gameClient.getHabbo().getHabboStats().isBlockStaffAlerts());
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_blockalert").replace("%state%", (gameClient.getHabbo().getHabboStats().isBlockStaffAlerts() ? Emulator.getTexts().getValue("generic.on") : Emulator.getTexts().getValue("generic.off"))), RoomChatMessageBubbles.ALERT);

View File

@ -10,7 +10,7 @@ public class BotsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null || !gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo()))
return false;

View File

@ -17,7 +17,7 @@ public class CalendarCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (Emulator.getConfig().getBoolean("hotel.calendar.enabled")) {
String campaignName = Emulator.getConfig().getValue("hotel.calendar.default");

View File

@ -11,7 +11,7 @@ public class ChangeNameCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
// check if there are no params
if (params.length < 2) {

View File

@ -12,7 +12,7 @@ public class ChatTypeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 2) {
int chatColor;

View File

@ -11,7 +11,7 @@ public class CommandsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
StringBuilder message = new StringBuilder(Emulator.getTexts().getValue("commands.generic.cmd_commands.text"));
List<Command> commands = Emulator.getGameEnvironment().getCommandHandler().getCommandsForRank(gameClient.getHabbo().getHabboInfo().getRank().getId());
message.append("(").append(commands.size()).append("):\r\n");

View File

@ -9,7 +9,7 @@ public class ConnectCameraCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
return false;
}
}

View File

@ -11,7 +11,7 @@ public class ControlCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (params.length == 2) {
Habbo target = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -12,7 +12,7 @@ public class CoordsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getRoomUnit() == null || gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
return false;

View File

@ -13,7 +13,7 @@ public class CreditsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 3) {
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);

View File

@ -10,7 +10,7 @@ public class DiagonalCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) {
gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally(!gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally());

View File

@ -11,7 +11,7 @@ public class DisconnectCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_disconnect.forgot_username"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -11,7 +11,7 @@ public class EjectAllCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {

View File

@ -16,7 +16,7 @@ public class EmptyBotsInventoryCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1 || (params.length >= 2 && !params[1].equals(Emulator.getTexts().getValue("generic.yes")))) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {

View File

@ -18,7 +18,7 @@ public class EmptyInventoryCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1 || (params.length == 2 && !params[1].equals(Emulator.getTexts().getValue("generic.yes")))) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {

View File

@ -16,7 +16,7 @@ public class EmptyPetsInventoryCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1 || (params.length >= 2 && !params[1].equals(Emulator.getTexts().getValue("generic.yes")))) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {

View File

@ -14,7 +14,7 @@ public class EnableCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 2) {
int effectId;
try {

View File

@ -15,7 +15,7 @@ public class EventCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (params.length >= 2) {
StringBuilder message = new StringBuilder();

View File

@ -12,7 +12,7 @@ public class FacelessCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
try {

View File

@ -10,7 +10,7 @@ public class FastwalkCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getRiding() != null) //TODO Make this an event plugin which fires that can be cancelled

View File

@ -18,7 +18,7 @@ public class FilterWordCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_filterword.missing_word"));
return true;

View File

@ -11,7 +11,7 @@ public class FreezeBotsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getId() == gameClient.getHabbo().getHabboInfo().getCurrentRoom().getOwnerId() || gameClient.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
gameClient.getHabbo().getHabboInfo().getCurrentRoom().setAllowBotsWalk(!gameClient.getHabbo().getHabboInfo().getCurrentRoom().isAllowBotsWalk());

View File

@ -11,7 +11,7 @@ public class FreezeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -19,7 +19,7 @@ public class GiftCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 3) {
String username = params[1];
int itemId;

View File

@ -8,7 +8,7 @@ public class HabnamCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboStats().hasActiveClub()) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
gameClient.getHabbo().getHabboInfo().getCurrentRoom().giveEffect(gameClient.getHabbo(), 140, 30);

View File

@ -10,7 +10,7 @@ public class HandItemCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
try {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {

View File

@ -14,7 +14,7 @@ public class HappyHourCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new HabboBroadcastMessageComposer("Happy Hour!"));
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {

View File

@ -10,7 +10,7 @@ public class HideWiredCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {

View File

@ -10,7 +10,7 @@ public class HotelAlertLinkCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 3) {
return true;
}

View File

@ -16,7 +16,7 @@ public class IPBanCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
HabboInfo habbo;
StringBuilder reason = new StringBuilder();
if (params.length >= 2) {

View File

@ -17,7 +17,7 @@ public class InvisibleCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
RoomUnit roomUnit = gameClient.getHabbo().getRoomUnit();
if (roomUnit.isInvisible()) {

View File

@ -13,7 +13,7 @@ public class LayCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getRoomUnit() == null || !gameClient.getHabbo().getRoomUnit().canForcePosture())
return true;

View File

@ -14,7 +14,7 @@ public class MachineBanCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
HabboInfo habbo = null;
StringBuilder reason = new StringBuilder();
if (params.length >= 2) {

View File

@ -20,7 +20,7 @@ public class MassBadgeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
String badge;

View File

@ -14,7 +14,7 @@ public class MassCreditsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
int amount;

View File

@ -20,7 +20,7 @@ public class MassGiftCommand extends Command {
}
@Override
public boolean handle(final GameClient gameClient, String[] params) throws Exception {
public boolean handle(final GameClient gameClient, String[] params) {
if (params.length >= 2) {
int itemId;

View File

@ -13,7 +13,7 @@ public class MassPixelsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
int amount;

View File

@ -13,7 +13,7 @@ public class MassPointsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int type = Emulator.getConfig().getInt("seasonal.primary.type");
String amountString;
if (params.length == 3) {

View File

@ -17,7 +17,7 @@ public class MimicCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -9,7 +9,7 @@ public class MoonwalkCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboStats().hasActiveClub()) {
int effect = 136;
if (gameClient.getHabbo().getRoomUnit().getEffectId() == 136)

View File

@ -10,7 +10,7 @@ public class MultiCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
gameClient.sendResponse(new RequestSpamWallPostItMessageComposer(null));
return true;
}

View File

@ -10,7 +10,7 @@ public class MuteBotsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
gameClient.getHabbo().getHabboStats().setIgnoreBots(!gameClient.getHabbo().getHabboStats().isIgnoreBots());
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mute_bots." + (gameClient.getHabbo().getHabboStats().isIgnoreBots() ? "ignored" : "unignored")), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -12,7 +12,7 @@ public class MuteCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_mute.not_specified"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -10,7 +10,7 @@ public class MutePetsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
gameClient.getHabbo().getHabboStats().setIgnorePets(!gameClient.getHabbo().getHabboStats().isIgnorePets());
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mute_pets." + (gameClient.getHabbo().getHabboStats().isIgnorePets() ? "ignored" : "unignored")), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -11,7 +11,7 @@ public class PetInfoCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length > 1) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
return false;

View File

@ -10,7 +10,7 @@ public class PickallCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {

View File

@ -11,7 +11,7 @@ public class PixelCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 3) {
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);

View File

@ -13,7 +13,7 @@ public class PluginsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
StringBuilder message = new StringBuilder("Plugins (" + Emulator.getPluginManager().getPlugins().size() + ")\r");
for (HabboPlugin plugin : Emulator.getPluginManager().getPlugins()) {

View File

@ -11,7 +11,7 @@ public class PointsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 3) {
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);

View File

@ -18,7 +18,7 @@ public class PromoteTargetOfferCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length <= 1) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_promote_offer.not_found"));
return true;

View File

@ -15,7 +15,7 @@ public class PullCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length != 2) return true;
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -15,7 +15,7 @@ public class PushCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length != 2) return true;
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -18,7 +18,7 @@ public class RedeemCommand extends Command {
}
@Override
public boolean handle(final GameClient gameClient, String[] params) throws Exception {
public boolean handle(final GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getActiveTradeForHabbo(gameClient.getHabbo()) != null)
return false;
ArrayList<HabboItem> items = new ArrayList<>();

View File

@ -16,7 +16,7 @@ public class ReloadRoomCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Emulator.getThreading().run(() -> {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {

View File

@ -12,7 +12,7 @@ public class RoomAlertCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
StringBuilder message = new StringBuilder();
if (params.length >= 2) {

View File

@ -18,7 +18,7 @@ public class RoomBadgeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient == null)
return true;

View File

@ -19,7 +19,7 @@ public class RoomBundleCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int parentId;
int credits;
int points;

View File

@ -11,7 +11,7 @@ public class RoomCreditsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
int amount;

View File

@ -13,7 +13,7 @@ public class RoomDanceCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
int danceId;

View File

@ -12,7 +12,7 @@ public class RoomEffectCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_roomeffect.no_effect"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -15,7 +15,7 @@ public class RoomGiftCommand extends Command {
}
@Override
public boolean handle(final GameClient gameClient, String[] params) throws Exception {
public boolean handle(final GameClient gameClient, String[] params) {
if (params.length >= 2) {
int itemId;

View File

@ -12,7 +12,7 @@ public class RoomItemCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int itemId = 0;
if (params.length >= 2) {

View File

@ -13,7 +13,7 @@ public class RoomKickCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {
if (params.length > 1) {

View File

@ -11,7 +11,7 @@ public class RoomMuteCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) {

View File

@ -11,7 +11,7 @@ public class RoomPixelsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
int amount;

View File

@ -11,7 +11,7 @@ public class RoomPointsCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int type = Emulator.getConfig().getInt("seasonal.primary.type");
String amountString;
if (params.length == 3) {

View File

@ -11,7 +11,7 @@ public class SayAllCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say_all.forgot_message"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -13,7 +13,7 @@ public class SayCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say.forgot_username"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -10,7 +10,7 @@ public class SetMaxCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 2) {
int max;
try {

View File

@ -10,7 +10,7 @@ public class SetPollCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 2) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
int pollId = -1;

View File

@ -11,7 +11,7 @@ public class SetSpeedCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) {
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();

View File

@ -11,7 +11,7 @@ public class ShoutAllCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout_all.forgot_message"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -14,7 +14,7 @@ public class ShoutCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length < 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout.forgot_username"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -14,7 +14,7 @@ public class ShutdownCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
StringBuilder reason = new StringBuilder("-");
int minutes = 0;
if (params.length > 2) {

View File

@ -9,7 +9,7 @@ public class SitCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo());
return true;

View File

@ -11,7 +11,7 @@ public class SitDownCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
for (Habbo habbo : gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbos()) {
if (habbo.getRoomUnit().isWalking()) {
habbo.getRoomUnit().stopWalking();

View File

@ -13,7 +13,7 @@ public class SoftKickCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length != 2) return true;
final Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -12,7 +12,7 @@ public class StaffAlertCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length > 1) {
StringBuilder message = new StringBuilder();
for (int i = 1; i < params.length; i++) {

View File

@ -15,7 +15,7 @@ public class StaffOnlineCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int minRank = Emulator.getConfig().getInt("commands.cmd_staffonline.min_rank");
if (params.length >= 2) {

View File

@ -12,7 +12,7 @@ public class StalkCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
return true;

View File

@ -10,7 +10,7 @@ public class StandCommand extends Command {
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeStand(gameClient.getHabbo());
return true;

View File

@ -34,10 +34,9 @@ public class SubscriptionCommand extends Command {
* @param gameClient Client that executed the command
* @param params Command parameters
* @return Boolean indicating success
* @throws Exception Exception
*/
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length >= 4) {
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);

View File

@ -13,7 +13,7 @@ public class SummonCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
return true;

View File

@ -15,7 +15,7 @@ public class SummonRankCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
int minRank;
if (params.length >= 2) {

View File

@ -15,7 +15,7 @@ public class SuperPullCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);

View File

@ -14,7 +14,7 @@ public class SuperbanCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
HabboInfo habbo = null;
StringBuilder reason = new StringBuilder();
if (params.length >= 2) {

View File

@ -17,7 +17,7 @@ public class TakeBadgeCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 2) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_take_badge.forgot_badge"), RoomChatMessageBubbles.ALERT);
return true;

View File

@ -10,7 +10,7 @@ public class TeleportCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled
if (gameClient.getHabbo().getRoomUnit().cmdTeleport) {
gameClient.getHabbo().getRoomUnit().cmdTeleport = false;

View File

@ -11,7 +11,7 @@ public class TestCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (gameClient.getHabbo() != null || !gameClient.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL) || !Emulator.debugging)
return false;

View File

@ -18,7 +18,7 @@ public class TransformCommand extends Command {
}
@Override
public boolean handle(GameClient gameClient, String[] params) throws Exception {
public boolean handle(GameClient gameClient, String[] params) {
if (params.length == 1) {
StringBuilder petNames = new StringBuilder();
petNames.append(Emulator.getTexts().getValue("commands.generic.cmd_transform.title"));

Some files were not shown because too many files have changed in this diff Show More