mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
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:
commit
b7794d239a
@ -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"))) {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.");
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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.");
|
||||
|
@ -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" +
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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]);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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()) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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()) {
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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]);
|
||||
|
@ -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<>();
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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++) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user