mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Feature/remove redundant exceptions
This commit is contained in:
parent
9ee1997c50
commit
c3e00b927d
@ -12,8 +12,8 @@ import com.eu.habbo.plugin.events.users.UserSavedMottoEvent;
|
|||||||
public class Easter {
|
public class Easter {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public static void onUserChangeMotto(UserSavedMottoEvent event) {
|
public static void onUserChangeMotto(UserSavedMottoEvent event) {
|
||||||
if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.newMotto.equalsIgnoreCase("crickey!")) {
|
if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.getNewMotto().equalsIgnoreCase("crickey!")) {
|
||||||
event.habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT)));
|
event.habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.getNewMotto(), event.habbo, event.habbo, RoomChatMessageBubbles.ALERT)));
|
||||||
|
|
||||||
Room room = event.habbo.getHabboInfo().getCurrentRoom();
|
Room room = event.habbo.getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
|
@ -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")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts")) {
|
||||||
while (set.next()) {
|
while (set.next()) {
|
||||||
if (this.texts.containsKey(set.getString("key"))) {
|
if (this.texts.containsKey(set.getString("key"))) {
|
||||||
|
@ -14,7 +14,7 @@ public class ConsoleInfoCommand extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(String[] args) throws Exception {
|
public void handle(String[] args) {
|
||||||
int seconds = Emulator.getIntUnixTimestamp() - Emulator.getTimeStarted();
|
int seconds = Emulator.getIntUnixTimestamp() - Emulator.getTimeStarted();
|
||||||
int day = (int) TimeUnit.SECONDS.toDays(seconds);
|
int day = (int) TimeUnit.SECONDS.toDays(seconds);
|
||||||
long hours = TimeUnit.SECONDS.toHours(seconds) - (day * 24);
|
long hours = TimeUnit.SECONDS.toHours(seconds) - (day * 24);
|
||||||
|
@ -11,7 +11,7 @@ public class ConsoleReconnectCameraCommand extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(String[] args) throws Exception {
|
public void handle(String[] args) {
|
||||||
log.info("Connecting to the camera...");
|
log.info("Connecting to the camera...");
|
||||||
CameraClient.attemptReconnect = true;
|
CameraClient.attemptReconnect = true;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ public class ConsoleTestCommand extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(String[] args) throws Exception {
|
public void handle(String[] args) {
|
||||||
if (Emulator.debugging) {
|
if (Emulator.debugging) {
|
||||||
log.info("This is a test command for live debugging.");
|
log.info("This is a test command for live debugging.");
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ public class ShowInteractionsCommand extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(String[] args) throws Exception {
|
public void handle(String[] args) {
|
||||||
for (String interaction : Emulator.getGameEnvironment().getItemManager().getInteractionList()) {
|
for (String interaction : Emulator.getGameEnvironment().getItemManager().getInteractionList()) {
|
||||||
log.info(interaction);
|
log.info(interaction);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ public class ShowRCONCommands extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(String[] args) throws Exception {
|
public void handle(String[] args) {
|
||||||
for (String command : Emulator.getRconServer().getCommands()) {
|
for (String command : Emulator.getRconServer().getCommands()) {
|
||||||
log.info(command);
|
log.info(command);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ public class ThankyouArcturusCommand extends ConsoleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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("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("Thankyou to the following people who have helped with it's development:");
|
||||||
log.info("TheGeneral - For Creating Arcturus.");
|
log.info("TheGeneral - For Creating Arcturus.");
|
||||||
|
@ -215,7 +215,7 @@ public class Bot implements Runnable {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
||||||
this.room.botChat(new ChatMessageComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose());
|
this.room.botChat(new ChatMessageComposer(new RoomChatMessage(event.getMessage(), this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose());
|
||||||
|
|
||||||
if (message.equals("o/") || message.equals("_o/")) {
|
if (message.equals("o/") || message.equals("_o/")) {
|
||||||
this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose());
|
this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose());
|
||||||
@ -230,7 +230,7 @@ public class Bot implements Runnable {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
||||||
this.room.botChat(new ShoutMessageComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose());
|
this.room.botChat(new ShoutMessageComposer(new RoomChatMessage(event.getMessage(), this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose());
|
||||||
|
|
||||||
if (message.equals("o/") || message.equals("_o/")) {
|
if (message.equals("o/") || message.equals("_o/")) {
|
||||||
this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose());
|
this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose());
|
||||||
@ -245,7 +245,7 @@ public class Bot implements Runnable {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
this.chatTimestamp = Emulator.getIntUnixTimestamp();
|
||||||
event.target.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))));
|
event.getTarget().getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.getMessage(), this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,19 +85,19 @@ public class ButlerBot extends Bot {
|
|||||||
final Bot bot = this;
|
final Bot bot = this;
|
||||||
|
|
||||||
// Step 1: Look at Habbo
|
// Step 1: Look at Habbo
|
||||||
bot.lookAt(serveEvent.habbo);
|
bot.lookAt(serveEvent.getHabbo());
|
||||||
|
|
||||||
// Step 2: Prepare tasks for when the Bot (carrying the handitem) reaches the Habbo
|
// Step 2: Prepare tasks for when the Bot (carrying the handitem) reaches the Habbo
|
||||||
final List<Runnable> tasks = new ArrayList<>();
|
final List<Runnable> tasks = new ArrayList<>();
|
||||||
tasks.add(new RoomUnitGiveHanditem(serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId));
|
tasks.add(new RoomUnitGiveHanditem(serveEvent.getHabbo().getRoomUnit(), serveEvent.getHabbo().getHabboInfo().getCurrentRoom(), serveEvent.getItemId()));
|
||||||
tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0));
|
tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.getHabbo().getHabboInfo().getCurrentRoom(), 0));
|
||||||
|
|
||||||
tasks.add(() -> {
|
tasks.add(() -> {
|
||||||
if (this.getRoom() != null) {
|
if (this.getRoom() != null) {
|
||||||
String botMessage = Emulator.getTexts()
|
String botMessage = Emulator.getTexts()
|
||||||
.getValue("bots.butler.given")
|
.getValue("bots.butler.given")
|
||||||
.replace("%key%", key)
|
.replace("%key%", key)
|
||||||
.replace("%username%", serveEvent.habbo.getHabboInfo().getUsername());
|
.replace("%username%", serveEvent.getHabbo().getHabboInfo().getUsername());
|
||||||
|
|
||||||
if (!WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, this.getRoomUnit(), this.getRoom(), new Object[]{botMessage})) {
|
if (!WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, this.getRoomUnit(), this.getRoom(), new Object[]{botMessage})) {
|
||||||
bot.talk(botMessage);
|
bot.talk(botMessage);
|
||||||
@ -115,18 +115,18 @@ public class ButlerBot extends Bot {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Give bot the handitem that it's going to give the Habbo
|
// Give bot the handitem that it's going to give the Habbo
|
||||||
Emulator.getThreading().run(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId));
|
Emulator.getThreading().run(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.getHabbo().getHabboInfo().getCurrentRoom(), serveEvent.getItemId()));
|
||||||
|
|
||||||
if (distanceBetweenBotAndHabbo > Emulator.getConfig().getInt("hotel.bot.butler.reachdistance", 3)) {
|
if (distanceBetweenBotAndHabbo > Emulator.getConfig().getInt("hotel.bot.butler.reachdistance", 3)) {
|
||||||
Emulator.getThreading().run(new RoomUnitWalkToRoomUnit(this.getRoomUnit(), serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), tasks, failedReached, Emulator.getConfig().getInt("hotel.bot.butler.reachdistance", 3)));
|
Emulator.getThreading().run(new RoomUnitWalkToRoomUnit(this.getRoomUnit(), serveEvent.getHabbo().getRoomUnit(), serveEvent.getHabbo().getHabboInfo().getCurrentRoom(), tasks, failedReached, Emulator.getConfig().getInt("hotel.bot.butler.reachdistance", 3)));
|
||||||
} else {
|
} else {
|
||||||
Emulator.getThreading().run(failedReached.get(0), 1000);
|
Emulator.getThreading().run(failedReached.get(0), 1000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getRoom() != null) {
|
if (this.getRoom() != null) {
|
||||||
this.getRoom().giveHandItem(serveEvent.habbo, serveEvent.itemId);
|
this.getRoom().giveHandItem(serveEvent.getHabbo(), serveEvent.getItemId());
|
||||||
|
|
||||||
String msg = Emulator.getTexts().getValue("bots.butler.given").replace("%key%", keyword).replace("%username%", serveEvent.habbo.getHabboInfo().getUsername());
|
String msg = Emulator.getTexts().getValue("bots.butler.given").replace("%key%", keyword).replace("%username%", serveEvent.getHabbo().getHabboInfo().getUsername());
|
||||||
if (!WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, this.getRoomUnit(), this.getRoom(), new Object[]{msg})) {
|
if (!WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, this.getRoomUnit(), this.getRoom(), new Object[]{msg})) {
|
||||||
this.talk(msg);
|
this.talk(msg);
|
||||||
}
|
}
|
||||||
|
@ -1054,16 +1054,16 @@ public class CatalogManager {
|
|||||||
Emulator.getPluginManager().fireEvent(purchasedEvent);
|
Emulator.getPluginManager().fireEvent(purchasedEvent);
|
||||||
|
|
||||||
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||||
if (purchasedEvent.totalCredits > 0) {
|
if (purchasedEvent.getTotalCredits() > 0) {
|
||||||
habbo.getClient().getHabbo().getHabboInfo().addCredits(-purchasedEvent.totalCredits);
|
habbo.getClient().getHabbo().getHabboInfo().addCredits(-purchasedEvent.getTotalCredits());
|
||||||
habbo.getClient().sendResponse(new CreditBalanceComposer(habbo.getClient().getHabbo()));
|
habbo.getClient().sendResponse(new CreditBalanceComposer(habbo.getClient().getHabbo()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS)) {
|
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS)) {
|
||||||
if (purchasedEvent.totalPoints > 0) {
|
if (purchasedEvent.getTotalPoints() > 0) {
|
||||||
habbo.getClient().getHabbo().getHabboInfo().addCurrencyAmount(item.getPointsType(), -purchasedEvent.totalPoints);
|
habbo.getClient().getHabbo().getHabboInfo().addCurrencyAmount(item.getPointsType(), -purchasedEvent.getTotalPoints());
|
||||||
habbo.getClient().sendResponse(new HabboActivityPointNotificationMessageComposer(habbo.getClient().getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType()), -purchasedEvent.totalPoints, item.getPointsType()));
|
habbo.getClient().sendResponse(new HabboActivityPointNotificationMessageComposer(habbo.getClient().getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType()), -purchasedEvent.getTotalPoints(), item.getPointsType()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1080,11 +1080,11 @@ public class CatalogManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!purchasedEvent.badges.isEmpty() && !unseenItems.containsKey(UnseenItemsComposer.AddHabboItemCategory.BADGE)) {
|
if (!purchasedEvent.getBadges().isEmpty() && !unseenItems.containsKey(UnseenItemsComposer.AddHabboItemCategory.BADGE)) {
|
||||||
unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.BADGE, new ArrayList<>());
|
unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.BADGE, new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String b : purchasedEvent.badges) {
|
for (String b : purchasedEvent.getBadges()) {
|
||||||
HabboBadge badge = new HabboBadge(0, b, 0, habbo);
|
HabboBadge badge = new HabboBadge(0, b, 0, habbo);
|
||||||
Emulator.getThreading().run(badge);
|
Emulator.getThreading().run(badge);
|
||||||
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
||||||
@ -1096,11 +1096,11 @@ public class CatalogManager {
|
|||||||
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.getKey(), keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.getKey(), keys));
|
||||||
unseenItems.get(UnseenItemsComposer.AddHabboItemCategory.BADGE).add(badge.getId());
|
unseenItems.get(UnseenItemsComposer.AddHabboItemCategory.BADGE).add(badge.getId());
|
||||||
}
|
}
|
||||||
habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.catalogItem);
|
habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.getCatalogItem());
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new UnseenItemsComposer(unseenItems));
|
habbo.getClient().sendResponse(new UnseenItemsComposer(unseenItems));
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(purchasedEvent.catalogItem));
|
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(purchasedEvent.getCatalogItem()));
|
||||||
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
||||||
|
|
||||||
THashSet<String> itemIds = new THashSet<>();
|
THashSet<String> itemIds = new THashSet<>();
|
||||||
@ -1113,11 +1113,11 @@ public class CatalogManager {
|
|||||||
Emulator.getThreading().run(new CatalogPurchaseLogEntry(
|
Emulator.getThreading().run(new CatalogPurchaseLogEntry(
|
||||||
Emulator.getIntUnixTimestamp(),
|
Emulator.getIntUnixTimestamp(),
|
||||||
purchasedEvent.habbo.getHabboInfo().getId(),
|
purchasedEvent.habbo.getHabboInfo().getId(),
|
||||||
purchasedEvent.catalogItem != null ? purchasedEvent.catalogItem.getId() : 0,
|
purchasedEvent.getCatalogItem() != null ? purchasedEvent.getCatalogItem().getId() : 0,
|
||||||
String.join(";", itemIds),
|
String.join(";", itemIds),
|
||||||
purchasedEvent.catalogItem != null ? purchasedEvent.catalogItem.getName() : "",
|
purchasedEvent.getCatalogItem() != null ? purchasedEvent.getCatalogItem().getName() : "",
|
||||||
purchasedEvent.totalCredits,
|
purchasedEvent.getTotalCredits(),
|
||||||
purchasedEvent.totalPoints,
|
purchasedEvent.getTotalPoints(),
|
||||||
item.getPointsType(),
|
item.getPointsType(),
|
||||||
amount
|
amount
|
||||||
));
|
));
|
||||||
|
@ -346,14 +346,14 @@ public class MarketPlace {
|
|||||||
|
|
||||||
GetMarketplaceOffersEvent.cachedResults.clear();
|
GetMarketplaceOffersEvent.cachedResults.clear();
|
||||||
|
|
||||||
client.sendResponse(new FurniListRemoveComposer(event.item.getGiftAdjustedId()));
|
client.sendResponse(new FurniListRemoveComposer(event.getItem().getGiftAdjustedId()));
|
||||||
client.sendResponse(new FurniListInvalidateComposer());
|
client.sendResponse(new FurniListInvalidateComposer());
|
||||||
|
|
||||||
event.item.setFromGift(false);
|
event.getItem().setFromGift(false);
|
||||||
|
|
||||||
MarketPlaceOffer offer = new MarketPlaceOffer(event.item, event.price, client.getHabbo());
|
MarketPlaceOffer offer = new MarketPlaceOffer(event.getItem(), event.getPrice(), client.getHabbo());
|
||||||
client.getHabbo().getInventory().addMarketplaceOffer(offer);
|
client.getHabbo().getInventory().addMarketplaceOffer(offer);
|
||||||
client.getHabbo().getInventory().getItemsComponent().removeHabboItem(event.item);
|
client.getHabbo().getInventory().getItemsComponent().removeHabboItem(event.getItem());
|
||||||
item.setUserId(-1);
|
item.setUserId(-1);
|
||||||
item.needsUpdate(true);
|
item.needsUpdate(true);
|
||||||
Emulator.getThreading().run(item);
|
Emulator.getThreading().run(item);
|
||||||
|
@ -13,7 +13,7 @@ public class AboutCommand extends Command {
|
|||||||
public AboutCommand() {
|
public AboutCommand() {
|
||||||
super(null, new String[]{"about", "info", "online", "server"});
|
super(null, new String[]{"about", "info", "online", "server"});
|
||||||
}
|
}
|
||||||
public static String credits = "Arcturus Morningstar is an opensource project based on Arcturus By TheGeneral \n" +
|
public static final String credits = "Arcturus Morningstar is an opensource project based on Arcturus By TheGeneral \n" +
|
||||||
"The Following people have all contributed to this emulator:\n" +
|
"The Following people have all contributed to this emulator:\n" +
|
||||||
" TheGeneral\n Beny\n Alejandro\n Capheus\n Skeletor\n Harmonic\n Mike\n Remco\n zGrav \n Quadral \n Harmony\n Swirny\n ArpyAge\n Mikkel\n Rodolfo\n Rasmus\n Kitt Mustang\n Snaiker\n nttzx\n necmi\n Dome\n Jose Flores\n Cam\n Oliver\n Narzo\n Tenshie\n MartenM\n Ridge\n SenpaiDipper\n Snaiker\n Thijmen";
|
" TheGeneral\n Beny\n Alejandro\n Capheus\n Skeletor\n Harmonic\n Mike\n Remco\n zGrav \n Quadral \n Harmony\n Swirny\n ArpyAge\n Mikkel\n Rodolfo\n Rasmus\n Kitt Mustang\n Snaiker\n nttzx\n necmi\n Dome\n Jose Flores\n Cam\n Oliver\n Narzo\n Tenshie\n MartenM\n Ridge\n SenpaiDipper\n Snaiker\n Thijmen";
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,7 @@ public class ArcturusCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
||||||
gameClient.getHabbo().whisper("This hotel is powered by Arcturus Emulator! \r" +
|
gameClient.getHabbo().whisper("This hotel is powered by Arcturus Emulator! \r" +
|
||||||
"Cet hôtel est alimenté par Arcturus émulateur! \r" +
|
"Cet hôtel est alimenté par Arcturus émulateur! \r" +
|
||||||
|
@ -21,7 +21,7 @@ public class BadgeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 1) {
|
if (params.length == 1) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.forgot_username"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.forgot_username"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -15,7 +15,7 @@ public class BanCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_ban.forgot_user"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_ban.forgot_user"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@ public class BlockAlertCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
||||||
gameClient.getHabbo().getHabboStats().setBlockStaffAlerts(!gameClient.getHabbo().getHabboStats().isBlockStaffAlerts());
|
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);
|
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
|
@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()))
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null || !gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ public class CalendarCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (Emulator.getConfig().getBoolean("hotel.calendar.enabled")) {
|
if (Emulator.getConfig().getBoolean("hotel.calendar.enabled")) {
|
||||||
String campaignName = Emulator.getConfig().getValue("hotel.calendar.default");
|
String campaignName = Emulator.getConfig().getValue("hotel.calendar.default");
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ public class ChangeNameCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
|
|
||||||
// check if there are no params
|
// check if there are no params
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
|
@ -12,7 +12,7 @@ public class ChatTypeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
|
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
int chatColor;
|
int chatColor;
|
||||||
|
@ -11,7 +11,7 @@ public class CommandsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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"));
|
StringBuilder message = new StringBuilder(Emulator.getTexts().getValue("commands.generic.cmd_commands.text"));
|
||||||
List<Command> commands = Emulator.getGameEnvironment().getCommandHandler().getCommandsForRank(gameClient.getHabbo().getHabboInfo().getRank().getId());
|
List<Command> commands = Emulator.getGameEnvironment().getCommandHandler().getCommandsForRank(gameClient.getHabbo().getHabboInfo().getRank().getId());
|
||||||
message.append("(").append(commands.size()).append("):\r\n");
|
message.append("(").append(commands.size()).append("):\r\n");
|
||||||
|
@ -9,7 +9,7 @@ public class ConnectCameraCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,7 +11,7 @@ public class ControlCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (params.length == 2) {
|
if (params.length == 2) {
|
||||||
Habbo target = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
Habbo target = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
@ -12,7 +12,7 @@ public class CoordsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
if (gameClient.getHabbo().getRoomUnit() == null || gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class CreditsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 3) {
|
if (params.length == 3) {
|
||||||
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);
|
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ public class DiagonalCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().getCurrentRoom().hasRights(gameClient.getHabbo())) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) {
|
||||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally(!gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally());
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally(!gameClient.getHabbo().getHabboInfo().getCurrentRoom().moveDiagonally());
|
||||||
|
@ -11,7 +11,7 @@ public class DisconnectCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_disconnect.forgot_username"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_disconnect.forgot_username"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,7 +11,7 @@ public class EjectAllCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -16,7 +16,7 @@ public class EmptyBotsInventoryCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (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() != null) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
||||||
|
@ -18,7 +18,7 @@ public class EmptyInventoryCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (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() != null) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
||||||
|
@ -16,7 +16,7 @@ public class EmptyPetsInventoryCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (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() != null) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getUserCount() > 10) {
|
||||||
|
@ -14,7 +14,7 @@ public class EnableCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
int effectId;
|
int effectId;
|
||||||
try {
|
try {
|
||||||
|
@ -15,7 +15,7 @@ public class EventCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
StringBuilder message = new StringBuilder();
|
StringBuilder message = new StringBuilder();
|
||||||
|
@ -12,7 +12,7 @@ public class FacelessCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ public class FastwalkCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().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
|
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
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_filterword.missing_word"));
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_filterword.missing_word"));
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,7 +11,7 @@ public class FreezeBotsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().getId() == gameClient.getHabbo().getHabboInfo().getCurrentRoom().getOwnerId() || gameClient.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
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());
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().setAllowBotsWalk(!gameClient.getHabbo().getHabboInfo().getCurrentRoom().isAllowBotsWalk());
|
||||||
|
@ -11,7 +11,7 @@ public class FreezeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public class GiftCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 3) {
|
if (params.length >= 3) {
|
||||||
String username = params[1];
|
String username = params[1];
|
||||||
int itemId;
|
int itemId;
|
||||||
|
@ -8,7 +8,7 @@ public class HabnamCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().getHabboStats().hasActiveClub()) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
||||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().giveEffect(gameClient.getHabbo(), 140, 30);
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().giveEffect(gameClient.getHabbo(), 140, 30);
|
||||||
|
@ -10,7 +10,7 @@ public class HandItemCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
try {
|
try {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
||||||
|
@ -14,7 +14,7 @@ public class HappyHourCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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!"));
|
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new HabboBroadcastMessageComposer("Happy Hour!"));
|
||||||
|
|
||||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||||
|
@ -10,7 +10,7 @@ public class HideWiredCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -10,7 +10,7 @@ public class HotelAlertLinkCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 3) {
|
if (params.length < 3) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class IPBanCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
HabboInfo habbo;
|
HabboInfo habbo;
|
||||||
StringBuilder reason = new StringBuilder();
|
StringBuilder reason = new StringBuilder();
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
@ -17,7 +17,7 @@ public class InvisibleCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
RoomUnit roomUnit = gameClient.getHabbo().getRoomUnit();
|
RoomUnit roomUnit = gameClient.getHabbo().getRoomUnit();
|
||||||
|
|
||||||
if (roomUnit.isInvisible()) {
|
if (roomUnit.isInvisible()) {
|
||||||
|
@ -13,7 +13,7 @@ public class LayCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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())
|
if (gameClient.getHabbo().getRoomUnit() == null || !gameClient.getHabbo().getRoomUnit().canForcePosture())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class MachineBanCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
HabboInfo habbo = null;
|
HabboInfo habbo = null;
|
||||||
StringBuilder reason = new StringBuilder();
|
StringBuilder reason = new StringBuilder();
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
@ -20,7 +20,7 @@ public class MassBadgeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
String badge;
|
String badge;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class MassCreditsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
int amount;
|
int amount;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class MassGiftCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(final GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(final GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
int itemId;
|
int itemId;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class MassPixelsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
int amount;
|
int amount;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class MassPointsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
int type = Emulator.getConfig().getInt("seasonal.primary.type");
|
||||||
String amountString;
|
String amountString;
|
||||||
if (params.length == 3) {
|
if (params.length == 3) {
|
||||||
|
@ -17,7 +17,7 @@ public class MimicCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ public class MoonwalkCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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()) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboStats().hasActiveClub()) {
|
||||||
int effect = 136;
|
int effect = 136;
|
||||||
if (gameClient.getHabbo().getRoomUnit().getEffectId() == 136)
|
if (gameClient.getHabbo().getRoomUnit().getEffectId() == 136)
|
||||||
|
@ -10,7 +10,7 @@ public class MultiCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
gameClient.sendResponse(new RequestSpamWallPostItMessageComposer(null));
|
gameClient.sendResponse(new RequestSpamWallPostItMessageComposer(null));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ public class MuteBotsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().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);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mute_bots." + (gameClient.getHabbo().getHabboStats().isIgnoreBots() ? "ignored" : "unignored")), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -12,7 +12,7 @@ public class MuteCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 1) {
|
if (params.length == 1) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_mute.not_specified"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_mute.not_specified"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@ public class MutePetsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().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);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mute_pets." + (gameClient.getHabbo().getHabboStats().isIgnorePets() ? "ignored" : "unignored")), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,7 +11,7 @@ public class PetInfoCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length > 1) {
|
if (params.length > 1) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() == null)
|
||||||
return false;
|
return false;
|
||||||
|
@ -10,7 +10,7 @@ public class PickallCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -11,7 +11,7 @@ public class PixelCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 3) {
|
if (params.length == 3) {
|
||||||
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);
|
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class PluginsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
StringBuilder message = new StringBuilder("Plugins (" + Emulator.getPluginManager().getPlugins().size() + ")\r");
|
||||||
|
|
||||||
for (HabboPlugin plugin : Emulator.getPluginManager().getPlugins()) {
|
for (HabboPlugin plugin : Emulator.getPluginManager().getPlugins()) {
|
||||||
|
@ -11,7 +11,7 @@ public class PointsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 3) {
|
if (params.length >= 3) {
|
||||||
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);
|
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class PromoteTargetOfferCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length <= 1) {
|
if (params.length <= 1) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_promote_offer.not_found"));
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_promote_offer.not_found"));
|
||||||
return true;
|
return true;
|
||||||
|
@ -15,7 +15,7 @@ public class PullCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length != 2) return true;
|
if (params.length != 2) return true;
|
||||||
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ public class PushCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length != 2) return true;
|
if (params.length != 2) return true;
|
||||||
|
|
||||||
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
@ -18,7 +18,7 @@ public class RedeemCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().getActiveTradeForHabbo(gameClient.getHabbo()) != null)
|
||||||
return false;
|
return false;
|
||||||
ArrayList<HabboItem> items = new ArrayList<>();
|
ArrayList<HabboItem> items = new ArrayList<>();
|
||||||
|
@ -16,7 +16,7 @@ public class ReloadRoomCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
Emulator.getThreading().run(() -> {
|
Emulator.getThreading().run(() -> {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -12,7 +12,7 @@ public class RoomAlertCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
StringBuilder message = new StringBuilder();
|
StringBuilder message = new StringBuilder();
|
||||||
|
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
@ -18,7 +18,7 @@ public class RoomBadgeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (gameClient == null)
|
if (gameClient == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public class RoomBundleCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
int parentId;
|
int parentId;
|
||||||
int credits;
|
int credits;
|
||||||
int points;
|
int points;
|
||||||
|
@ -11,7 +11,7 @@ public class RoomCreditsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
int amount;
|
int amount;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class RoomDanceCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
int danceId;
|
int danceId;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public class RoomEffectCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_roomeffect.no_effect"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_roomeffect.no_effect"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -15,7 +15,7 @@ public class RoomGiftCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(final GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(final GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
int itemId;
|
int itemId;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public class RoomItemCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
int itemId = 0;
|
int itemId = 0;
|
||||||
|
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
@ -13,7 +13,7 @@ public class RoomKickCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
final Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
if (params.length > 1) {
|
if (params.length > 1) {
|
||||||
|
@ -11,7 +11,7 @@ public class RoomMuteCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -11,7 +11,7 @@ public class RoomPixelsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length == 2) {
|
if (params.length == 2) {
|
||||||
int amount;
|
int amount;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ public class RoomPointsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
int type = Emulator.getConfig().getInt("seasonal.primary.type");
|
||||||
String amountString;
|
String amountString;
|
||||||
if (params.length == 3) {
|
if (params.length == 3) {
|
||||||
|
@ -11,7 +11,7 @@ public class SayAllCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say_all.forgot_message"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say_all.forgot_message"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -13,7 +13,7 @@ public class SayCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say.forgot_username"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_say.forgot_username"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@ public class SetMaxCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
int max;
|
int max;
|
||||||
try {
|
try {
|
||||||
|
@ -10,7 +10,7 @@ public class SetPollCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
||||||
int pollId = -1;
|
int pollId = -1;
|
||||||
|
@ -11,7 +11,7 @@ public class SetSpeedCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().getCurrentRoom().hasRights(gameClient.getHabbo())) {
|
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) {
|
||||||
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = gameClient.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
@ -11,7 +11,7 @@ public class ShoutAllCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout_all.forgot_message"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout_all.forgot_message"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -14,7 +14,7 @@ public class ShoutCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length < 2) {
|
if (params.length < 2) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout.forgot_username"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_shout.forgot_username"), RoomChatMessageBubbles.ALERT);
|
||||||
return true;
|
return true;
|
||||||
|
@ -14,7 +14,7 @@ public class ShutdownCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
StringBuilder reason = new StringBuilder("-");
|
StringBuilder reason = new StringBuilder("-");
|
||||||
int minutes = 0;
|
int minutes = 0;
|
||||||
if (params.length > 2) {
|
if (params.length > 2) {
|
||||||
|
@ -9,7 +9,7 @@ public class SitCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled
|
||||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo());
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo());
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,7 +11,7 @@ public class SitDownCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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()) {
|
for (Habbo habbo : gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbos()) {
|
||||||
if (habbo.getRoomUnit().isWalking()) {
|
if (habbo.getRoomUnit().isWalking()) {
|
||||||
habbo.getRoomUnit().stopWalking();
|
habbo.getRoomUnit().stopWalking();
|
||||||
|
@ -13,7 +13,7 @@ public class SoftKickCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length != 2) return true;
|
if (params.length != 2) return true;
|
||||||
final Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
final Habbo habbo = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(params[1]);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public class StaffAlertCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length > 1) {
|
if (params.length > 1) {
|
||||||
StringBuilder message = new StringBuilder();
|
StringBuilder message = new StringBuilder();
|
||||||
for (int i = 1; i < params.length; i++) {
|
for (int i = 1; i < params.length; i++) {
|
||||||
|
@ -15,7 +15,7 @@ public class StaffOnlineCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
int minRank = Emulator.getConfig().getInt("commands.cmd_staffonline.min_rank");
|
||||||
|
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
@ -12,7 +12,7 @@ public class StalkCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ public class StandCommand extends Command {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
|
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
|
||||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeStand(gameClient.getHabbo());
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeStand(gameClient.getHabbo());
|
||||||
return true;
|
return true;
|
||||||
|
@ -34,10 +34,9 @@ public class SubscriptionCommand extends Command {
|
|||||||
* @param gameClient Client that executed the command
|
* @param gameClient Client that executed the command
|
||||||
* @param params Command parameters
|
* @param params Command parameters
|
||||||
* @return Boolean indicating success
|
* @return Boolean indicating success
|
||||||
* @throws Exception Exception
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
if (params.length >= 4) {
|
if (params.length >= 4) {
|
||||||
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);
|
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class SummonCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ public class SummonRankCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
public boolean handle(GameClient gameClient, String[] params) {
|
||||||
int minRank;
|
int minRank;
|
||||||
|
|
||||||
if (params.length >= 2) {
|
if (params.length >= 2) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user