From 4619f7fec0eb2bb842bb5708aac918288fa64c3b Mon Sep 17 00:00:00 2001 From: capheus <20739601+capheus@users.noreply.github.com> Date: Sun, 8 Jul 2018 21:32:00 +0000 Subject: [PATCH] Updated to 1.10 decompiled. --- README.md | 35 +- src/main/java/com/eu/habbo/Emulator.java | 99 +--- .../java/com/eu/habbo/core/CleanerThread.java | 64 +-- .../eu/habbo/core/ConfigurationManager.java | 82 +--- .../com/eu/habbo/core/CreditsScheduler.java | 12 +- src/main/java/com/eu/habbo/core/ErrorLog.java | 4 +- src/main/java/com/eu/habbo/core/Logging.java | 60 +-- .../com/eu/habbo/core/PixelScheduler.java | 12 +- .../com/eu/habbo/core/PointsScheduler.java | 12 +- .../java/com/eu/habbo/core/TextsManager.java | 54 +-- .../core/consolecommands/ConsoleCommand.java | 45 +- .../java/com/eu/habbo/database/Database.java | 12 +- .../habbohotel/achievements/Achievement.java | 39 +- .../achievements/AchievementCategories.java | 48 +- .../achievements/AchievementLevel.java | 20 +- .../achievements/AchievementManager.java | 57 +-- .../achievements/TalentTrackLevel.java | 24 +- .../achievements/TalentTrackType.java | 8 +- .../com/eu/habbo/habbohotel/bots/Bot.java | 284 +++-------- .../eu/habbo/habbohotel/bots/BotManager.java | 68 +-- .../eu/habbo/habbohotel/bots/ButlerBot.java | 6 +- .../habbo/habbohotel/catalog/CatalogItem.java | 170 ++----- .../habbohotel/catalog/CatalogManager.java | 189 ++------ .../catalog/CatalogPageLayouts.java | 140 ++---- .../habbohotel/catalog/CatalogPageType.java | 8 +- .../habbo/habbohotel/catalog/ClothItem.java | 12 +- .../habbo/habbohotel/catalog/ClubOffer.java | 32 +- .../eu/habbo/habbohotel/catalog/Voucher.java | 30 +- .../catalog/layouts/BadgeDisplayLayout.java | 4 +- .../catalog/layouts/BotsLayout.java | 4 +- .../layouts/BuildersClubAddonsLayout.java | 4 +- .../layouts/BuildersClubFrontPageLayout.java | 4 +- .../layouts/BuildersClubLoyaltyLayout.java | 4 +- .../catalog/marketplace/MarketPlace.java | 100 +--- .../catalog/marketplace/MarketPlaceState.java | 19 +- .../habbohotel/commands/AboutCommand.java | 6 +- .../eu/habbo/habbohotel/commands/Command.java | 20 +- .../habbohotel/commands/CommandHandler.java | 32 +- .../habbohotel/commands/FacelessCommand.java | 4 +- .../habbohotel/commands/TestCommand.java | 110 +---- .../habbohotel/crafting/CraftingManager.java | 6 +- .../habbohotel/gameclients/GameClient.java | 31 +- .../com/eu/habbo/habbohotel/games/Game.java | 112 +---- .../eu/habbo/habbohotel/games/GamePlayer.java | 46 +- .../eu/habbo/habbohotel/games/GameTeam.java | 64 +-- .../habbohotel/games/GameTeamColors.java | 24 +- .../games/battlebanzai/BattleBanzaiGame.java | 39 +- .../games/football/FootballGame.java | 4 +- .../games/freeze/FreezeGamePlayer.java | 4 +- .../habbohotel/games/tag/IceTagGame.java | 154 ------ .../habbohotel/games/tag/TagGamePlayer.java | 7 +- .../habbohotel/guides/GuardianTicket.java | 47 +- .../habbo/habbohotel/guides/GuideManager.java | 124 +---- .../habbo/habbohotel/guilds/GuildManager.java | 120 +---- .../eu/habbo/habbohotel/guilds/GuildPart.java | 12 +- .../habbohotel/guilds/GuildPartType.java | 12 +- .../habbohotel/guilds/forums/GuildForum.java | 14 +- .../habbohotel/hotelview/HallOfFame.java | 12 +- .../hotelview/HallOfFameWinner.java | 32 +- .../habbo/habbohotel/hotelview/NewsList.java | 9 +- .../habbohotel/hotelview/NewsWidget.java | 56 +-- .../habbohotel/items/ItemInteraction.java | 18 +- .../habbo/habbohotel/items/ItemManager.java | 116 ++--- .../habbo/habbohotel/items/PostItColor.java | 22 +- .../interactions/InteractionPushable.java | 166 +------ .../interactions/InteractionTeleport.java | 19 - .../items/interactions/InteractionWired.java | 22 + .../interactions/InteractionWiredEffect.java | 41 +- .../InteractionWiredHighscore.java | 3 - .../InteractionFootballScoreboard.java | 10 +- .../games/freeze/InteractionFreezeTimer.java | 5 +- .../wired/effects/WiredEffectTeleport.java | 3 +- .../habbo/habbohotel/modtool/WordFilter.java | 7 +- .../eu/habbo/habbohotel/pets/PetManager.java | 6 +- .../com/eu/habbo/habbohotel/rooms/Room.java | 42 +- .../habbo/habbohotel/rooms/RoomManager.java | 23 +- .../habbohotel/rooms/RoomRightLevels.java | 40 +- .../habbohotel/rooms/RoomSpecialTypes.java | 56 +-- .../eu/habbo/habbohotel/rooms/RoomTile.java | 13 +- .../habbo/habbohotel/rooms/RoomTileState.java | 4 +- .../eu/habbo/habbohotel/rooms/RoomUnit.java | 4 +- .../habbohotel/rooms/RoomUserRotation.java | 4 +- .../com/eu/habbo/habbohotel/users/Habbo.java | 159 ++----- .../eu/habbo/habbohotel/users/HabboItem.java | 3 + .../habbo/habbohotel/users/HabboManager.java | 8 +- .../habbo/habbohotel/wired/WiredHandler.java | 4 +- .../messages/incoming/Incoming_1006.java | 442 +----------------- .../messages/incoming/Incoming_Back.java | 442 +----------------- .../incoming/friends/FriendRequestEvent.java | 4 +- .../incoming/friends/RequestFriendsEvent.java | 5 - .../incoming/handshake/SecureLoginEvent.java | 12 +- .../handshake/SecureLoginEvent_BACKUP.java | 52 +-- .../hotelview/HotelViewDataEvent.java | 22 - .../jukebox/JukeBoxAddSoundTrackEvent.java | 51 -- .../incoming/users/RequestUserDataEvent.java | 52 +-- .../eu/habbo/messages/outgoing/Outgoing.java | 51 +- .../messages/outgoing/Outgoing_1006.java | 426 +---------------- .../messages/outgoing/Outgoing_Back.java | 428 +---------------- .../habbo/messages/outgoing/TestComposer.java | 10 +- .../friends/UpdateFriendComposer.java | 5 +- .../GameCenterGameListComposer.java | 4 +- .../rooms/items/MoodLightDataComposer.java | 8 +- .../rooms/pets/PetInformationComposer.java | 19 +- .../breeding/PetBreedingStartComposer.java | 7 +- .../unknown/QuestionInfoComposer.java | 28 +- .../unknown/SnowWarsAddUserComposer.java | 5 +- .../unknown/SnowWarsRemoveUserComposer.java | 5 +- .../outgoing/users/UserClubComposer.java | 10 - .../com/eu/habbo/messages/rcon/AlertUser.java | 4 +- .../habbo/messages/rcon/DisconnectUser.java | 4 +- .../habbo/messages/rcon/ExecuteCommand.java | 4 +- .../eu/habbo/messages/rcon/ForwardUser.java | 4 +- .../com/eu/habbo/messages/rcon/GiveBadge.java | 5 +- .../eu/habbo/messages/rcon/GiveCredits.java | 5 +- .../eu/habbo/messages/rcon/GivePixels.java | 5 +- .../eu/habbo/messages/rcon/GivePoints.java | 5 +- .../eu/habbo/messages/rcon/HotelAlert.java | 4 +- .../messages/rcon/ProgressAchievement.java | 5 +- .../eu/habbo/messages/rcon/RCONMessage.java | 31 +- .../com/eu/habbo/messages/rcon/SendGift.java | 4 +- .../com/eu/habbo/messages/rcon/SetRank.java | 5 +- .../eu/habbo/messages/rcon/UpdateCatalog.java | 4 +- .../habbo/messages/rcon/UpdateWordfilter.java | 4 +- .../networking/rconserver/RCONServer.java | 6 +- .../com/eu/habbo/plugin/EventHandler.java | 29 +- .../com/eu/habbo/plugin/EventPriority.java | 29 +- .../java/com/eu/habbo/plugin/HabboPlugin.java | 7 +- .../com/eu/habbo/plugin/PluginManager.java | 22 +- .../plugin/events/bots/BotChatEvent.java | 9 +- .../eu/habbo/plugin/events/bots/BotEvent.java | 8 +- .../plugin/events/bots/BotPickUpEvent.java | 8 +- .../plugin/events/bots/BotPlacedEvent.java | 14 +- .../plugin/events/bots/BotSavedChatEvent.java | 26 +- .../plugin/events/bots/BotSavedLookEvent.java | 19 +- .../plugin/events/bots/BotSavedNameEvent.java | 10 +- .../events/bots/BotServerItemEvent.java | 16 +- .../plugin/events/bots/BotShoutEvent.java | 5 +- .../plugin/events/bots/BotTalkEvent.java | 5 +- .../plugin/events/bots/BotWhisperEvent.java | 10 +- .../EmulatorLoadCatalogManagerEvent.java | 4 +- .../EmulatorLoadItemsManagerEvent.java | 7 +- .../events/emulator/EmulatorLoadedEvent.java | 4 +- .../emulator/EmulatorStartShutdownEvent.java | 4 +- .../events/emulator/EmulatorStoppedEvent.java | 4 +- .../furniture/FurnitureDiceRolledEvent.java | 11 +- .../events/furniture/FurnitureEvent.java | 9 +- .../events/furniture/FurnitureMovedEvent.java | 16 +- .../furniture/FurniturePickedUpEvent.java | 6 +- .../furniture/FurniturePlacedEvent.java | 12 +- .../furniture/FurnitureRedeemedEvent.java | 17 +- .../furniture/FurnitureRolledEvent.java | 15 +- .../furniture/FurnitureRoomTonerEvent.java | 8 +- .../furniture/FurnitureRotatedEvent.java | 11 +- .../events/furniture/FurnitureUserEvent.java | 11 +- .../wired/WiredConditionFailedEvent.java | 16 +- .../wired/WiredStackExecutedEvent.java | 21 +- .../wired/WiredStackTriggeredEvent.java | 21 +- .../habbo/plugin/events/games/GameEvent.java | 8 +- .../events/games/GameHabboJoinEvent.java | 5 +- .../events/games/GameHabboLeaveEvent.java | 5 +- .../plugin/events/games/GameStartedEvent.java | 5 +- .../plugin/events/games/GameStoppedEvent.java | 5 +- .../plugin/events/games/GameUserEvent.java | 9 +- .../guilds/GuildAcceptedMembershipEvent.java | 16 +- .../events/guilds/GuildChangedBadgeEvent.java | 10 +- .../guilds/GuildChangedColorsEvent.java | 15 +- .../events/guilds/GuildChangedNameEvent.java | 15 +- .../guilds/GuildChangedSettingsEvent.java | 15 +- .../guilds/GuildDeclinedMembershipEvent.java | 20 +- .../events/guilds/GuildDeletedEvent.java | 10 +- .../plugin/events/guilds/GuildEvent.java | 8 +- .../events/guilds/GuildFavoriteSetEvent.java | 10 +- .../events/guilds/GuildGivenAdminEvent.java | 20 +- .../events/guilds/GuildPurchasedEvent.java | 10 +- .../events/guilds/GuildRemovedAdminEvent.java | 14 +- .../guilds/GuildRemovedFavoriteEvent.java | 9 +- .../guilds/GuildRemovedMemberEvent.java | 14 +- .../navigator/NavigatorPopularRoomsEvent.java | 9 +- .../navigator/NavigatorRoomCreatedEvent.java | 11 +- .../navigator/NavigatorRoomDeletedEvent.java | 5 +- .../events/navigator/NavigatorRoomsEvent.java | 9 +- .../navigator/NavigatorSearchResultEvent.java | 15 +- .../eu/habbo/plugin/events/pets/PetEvent.java | 9 +- .../plugin/events/pets/PetTalkEvent.java | 4 +- .../habbo/plugin/events/rooms/RoomEvent.java | 9 +- .../plugin/events/rooms/RoomLoadedEvent.java | 6 +- .../events/rooms/RoomUncachedEvent.java | 6 +- .../events/rooms/RoomUnloadedEvent.java | 6 +- .../events/rooms/RoomUnloadingEvent.java | 6 +- .../plugin/events/roomunit/RoomUnitEvent.java | 12 +- .../roomunit/RoomUnitLookAtPointEvent.java | 10 +- .../events/roomunit/RoomUnitSetGoalEvent.java | 10 +- .../plugin/events/support/SupportEvent.java | 8 +- .../support/SupportRoomActionEvent.java | 25 +- .../events/support/SupportTicketEvent.java | 5 +- .../support/SupportUserAlertedEvent.java | 15 +- .../support/SupportUserBannedEvent.java | 14 +- .../events/support/SupportUserKickEvent.java | 15 +- .../plugin/events/users/UserCommandEvent.java | 15 +- .../plugin/events/users/UserCreditsEvent.java | 10 +- .../events/users/UserDisconnectEvent.java | 4 +- .../events/users/UserEnterRoomEvent.java | 12 +- .../habbo/plugin/events/users/UserEvent.java | 8 +- .../events/users/UserExecuteCommandEvent.java | 16 +- .../events/users/UserExitRoomEvent.java | 5 +- .../plugin/events/users/UserIdleEvent.java | 7 +- .../plugin/events/users/UserKickEvent.java | 8 +- .../plugin/events/users/UserLoginEvent.java | 11 +- .../events/users/UserPickGiftEvent.java | 7 +- .../plugin/events/users/UserPointsEvent.java | 15 +- .../events/users/UserPublishPictureEvent.java | 19 +- .../users/UserPurchasePictureEvent.java | 19 +- .../events/users/UserRegisteredEvent.java | 5 +- .../events/users/UserRightsGivenEvent.java | 5 +- .../events/users/UserRightsTakenEvent.java | 6 +- .../plugin/events/users/UserRolledEvent.java | 15 +- .../events/users/UserSavedLookEvent.java | 8 +- .../events/users/UserSavedMottoEvent.java | 6 +- .../events/users/UserSavedSettingsEvent.java | 9 +- .../events/users/UserSavedWardrobeEvent.java | 5 +- .../events/users/UserTakeStepEvent.java | 15 +- .../plugin/events/users/UserTalkEvent.java | 6 +- .../users/UserTriggerWordFilterEvent.java | 9 +- .../events/users/UserWiredRewardReceived.java | 22 +- .../achievements/UserAchievementEvent.java | 9 +- .../UserAchievementLeveledEvent.java | 15 +- .../UserAchievementProgressEvent.java | 10 +- .../users/catalog/UserCatalogEvent.java | 9 +- .../UserCatalogFurnitureBoughtEvent.java | 12 +- .../UserCatalogItemPurchasedEvent.java | 25 +- .../friends/UserAcceptFriendRequestEvent.java | 6 +- .../users/friends/UserFriendChatEvent.java | 11 +- .../events/users/friends/UserFriendEvent.java | 5 +- .../users/friends/UserRelationShipEvent.java | 5 +- .../friends/UserRequestFriendshipEvent.java | 15 +- 235 files changed, 1022 insertions(+), 6064 deletions(-) diff --git a/README.md b/README.md index 5261d776..2e19b70d 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,16 @@ # **Arcturus Emulator is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). Modifications are allowed but must disclosed. Changes in the about menu are forbidden as they are part of the license.** # -# Arcturus Emulator # +# Arcturus Morningstar # ## **To Get The Camera To Work Visit http://arcturus.wf and register.** ## ## **TUTORIAL FOR PLUGINS http://arcturus.wf/thread-2415.html** ## # **DO NOT EDIT THE SOURCE. USE THE PLUGIN API.** # -## Current Stable Version: 1.9.0 ## -Arcturus Emulator is a Habbo emulator written in Java aiming to be an exact clone of the offical server. +## Current Stable Version: 1.10.0 ## +Arcturus Morningstar is a Habbo emulator written in Java aiming to be an exact clone of the offical server, based on Arcturus Emulator by TheGeneral. Targeting PRODUCTION-201611291003-338511768 -Download SWF: http://arcturus.wf/mirrors/asmd_PRODUCTION-201611291003-338511768.swf - -# **Compiled version (Including Database): http://arcturus.wf/mirrors/ArcturusEmulator_1.9.0.zip** # - -Latest Compiled Version: http://arcturus.wf:8080 - -Older Files: http://arcturus.wf/mirrors/ - -Icons: http://arcturus.wf/mirrors/icons.zip - -JavaDoc: http://arcturus.wf/doc/ - -SCRIPTS for developers: http://arcturus.wf/mirrors/PRODUCTION-201611291003-338511768_scripts.txt ### Contributing ### - Anyone is allowed to contribute to the project. Reporting bugs and issues goes via the issue tracker. -You can request features in the issue tracker. -### Plugins ### -An example plugin can be found here: https://bitbucket.org/Wesley12312/pluginexample - -Here is a list of cool plugins you can download: - -* Kickwars: https://bitbucket.org/Wesley12312/kickwars-plugin -* Bubble Alerts: https://bitbucket.org/Wesley12312/arcturus-bubble-alerts-plugin -* Essentials: https://bitbucket.org/Wesley12312/arcturus-essentials-plugin - -If you want the link to your plugin repository to be added, create an issue. - -### Contact ### - -* http://arcturus.wf/ | Main forums. \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/Emulator.java b/src/main/java/com/eu/habbo/Emulator.java index b9c44566..da4ace20 100644 --- a/src/main/java/com/eu/habbo/Emulator.java +++ b/src/main/java/com/eu/habbo/Emulator.java @@ -29,49 +29,31 @@ import java.util.regex.Pattern; public final class Emulator { - /** - * Major version of the emulator. - */ + public final static int MAJOR = 1; - /** - * Minor version of the emulator. - */ + public final static int MINOR = 10; - /** - * Stable build version of the emulator. - */ + public final static int BUILD = 0; - /** - * Version as string. - */ + public static final String version = "Version: " + MAJOR + "." + MINOR + "." + BUILD; - /** - * Public chat, used for staffchat for now. - */ + public static MessengerBuddy publicChatBuddy; - /** - * The emulator is fully loaded and ready to handle players. - */ + public static boolean isReady = false; - /** - * The emulator is shutting down. - */ + public static boolean isShuttingDown = false; - /** - * The emulator has fully shutdown. - */ + public static boolean stopped = false; - /** - * The emulator is in debugging mode. - */ + public static boolean debugging = false; private static int timeStarted = 0; @@ -102,11 +84,7 @@ public final class Emulator Runtime.getRuntime().addShutdownHook(hook); } - /** - * Entry point for Arcturus Emulator. - * @param args Unused - * @throws Exception Failed to start the emulator. - */ + public static void main(String[] args) throws Exception { try @@ -204,9 +182,7 @@ public final class Emulator } } - /** - * Shutsdown the emulator. - */ + private static void dispose() { Emulator.isShuttingDown = true; @@ -290,82 +266,61 @@ public final class Emulator catch (Exception e) {} } - /** - * @return The ConfigurationManager - */ + public static ConfigurationManager getConfig() { return config; } - /** - * @return The TextsManager - */ + public static TextsManager getTexts() { return texts; } - /** - * @return The Database - */ + public static Database getDatabase() { return database; } - /** - * @return Current Runtime - */ + public static Runtime getRuntime() { return runtime; } - /** - * @return The GameServer - */ + public static GameServer getGameServer() { return gameServer; } - /** - * @return The RCONServer - */ + public static RCONServer getRconServer() { return rconServer; } - /** - * @return Logging module - */ + public static Logging getLogging() { return logging; } - /** - * @return The ThreadPooling - */ + public static ThreadPooling getThreading() { return threading; } - /** - * @return The GameEnvironment - */ + public static GameEnvironment getGameEnvironment() { return gameEnvironment; } - /** - * - * @return The PluginManager - */ + public static PluginManager getPluginManager() { return pluginManager; @@ -401,11 +356,7 @@ public final class Emulator System.exit(0); } - /** - * Converts a date to an unix timestamp - * @param date The date to convert - * @return Return unix timestamp in seconds. - */ + private static String dateToUnixTimestamp(Date date) { String res = ""; @@ -417,11 +368,7 @@ public final class Emulator return res + seconds; } - /** - * Converts a String to a Date object - * @param date The String to parse - * @return The Date of the string. - */ + private static Date stringToDate(String date) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); diff --git a/src/main/java/com/eu/habbo/core/CleanerThread.java b/src/main/java/com/eu/habbo/core/CleanerThread.java index abc0f0d6..6dc800b6 100644 --- a/src/main/java/com/eu/habbo/core/CleanerThread.java +++ b/src/main/java/com/eu/habbo/core/CleanerThread.java @@ -15,80 +15,50 @@ import java.sql.Statement; public class CleanerThread implements Runnable { - /** - * Delay between each execution of checking to clean up in MS. - */ + public static final int DELAY = 10000; - /** - * Amount of seconds the Hall Of Fame has to be reloaded. - */ + public static final int RELOAD_HALL_OF_FAME = 1800; - /** - * Amount of seconds the News List has to be reloaded. - */ + public static final int RELOAD_NEWS_LIST = 3600; - /** - * Amount of seconds inactive rooms have to be cleared. - */ + public static final int REMOVE_INACTIVE_ROOMS = 120; - /** - * Amount of seconds inactive guilds have to be cleared. - */ + public static final int REMOVE_INACTIVE_GUILDS = 60; - /** - * Amount of seconds inactive tours have to be cleared. - */ + public static final int REMOVE_INACTIVE_TOURS = 600; - /** - * Amount of seconds error logs have to be saved to the database. - */ + public static final int SAVE_ERROR_LOGS = 30; - /** - * - */ + private static final int CALLBACK_TIME = 60*15; - /** - * Last time the Hall Of Fame was reloaded. - */ + private static int LAST_HOF_RELOAD = Emulator.getIntUnixTimestamp(); - /** - * Last time the news list was reloaded. - */ + private static int LAST_NL_RELOAD = Emulator.getIntUnixTimestamp(); - /** - * Last time inactive rooms have been cleared. - */ + private static int LAST_INACTIVE_ROOMS_CLEARED = Emulator.getIntUnixTimestamp(); - /** - * Last time inactive guilds have been cleared. - */ + private static int LAST_INACTIVE_GUILDS_CLEARED = Emulator.getIntUnixTimestamp(); - /** - * Last time inactive tours have been cleared. - */ + private static int LAST_INACTIVE_TOURS_CLEARED = Emulator.getIntUnixTimestamp(); - /** - * Last time error logs were saved to the database. - */ + private static int LAST_ERROR_LOGS_SAVED = Emulator.getIntUnixTimestamp(); - /** - * Last time dailys where refilled. - */ + private static int LAST_DAILY_REFILL = Emulator.getIntUnixTimestamp(); private static int LAST_CALLBACK = Emulator.getIntUnixTimestamp(); @@ -163,9 +133,7 @@ public class CleanerThread implements Runnable { SearchUserEvent.cachedResults.clear(); } - /** - * Cleans up the database before emulator launch to guarantee system integrity. - */ + void databaseCleanup() { refillDailyRespects(); diff --git a/src/main/java/com/eu/habbo/core/ConfigurationManager.java b/src/main/java/com/eu/habbo/core/ConfigurationManager.java index a34ef6b5..e0a7cc82 100644 --- a/src/main/java/com/eu/habbo/core/ConfigurationManager.java +++ b/src/main/java/com/eu/habbo/core/ConfigurationManager.java @@ -15,22 +15,13 @@ import java.util.Properties; public class ConfigurationManager { - /** - * Flag for when the ConfigurationManager has fully loaded. - */ + public boolean loaded = false; - /** - * Flag for when the ConfigurationManager is still loading. - * The configurationmanager is loaded in two parts, - * first the config.ini is read. - * After that the rest of the configuration is read from the database. - */ + public boolean isLoading = false; - /** - * Our configurations stored in this object. - */ + private final Properties properties; public ConfigurationManager(String path) throws Exception @@ -40,10 +31,7 @@ public class ConfigurationManager this.reload(); } - /** - * Reloads the settings from the config file. - * @throws Exception - */ + public void reload() throws Exception { this.isLoading = true; @@ -82,9 +70,7 @@ public class ConfigurationManager } } - /** - * Loads the settings from the database. - */ + public void loadFromDatabase() { Emulator.getLogging().logStart("Loading configuration from database..."); @@ -128,22 +114,13 @@ public class ConfigurationManager } } - /** - * Gets the string value for a specific key. - * @param key The key to find the value for. - * @return The string value for the key. Returns an empty string if not found. - */ + public String getValue(String key) { return getValue(key, ""); } - /** - * Gets the string value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The string value for the key. Returns defaultValue when not found. - */ + public String getValue(String key, String defaultValue) { if (this.isLoading) @@ -155,22 +132,13 @@ public class ConfigurationManager return this.properties.getProperty(key, defaultValue); } - /** - * Gets the boolean value for a specific key. - * @param key The key to find the value for. - * @return The boolean value for the key. Returns false if not found. - */ + public boolean getBoolean(String key) { return getBoolean(key, false); } - /** - * Gets the boolean value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The boolean value for the key. Returns defaultValue when not found. - */ + public boolean getBoolean(String key, boolean defaultValue) { if (this.isLoading) @@ -187,22 +155,13 @@ public class ConfigurationManager return defaultValue; } - /** - * Gets the int value for a specific key. - * @param key The key to find the value for. - * @return The int value for the key. Returns 0 if not found. - */ + public int getInt(String key) { return getInt(key, 0); } - /** - * Gets the int value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The int value for the key. Returns defaultValue when not found. - */ + public int getInt(String key, Integer defaultValue) { if (this.isLoading) @@ -218,22 +177,13 @@ public class ConfigurationManager return defaultValue; } - /** - * Gets the double value for a specific key. - * @param key The key to find the value for. - * @return The double value for the key. Returns 0 if not found. - */ + public double getDouble(String key) { return getDouble(key, 0.0); } - /** - * Gets the double value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The double value for the key. Returns defaultValue when not found. - */ + public double getDouble(String key, Double defaultValue) { if (this.isLoading) @@ -251,11 +201,7 @@ public class ConfigurationManager return defaultValue; } - /** - * Updates the give key. - * @param key The key to update. - * @param value The new value. - */ + public void update(String key, String value) { this.properties.setProperty(key, value); diff --git a/src/main/java/com/eu/habbo/core/CreditsScheduler.java b/src/main/java/com/eu/habbo/core/CreditsScheduler.java index 3f692ff9..397e5c2e 100644 --- a/src/main/java/com/eu/habbo/core/CreditsScheduler.java +++ b/src/main/java/com/eu/habbo/core/CreditsScheduler.java @@ -7,19 +7,13 @@ import java.util.Map; public class CreditsScheduler extends Scheduler { - /** - * Defines if users that are not in a room should be excluded from receiving credits. - */ + public static boolean IGNORE_HOTEL_VIEW; - /** - * Defines if users idling in rooms should be excluded from receiving credits. - */ + public static boolean IGNORE_IDLED; - /** - * The amount of credits that will be given. - */ + public static int CREDITS; public CreditsScheduler() diff --git a/src/main/java/com/eu/habbo/core/ErrorLog.java b/src/main/java/com/eu/habbo/core/ErrorLog.java index 33ad4090..a9bf00ee 100644 --- a/src/main/java/com/eu/habbo/core/ErrorLog.java +++ b/src/main/java/com/eu/habbo/core/ErrorLog.java @@ -8,9 +8,7 @@ import java.io.StringWriter; import java.sql.PreparedStatement; import java.sql.SQLException; -/** - * Created on 12-11-2015 19:16. - */ + public class ErrorLog implements Loggable { public final static String insertQuery = "INSERT INTO emulator_errors (timestamp, type, stacktrace) VALUES (?, ?, ?)"; diff --git a/src/main/java/com/eu/habbo/core/Logging.java b/src/main/java/com/eu/habbo/core/Logging.java index 8dbe0f64..64b04632 100644 --- a/src/main/java/com/eu/habbo/core/Logging.java +++ b/src/main/java/com/eu/habbo/core/Logging.java @@ -13,34 +13,22 @@ import java.sql.SQLException; public class Logging { - /** - * File that packetlogs will be sved to. - */ + private static File packets; - /** - * File that undefined packetlogs will be saved to. - */ + private static File packetsUndefined; - /** - * File that packets that were improperly handled will be saved to. - */ + private static File errorsPackets; - /** - * File that SQL errors will be saved to. - */ + private static File errorsSQL; - /** - * File that runtime errors will be saved to. - */ + private static File errorsRuntime; - /** - * File that debug logs will be saved to. - */ + private static File debugFile; private static PrintWriter packetsWriter; @@ -50,24 +38,16 @@ public class Logging private static PrintWriter errorsRuntimeWriter; private static PrintWriter debugFileWriter; - /** - * Bright text. - */ + public static final String ANSI_BRIGHT = "\u001B[1m"; - /** - * Italicized text. - */ + public static final String ANSI_ITALICS = "\u001B[3m"; - /** - * Underlined text. - */ + public static final String ANSI_UNDERLINE = "\u001B[4m"; - /** - * Resets all text effects to normal console font. - */ + public static final String ANSI_RESET = "\u001B[0m"; public static final String ANSI_BLACK = "\u001B[30m"; @@ -79,16 +59,10 @@ public class Logging public static final String ANSI_CYAN = "\u001B[36m"; public static final String ANSI_WHITE = "\u001B[37m"; - /** - * Error logging cache layer. - * Used for bulk inserting into the database. - */ + private final THashSet errorLogs = new THashSet(); - /** - * Command log cache layer. - * Used for bulk inserting into the database. - */ + private final THashSet commandLogs = new THashSet(); public Logging() @@ -182,19 +156,13 @@ public class Logging } } - /** - * Prints a starting message to the console. - * @param line The message to print. - */ + public void logStart(Object line) { System.out.println("[" + Logging.ANSI_BRIGHT + Logging.ANSI_GREEN + "LOADING" + Logging.ANSI_RESET + "] " + line.toString()); } - /** - * Prints a shutdown message to the console. - * @param line The message to print. - */ + public void logShutdownLine(Object line) { if(Emulator.getConfig().getBoolean("logging.debug")) diff --git a/src/main/java/com/eu/habbo/core/PixelScheduler.java b/src/main/java/com/eu/habbo/core/PixelScheduler.java index 00018148..63d975e5 100644 --- a/src/main/java/com/eu/habbo/core/PixelScheduler.java +++ b/src/main/java/com/eu/habbo/core/PixelScheduler.java @@ -7,19 +7,13 @@ import java.util.Map; public class PixelScheduler extends Scheduler { - /** - * Defines if users that are not in a room should be excluded from receiving pixels. - */ + public static boolean IGNORE_HOTEL_VIEW; - /** - * Defines if users idling in rooms should be excluded from receiving pixels. - */ + public static boolean IGNORE_IDLED; - /** - * The amount of pixels to give. - */ + private static int PIXELS; public PixelScheduler() diff --git a/src/main/java/com/eu/habbo/core/PointsScheduler.java b/src/main/java/com/eu/habbo/core/PointsScheduler.java index 21719193..abfeb043 100644 --- a/src/main/java/com/eu/habbo/core/PointsScheduler.java +++ b/src/main/java/com/eu/habbo/core/PointsScheduler.java @@ -7,19 +7,13 @@ import java.util.Map; public class PointsScheduler extends Scheduler { - /** - * Defines if users that are not in a room should be excluded from receiving points. - */ + public static boolean IGNORE_HOTEL_VIEW; - /** - * Defines if users idling in rooms should be excluded from receiving points. - */ + public static boolean IGNORE_IDLED; - /** - * The amount of points to give. - */ + private static int POINTS; public PointsScheduler() diff --git a/src/main/java/com/eu/habbo/core/TextsManager.java b/src/main/java/com/eu/habbo/core/TextsManager.java index 7edae3b6..10cc38be 100644 --- a/src/main/java/com/eu/habbo/core/TextsManager.java +++ b/src/main/java/com/eu/habbo/core/TextsManager.java @@ -9,9 +9,7 @@ import java.util.Properties; public class TextsManager { - /** - * All emulator texts are stored in this object. - */ + private final Properties texts; public TextsManager() @@ -33,10 +31,7 @@ public class TextsManager } } - /** - * Reloads all texts from the database. - * @throws Exception - */ + public void reload() throws Exception { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts")) @@ -59,22 +54,13 @@ public class TextsManager } } - /** - * Gets the string value for a specific key. - * @param key The key to find the value for. - * @return The string value for the key. Returns an empty string if not found. - */ + public String getValue(String key) { return getValue(key, ""); } - /** - * Gets the string value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The string value for the key. Returns defaultValue when not found. - */ + public String getValue(String key, String defaultValue) { if (!this.texts.containsKey(key)) { @@ -83,22 +69,13 @@ public class TextsManager return this.texts.getProperty(key, defaultValue); } - /** - * Gets the boolean value for a specific key. - * @param key The key to find the value for. - * @return The boolean value for the key. Returns false if not found. - */ + public boolean getBoolean(String key) { return getBoolean(key, false); } - /** - * Gets the boolean value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The boolean value for the key. Returns defaultValue when not found. - */ + public boolean getBoolean(String key, Boolean defaultValue) { try @@ -112,22 +89,13 @@ public class TextsManager return defaultValue; } - /** - * Gets the int value for a specific key. - * @param key The key to find the value for. - * @return The int value for the key. Returns 0 if not found. - */ + public int getInt(String key) { return getInt(key, 0); } - /** - * Gets the int value for a specific key. - * @param key The key to find the value for. - * @param defaultValue The value that will be returned when the key is not found. - * @return The int value for the key. Returns defaultValue when not found. - */ + public int getInt(String key, Integer defaultValue) { try @@ -141,11 +109,7 @@ public class TextsManager return defaultValue; } - /** - * Updates the give key. - * @param key The key to update. - * @param value The new value. - */ + public void update(String key, String value) { this.texts.setProperty(key, value); diff --git a/src/main/java/com/eu/habbo/core/consolecommands/ConsoleCommand.java b/src/main/java/com/eu/habbo/core/consolecommands/ConsoleCommand.java index 4ba15ded..bdb656eb 100644 --- a/src/main/java/com/eu/habbo/core/consolecommands/ConsoleCommand.java +++ b/src/main/java/com/eu/habbo/core/consolecommands/ConsoleCommand.java @@ -5,35 +5,23 @@ import gnu.trove.set.hash.THashSet; public abstract class ConsoleCommand { - /** - * Holds all console commands. - */ + public static THashMap commands = new THashMap(); - /** - * The key of the command. First word. - */ + public final String key; - /** - * Usage of the command (Arguments). - */ + public final String usage; - /** - * Constructs a new ConsoleCommand. - * @param key The key of the command. First word. - * @param usage Usage of the command (Arguments). - */ + public ConsoleCommand(String key, String usage) { this.key = key; this.usage = usage; } - /** - * Loads all default ConsoleCommands. - */ + public static void load() { addCommand(new ConsoleShutdownCommand()); @@ -42,37 +30,22 @@ public abstract class ConsoleCommand addCommand(new ConsoleReconnectCameraCommand()); } - /** - * Handles a command - * @param args The arguments entered in the console including the key at index 0. - * @throws Exception - */ + public abstract void handle(String[] args) throws Exception; - /** - * Add a new consolecommand. - * @param command The consolecommand to add. - */ + public static void addCommand(ConsoleCommand command) { commands.put(command.key, command); } - /** - * Searches for the consolecommand using a given key. - * @param key The key to find the associated ConsoleCommand for. - * @return The ConsoleCommand associated with the key. return null if not found. - */ + public static ConsoleCommand findCommand(String key) { return commands.get(key); } - /** - * Handles a line entered in the console. - * @param line The line entered in the console. - * @return True if the command was succesfully handled. Otherwise false. - */ + public static boolean handle(String line) { String[] message = line.split(" "); diff --git a/src/main/java/com/eu/habbo/database/Database.java b/src/main/java/com/eu/habbo/database/Database.java index d491cb15..fcd86f43 100644 --- a/src/main/java/com/eu/habbo/database/Database.java +++ b/src/main/java/com/eu/habbo/database/Database.java @@ -10,14 +10,10 @@ import java.sql.Statement; public class Database { - /** - * Database datasource. - */ + private HikariDataSource dataSource; - /** - * Database connection pool. - */ + private DatabasePool databasePool; public Database(ConfigurationManager config) @@ -54,9 +50,7 @@ public class Database Emulator.getLogging().logStart("Database -> Connected! (" + (System.currentTimeMillis() - millis) + " MS)"); } - /** - * Disposes the database and closes all connections to the database. - */ + public void dispose() { if (this.databasePool != null) diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/Achievement.java b/src/main/java/com/eu/habbo/habbohotel/achievements/Achievement.java index c0b8ef38..b492cecd 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/Achievement.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/Achievement.java @@ -7,31 +7,19 @@ import java.sql.SQLException; public class Achievement { - /** - * Id of the Achievement. - */ + public final int id; - /** - * Name of the Achievement; - */ + public final String name; - /** - * Category of the achievement. - */ + public final AchievementCategories category; - /** - * The levels this achievement has. - */ + public final THashMap levels; - /** - * Creates an new achievement. - * @param set The ResultSet it should fetch the data from. - * @throws SQLException - */ + public Achievement(ResultSet set) throws SQLException { levels = new THashMap(); @@ -43,10 +31,7 @@ public class Achievement this.addLevel(new AchievementLevel(set)); } - /** - * Adds an new AchievementLevel to the Achievement. - * @param level The AchievementLevel to be added. - */ + public void addLevel(AchievementLevel level) { synchronized (this.levels) @@ -55,11 +40,7 @@ public class Achievement } } - /** - * Calculates the AchievementLevel for the given progress. - * @param progress The amount of progress. - * @return The AchievementLevel that matches the amount of progress. - */ + public AchievementLevel getLevelForProgress(int progress) { AchievementLevel l = null; @@ -88,11 +69,7 @@ public class Achievement return l; } - /** - * Calculates the next level compared to the current level. - * @param currentLevel The current level to calculate the next level for. - * @return The next level. Return null if there is no next level. - */ + public AchievementLevel getNextLevel(int currentLevel) { AchievementLevel l = null; diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementCategories.java b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementCategories.java index 04f8a2e0..66370ee0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementCategories.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementCategories.java @@ -2,63 +2,39 @@ package com.eu.habbo.habbohotel.achievements; public enum AchievementCategories { - /** - * Achievements like looks that kill, email registered etc. - */ + IDENTITY, - /** - * Achievements like room raider. - */ + EXPLORE, - /** - * Related to playing music, created music and so on. - */ + MUSIC, - /** - * Achievements like giving respect, hanging out in other peoples room etc. - */ + SOCIAL, - /** - * Games! Banzai! Freeze! - */ + GAMES, - /** - * Stacking, builder, everthing related to furntiure. - */ + ROOM_BUILDER, - /** - * Cat scratch fever. - */ + PETS, - /** - * Could be used for achievements related to floorplan editor. Not sure. - */ + TOOLS, - /** - * Whatever floats your boat goes in here. - */ + OTHER, - /** - * Please referain from using. - */ + TEST, - /** - * Achievements that you don't want to showup in the achievements window. - */ + INVISIBLE, - /** - * Events, anything you want to add. - */ + EVENTS } diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementLevel.java b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementLevel.java index 640ef906..bb347be3 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementLevel.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementLevel.java @@ -5,29 +5,19 @@ import java.sql.SQLException; public class AchievementLevel { - /** - * level of the achievement. - */ + public final int level; - /** - * Amount of currency to give upon achieving this level. - */ + public final int rewardAmount; - /** - * Currency type to give upon achieving this level. - */ + public final int rewardType; - /** - * Amount of achievement points to add upon achieving this level. - */ + public final int points; - /** - * Amount of progress needed to achieve this level. - */ + public final int progress; public AchievementLevel(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java index 70238134..b3f2346e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java @@ -24,27 +24,19 @@ import java.util.Map; public class AchievementManager { - /** - * All the achievements in the hotel are stored in this map where: - * String = name of the achievement (Without ACH_ & Roman number. - * Achievement = Instance of the Achievement class. - */ + private final THashMap achievements; private final THashMap> talentTrackLevels; - /** - * The AchievementManager, shit happens here. - */ + public AchievementManager() { this.achievements = new THashMap<>(); this.talentTrackLevels = new THashMap<>(); } - /** - * Reloads the achievement manager. - */ + public void reload() { long millis = System.currentTimeMillis(); @@ -109,21 +101,13 @@ public class AchievementManager Emulator.getLogging().logStart("Achievement Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); } - /** - * Find an achievement by name. - * @param name The achievement to find. - * @return The achievement - */ + public Achievement getAchievement(String name) { return this.achievements.get(name); } - /** - * Find an achievement by id - * @param id The achievement id to find. - * @return The achievement - */ + public Achievement getAchievement(int id) { synchronized (this.achievements) @@ -182,22 +166,13 @@ public class AchievementManager } - /** - * Progresses an Habbo's achievement by 1. - * @param habbo The Habbo whose achievement should be progressed. - * @param achievement The Achievement to be progressed. - */ + public static void progressAchievement(Habbo habbo, Achievement achievement) { progressAchievement(habbo, achievement, 1); } - /** - * Progresses an Habbo's achievement by an given amount. - * @param habbo The Habbo whose achievement should be progressed. - * @param achievement The Achievement to be progressed. - * @param amount The amount that should be progressed. - */ + public static void progressAchievement(Habbo habbo, Achievement achievement, int amount) { if (achievement == null) @@ -317,12 +292,7 @@ public class AchievementManager } } - /** - * Checks wether the given Habbo has achieved a certain Achievement. - * @param habbo The Habbo to check. - * @param achievement The Achievement to check. - * @return True when the given Habbo has achieved the Achievement. - */ + public static boolean hasAchieved(Habbo habbo, Achievement achievement) { int currentProgress = habbo.getHabboStats().getAchievementProgress(achievement); @@ -347,11 +317,7 @@ public class AchievementManager return false; } - /** - * Creates an new Achievement entry in the database. - * @param habbo The Habbo the achievement should be saved for. - * @param achievement The Achievement that should be inserted. - */ + public static void createUserEntry(Habbo habbo, Achievement achievement) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO users_achievements (user_id, achievement_name, progress) VALUES (?, ?, ?)")) @@ -367,10 +333,7 @@ public class AchievementManager } } - /** - * Saves all the Achievements for the given Habbo to the database. - * @param habbo The Habbo whose Achievements should be saved. - */ + public static void saveAchievements(Habbo habbo) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_achievements SET progress = ? WHERE achievement_name = ? AND user_id = ? LIMIT 1")) diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackLevel.java b/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackLevel.java index 08d822fc..87cde849 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackLevel.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackLevel.java @@ -13,34 +13,22 @@ import java.sql.SQLException; public class TalentTrackLevel { - /** - * Type of this talen track level. - */ + public TalentTrackType type; - /** - * The level of this TalenTrackLevel. - */ + public int level; - /** - * Achievements required to achieve this level. - */ + public TObjectIntMap achievements; - /** - * Items that will be rewarded upon achieving this level. - */ + public THashSet items; - /** - * Perks unlocked upon achieving this level. - */ + public String[] perks; - /** - * Badges received upon achieving this level. - */ + public String[] badges; public TalentTrackLevel(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackType.java b/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackType.java index 99d25585..2018a88a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackType.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/TalentTrackType.java @@ -2,13 +2,9 @@ package com.eu.habbo.habbohotel.achievements; public enum TalentTrackType { - /** - * Talent track for citizenship. - */ + CITIZENSHIP, - /** - * Talent track for helpers and guardians. - */ + HELPER } \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java b/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java index c1771d2b..91ba22c2 100644 --- a/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java +++ b/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java @@ -22,100 +22,61 @@ import java.util.Arrays; public class Bot implements Runnable { - /** - * Bot id. - */ + private int id; - /** - * Bot name. - */ + private String name; - /** - * Bot motto. - */ + private String motto; - /** - * Bot look. - */ + private String figure; - /** - * Bot gender. - */ + private HabboGender gender; - /** - * Bot owner id. - */ + private int ownerId; - /** - * Bot owner name. - */ + private String ownerName; - /** - * Current room the bot is in. - */ + private Room room; - /** - * Current roomUnit that is linked to this bot. - */ + private RoomUnit roomUnit; - /** - * Should auto talk. - */ + private boolean chatAuto; - /** - * Should talk random. - */ + private boolean chatRandom; - /** - * Delay between each sentence. - */ + private short chatDelay; - /** - * Next timestamp the bot can talk. - */ + private int chatTimeOut; - /** - * All chatlines the bot has. - */ + private final ArrayList chatLines; - /** - * Last chatline the bot spoke. - */ + private short lastChatIndex; - /** - * Type of this bot. Used to define custom behaviour. - * See API docs on how to use this. - */ + private String type; - /** - * Enable effect id. - */ + private int effect; - /** - * Wether the bot has to be saved to the database. - */ + private boolean needsUpdate; - /** - * Which roomunit is this bot following. - */ + private int followingHabboId; public Bot(int id, String name, String motto, String figure, HabboGender gender, int ownerId, String ownerName) @@ -179,18 +140,13 @@ public class Bot implements Runnable this.needsUpdate = false; } - /** - * Sets wheter the bot has to be updated in the database. - * @param needsUpdate Should the bot be updated in the database. - */ + public void needsUpdate(boolean needsUpdate) { this.needsUpdate = needsUpdate; } - /** - * @return Wether the bot has to be updated in the database. - */ + public boolean needsUpdate() { return this.needsUpdate; @@ -235,14 +191,7 @@ public class Bot implements Runnable } } - /** - * Cycles through the bot checking if the bot should perform a certain action: - * - * -> Look for a new tile to walk to. - * -> Speak - * - * Override to implement custom behaviour. Make sure to call super.cycle() first. - */ + public void cycle(boolean canWalk) { if(this.roomUnit != null) @@ -283,10 +232,7 @@ public class Bot implements Runnable } } - /** - * Have the bot say something in the room it currently is in. - * @param message The message the bot has to say. - */ + public void talk(String message) { if(this.room != null) @@ -299,10 +245,7 @@ public class Bot implements Runnable } } - /** - * Have the bot shout something in the room it currently is in. - * @param message The message the bot has to shout. - */ + public void shout(String message) { if(this.room != null) @@ -315,11 +258,7 @@ public class Bot implements Runnable } } - /** - * Have the bot whisper something to a habbo. - * @param message The message the bot has to whisper. - * @param habbo The Habbo it should whisper to. - */ + public void whisper(String message, Habbo habbo) { if(this.room != null && habbo != null) @@ -332,64 +271,43 @@ public class Bot implements Runnable } } - /** - * This event is triggered whenever a Habbo places a bot. - * @param habbo The Habbo who placed this bot. - * @param room The room this bot was placed in. - */ + public void onPlace(Habbo habbo, Room room) { } - /** - * This event is triggered whenever a Habbo picks a bot. - * @param habbo The Habbo who picked up this bot. - * @param room The Room this bot was placed in. - */ + public void onPickUp(Habbo habbo, Room room) { } - /** - * This event is triggered whenever a Habbo talks or shouts in a room. - * @param message The message that has been said. - */ + public void onUserSay(final RoomChatMessage message) { } - /** - * @return The id of the bot. - */ + public int getId() { return this.id; } - /** - * Sets the id of the bot. - * @param id The new id of the bot. - */ + public void setId(int id) { this.id = id; } - /** - * @return The name of the bot - */ + public String getName() { return this.name; } - /** - * Sets the name of the bot. - * @param name The new name of the bot. - */ + public void setName(String name) { this.name = name; @@ -399,36 +317,26 @@ public class Bot implements Runnable //this.room.sendComposer(new ChangeNameUpdatedComposer(this.getRoomUnit(), this.getName()).compose()); } - /** - * @return The motto of the bot. - */ + public String getMotto() { return this.motto; } - /** - * Sets a new motto for the bot. - * @param motto The new motto for the bot. - */ + public void setMotto(String motto) { this.motto = motto; this.needsUpdate = true; } - /** - * @return The figure of the bot. - */ + public String getFigure() { return this.figure; } - /** - * Sets a new figure of the bot and updates it in the room. - * @param figure The new figure of the bot. - */ + public void setFigure(String figure) { this.figure = figure; @@ -438,18 +346,13 @@ public class Bot implements Runnable this.room.sendComposer(new RoomUsersComposer(this).compose()); } - /** - * @return The gender of the bot. - */ + public HabboGender getGender() { return this.gender; } - /** - * Sets a new Gender of the bot and updates it in the room. - * @param gender The new gender of the bot. - */ + public void setGender(HabboGender gender) { this.gender = gender; @@ -459,17 +362,13 @@ public class Bot implements Runnable this.room.sendComposer(new RoomUsersComposer(this).compose()); } - /** - * @return The owner id of the bot. - */ + public int getOwnerId() { return this.ownerId; } - /** - * @param ownerId The new owner id of the bot. - */ + public void setOwnerId(int ownerId) { this.ownerId = ownerId; @@ -479,17 +378,13 @@ public class Bot implements Runnable this.room.sendComposer(new RoomUsersComposer(this).compose()); } - /** - * @return The owner name of the bot. - */ + public String getOwnerName() { return this.ownerName; } - /** - * @param ownerName The new owner name of the bot. - */ + public void setOwnerName(String ownerName) { this.ownerName = ownerName; @@ -499,92 +394,70 @@ public class Bot implements Runnable this.room.sendComposer(new RoomUsersComposer(this).compose()); } - /** - * @return The room this bot is in. Returns NULL when in inventory. - */ + public Room getRoom() { return this.room; } - /** - * @param room The room this bot is in. - */ + public void setRoom(Room room) { this.room = room; } - /** - * @return The RoomUnit of the bot. - */ + public RoomUnit getRoomUnit() { return this.roomUnit; } - /** - * @param roomUnit The RoomUnit of the bot. - */ + public void setRoomUnit(RoomUnit roomUnit) { this.roomUnit = roomUnit; } - /** - * @return Wether the bot has auto chat enabled. - */ + public boolean isChatAuto() { return this.chatAuto; } - /** - * @param chatAuto Sets wheter the bot has auto chat enabled. - */ + public void setChatAuto(boolean chatAuto) { this.chatAuto = chatAuto; this.needsUpdate = true; } - /** - * @return Wheter the chatter is randomly selected. - */ + public boolean isChatRandom() { return this.chatRandom; } - /** - * @param chatRandom Sets wheter the chatter is randomly selected. - */ + public void setChatRandom(boolean chatRandom) { this.chatRandom = chatRandom; this.needsUpdate = true; } - /** - * @return The minimum interval between two messages spoken by the bot. - */ + public int getChatDelay() { return this.chatDelay; } - /** - * @param chatDelay Sets the minimum interval between two messages spoken by the bot. - */ + public void setChatDelay(short chatDelay) { this.chatDelay = chatDelay; this.needsUpdate = true; } - /** - * Removes all chatlines from the bot. - */ + public void clearChat() { synchronized (this.chatLines) @@ -594,26 +467,19 @@ public class Bot implements Runnable } } - /** - * @return The bot type. - */ + public String getType() { return this.type; } - /** - * @return The current enable effect. - */ + public int getEffect() { return this.effect; } - /** - * Sets the effect for a bot and also updates it to the room. - * @param effect The effect to give to the bot. - */ + public void setEffect(int effect) { this.effect = effect; @@ -630,10 +496,7 @@ public class Bot implements Runnable } } - /** - * Adds new chatlines to the bot. Does not erase existing chatlines. - * @param chatLines The chatlines to add. - */ + public void addChatLines(ArrayList chatLines) { synchronized (this.chatLines) @@ -643,10 +506,7 @@ public class Bot implements Runnable } } - /** - * Adds a new chatline to the bot. Does not erase existing chatlines. - * @param chatLine The chatline to add. - */ + public void addChatLine(String chatLine) { synchronized (this.chatLines) @@ -656,30 +516,19 @@ public class Bot implements Runnable } } - /** - * @return The chatlines this bot can speak. - */ + public ArrayList getChatLines() { return this.chatLines; } - /** - * @return The HabboInfo.id of the Habbo it is following. - */ + public int getFollowingHabboId() { return this.followingHabboId; } - /** - * Starts following a specific Habbo. Action may get interrupted when: - *
  • The bot is triggered with WiredEffectBotFollowHabbo.
  • - *
  • The bot is triggered with WiredEffectBotGiveHandItem.
  • - *
  • The bots in the room are frozen
  • - * - * @param habbo The Habbo to follow. - */ + public void startFollowingHabbo(Habbo habbo) { this.followingHabboId = habbo.getHabboInfo().getId(); @@ -692,20 +541,13 @@ public class Bot implements Runnable this.followingHabboId = 0; } - /** - * Used to load in custom data. - * Implement this method whenever you want data to be loaded from the database - * upon the loading of the BotManager. This is to guarantee database integrity. - * This method must be implemented. Failing to do so will result into a runtime error. - */ + public static void initialise() { } - /** - * Called upon Emulator shutdown. - */ + public static void dispose() { diff --git a/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java b/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java index 46077369..6588cfd8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java @@ -24,11 +24,7 @@ public class BotManager final private static THashMap> botDefenitions = new THashMap>(); - /** - * Loads up the BotManager. Do NOT initialise this class yourself. - * - * Extend from the Bot class and implement 'public static void initialise()' to load data as you see fit. - */ + public BotManager() { long millis = System.currentTimeMillis(); @@ -42,10 +38,7 @@ public class BotManager Emulator.getLogging().logStart("Bot Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); } - /** - * Reloads the bot manager - * @return Returns true if the BotManager has been succesfully reloaded. - */ + public boolean reload() { for(Map.Entry> set : botDefenitions.entrySet()) @@ -71,12 +64,7 @@ public class BotManager return true; } - /** - * Creates a new Bot and inserts it into the database. - * @param data A key-value set of details of the bot (name, motto, figure, gender) - * @param type The type of the bot that must be initialised. - * @return The initialised bot. Returns NULL upon Exception; - */ + public Bot createBot(THashMap data, String type) { Bot bot = null; @@ -118,13 +106,7 @@ public class BotManager return bot; } - /** - * Places a bot at the given location in the given room. - * @param bot The Bot that is being placed. - * @param habbo The Habbo that owns the Bot. - * @param room The Room this Bot is being placed in. - * @param location The given location of the Bot. - */ + public void placeBot(Bot bot, Habbo habbo, Room room, RoomTile location) { BotPlacedEvent event = new BotPlacedEvent(bot, location, habbo); @@ -171,12 +153,7 @@ public class BotManager } } - /** - * Removes a bot from the room. - * Note the owner is being set to the Habbo. - * @param botId The id of the Bot that is being picked up. - * @param habbo The Habbo who picks it. - */ + public void pickUpBot(int botId, Habbo habbo) { if(habbo.getHabboInfo().getCurrentRoom() != null) @@ -185,12 +162,7 @@ public class BotManager } } - /** - * Removes a bot from the room. - * Note the owner is being set to the Habbo. - * @param bot The Bot that is being picked up. - * @param habbo The Habbo who picks it. - */ + public void pickUpBot(Bot bot, Habbo habbo) { if(bot != null && habbo != null) @@ -220,11 +192,7 @@ public class BotManager } } - /** - * Loads a bot from the given ResultSet. - * @param set The set this bot must be initialised from. - * @return The initialised bot. Returns NULL upon SQLException being thrown. - */ + public Bot loadBot(ResultSet set) { try @@ -249,11 +217,7 @@ public class BotManager return null; } - /** - * Deletes a bot from the database. - * @param bot The bot to delete. - * @return true if the bot has been deleted. - */ + public boolean deleteBot(Bot bot) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM bots WHERE id = ? LIMIT 1")) @@ -269,15 +233,7 @@ public class BotManager return false; } - /** - * Add a new bot type in order to implement custom behaviour. - * - * Make sure to extend the Bot class and make the constructor match Bot(ResultSet) - * @param type The name of the bot type. - * @param botClazz The class that needs to be initialised. - * @throws Exception If the bot type already exists. - * If the bot class has no constructor matchin Bot(ResultSet) - */ + public static void addBotDefinition(String type, Class botClazz) throws Exception { if(botClazz.getDeclaredConstructor(ResultSet.class) == null) @@ -292,11 +248,7 @@ public class BotManager } } - /** - * Called upon Emulator shutdown. - * Implement 'public static void dispose()' to pass on this event - * to your custom bot class. - */ + public void dispose() { for(Map.Entry> set : botDefenitions.entrySet()) diff --git a/src/main/java/com/eu/habbo/habbohotel/bots/ButlerBot.java b/src/main/java/com/eu/habbo/habbohotel/bots/ButlerBot.java index 2856cb16..b3740cdc 100644 --- a/src/main/java/com/eu/habbo/habbohotel/bots/ButlerBot.java +++ b/src/main/java/com/eu/habbo/habbohotel/bots/ButlerBot.java @@ -17,11 +17,7 @@ public class ButlerBot extends Bot { public static THashMap, Integer> serveItems = new THashMap, Integer>(); - /** - * This class is a bot that will hand out handitems upon triggering with the correct keys. - * @param set - * @throws SQLException - */ + public ButlerBot(ResultSet set) throws SQLException { super(set); diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogItem.java b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogItem.java index b566132f..93a525e8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogItem.java @@ -15,90 +15,55 @@ import java.util.HashMap; public class CatalogItem implements ISerialize, Runnable, Comparable { - /** - * Unique identifier. - */ + protected int id; - /** - * Page where this item will be displayed. - */ + protected int pageId; - /** - * String representation of the items that are displayed. - */ + protected String itemId; - /** - * Catalog item name. - */ + protected String name; - /** - * The amount of credits this item can be purchased for. - */ + protected int credits; - /** - * The amount of points this item can be purchased for. - */ + protected int points; - /** - * The seasonal currency that is used in order to buy this item. - * Defaults to pixels at 0. - */ + protected short pointsType; - /** - * The amount of times this item will be given when purchased. - */ + protected int amount; - /** - * If this item can be gifted. - */ + protected boolean allowGift = false; - /** - * The total limited stack of this catalog item. - */ + protected int limitedStack; - /** - * The amount of items that have been sold in this limited stack. - */ + protected int limitedSells; - /** - * Extradata can be used to hold more data or set default data for the items bought. - */ + protected String extradata; - /** - * Determines if this item can only be bought by people that have Habbo Club. - */ + protected boolean clubOnly; - /** - * Determines if multiple purchases and thus discount is available. - */ + protected boolean haveOffer; - /** - * The search offer id linked to this catalog item. - */ + protected int offerId; - /** - * Flag to mark this item requiring an update to the database. - */ + protected boolean needsUpdate; - /** - * Contains the amount of items in the bundle. - */ + protected HashMap bundle; public CatalogItem(ResultSet set) throws SQLException @@ -107,11 +72,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable 0; } - /** - * Sell a limited item. - */ + public synchronized void sellRare() { this.limitedSells++; @@ -299,9 +223,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable getBaseItems() { THashSet items = new THashSet<>(); @@ -334,9 +256,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable getBundle() { return this.bundle; } - /** - * Loads the items in a bundle. - */ + public void loadBundle() { int intItemId; @@ -514,11 +430,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable catalogPages; - /** - * All featured items on the frontpage. - */ + public final TIntObjectMap catalogFeaturedPages; - /** - * All the recycler prizes are stored in here. - */ + public final THashMap> prizes; - /** - * All the new gift wrappers are stored in here. - */ + public final THashMap giftWrappers; - /** - * All the old gift wrappers (Seperate furnis) are stored in here. - */ + public final THashMap giftFurnis; - /** - * All the items that can be claimed as club rewards are stored in here. - */ + public final THashSet clubItems; - /** - * All Habbo Club subcription offers. - */ + public final THashMap clubOffers; - /** - * All clothing definitions - */ + public final THashMap clothing; - /** - * Offer definitions. - */ + public final TIntIntHashMap offerDefs; - /** - * All vouchers are stored in here. - */ + private final List vouchers; - /** - * The box that should be given as ecotron reward. - */ + public final Item ecotronItem; - /** - * The numbers available for limited furniture. - */ + public final THashMap limitedNumbers; - /** - * The amount of items that are on sale. - */ + public static int catalogItemAmount; public final THashMap calendarRewards; - /** - * Mapped all page definitions. - */ + public static final THashMap> pageDefinitions = new THashMap>() { { @@ -188,9 +160,7 @@ public class CatalogManager Emulator.getLogging().logStart("Catalog Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); } - /** - * Initializes the CatalogManager. - */ + public synchronized void initialize() { Emulator.getPluginManager().fireEvent(new EmulatorLoadCatalogManagerEvent()); @@ -251,10 +221,7 @@ public class CatalogManager } } - /** - * Load all CatalogPages - * @throws SQLException - */ + private synchronized void loadCatalogPages() throws SQLException { this.catalogPages.clear(); @@ -324,10 +291,7 @@ public class CatalogManager Emulator.getLogging().logStart("Loaded " + this.catalogPages.size() + " Catalog Pages!"); } - /** - * Loads the featured catalog pages. - * @throws SQLException - */ + private synchronized void loadCatalogFeaturedPages() throws SQLException { this.catalogFeaturedPages.clear(); @@ -353,10 +317,7 @@ public class CatalogManager Emulator.getLogging().logSQLException(e); } } - /** - * Load all CatalogItems - * @throws SQLException - */ + private synchronized void loadCatalogItems() throws SQLException { this.clubItems.clear(); @@ -444,10 +405,7 @@ public class CatalogManager } } - /** - * Load all vouchers. - * @throws SQLException - */ + private void loadVouchers() throws SQLException { synchronized (this.vouchers) @@ -464,10 +422,7 @@ public class CatalogManager } } - /** - * Load the recycler. - * @throws SQLException - */ + public void loadRecycler() throws SQLException { synchronized (this.prizes) @@ -501,10 +456,7 @@ public class CatalogManager } } - /** - * Load all gift wrappers (And old gift furnis) - * @throws SQLException - */ + public void loadGiftWrappers() throws SQLException { synchronized (this.giftWrappers) @@ -561,9 +513,7 @@ public class CatalogManager } } - /** - * Loads all clothing. - */ + private void loadClothing() { synchronized (this.clothing) @@ -597,11 +547,7 @@ public class CatalogManager return null; } - /** - * Looks up the given code for any voucher that matches it. - * @param code The code to look up. - * @return The voucher that uses the code. NULL when not found. - */ + public Voucher getVoucher(String code) { synchronized (this.vouchers) @@ -617,11 +563,7 @@ public class CatalogManager return null; } - /** - * Redeem a vouchercode for the given GameClient. - * @param client The GameClient that receives the rewards. - * @param voucherCode The voucher code. - */ + public void redeemVoucher(GameClient client, String voucherCode) { Voucher voucher = Emulator.getGameEnvironment().getCatalogManager().getVoucher(voucherCode); @@ -663,11 +605,7 @@ public class CatalogManager client.sendResponse(new RedeemVoucherErrorComposer(RedeemVoucherErrorComposer.INVALID_CODE)); } - /** - * Deletes an voucher from the database and emulator cache. - * @param voucher The voucher to delete. - * @return True when the voucher has been deleted. - */ + public boolean deleteVoucher(Voucher voucher) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM vouchers WHERE code = ?")) @@ -689,11 +627,7 @@ public class CatalogManager return false; } - /** - * Gets the CatalogPage for the given page Id - * @param pageId The page Id to lookup. - * @return The CatalogPage matching the page Id. NULL When not found. - */ + public CatalogPage getCatalogPage(int pageId) { return this.catalogPages.get(pageId); @@ -724,11 +658,7 @@ public class CatalogManager } } - /** - * Finds the catalog item associated with the id. - * @param id - * @return - */ + public CatalogItem getCatalogItem(int id) { final CatalogItem[] item = {null}; @@ -749,12 +679,7 @@ public class CatalogManager return item[0]; } - /** - * Gets all the sub pages for the given CatalogPage. - * @param parentId The page the sub pages have to bee looked up for. - * @param habbo The Habbo that has access to these pages. - * @return The selected pages. - */ + public List getCatalogPages(int parentId, final Habbo habbo) { final List pages = new ArrayList(); @@ -782,10 +707,7 @@ public class CatalogManager return this.catalogFeaturedPages; } - /** - * @param itemId The CatalogItem that should be lookup. - * @return The CatalogItem for the id. NULL when not found. - */ + public CatalogItem getClubItem(int itemId) { synchronized (this.clubItems) @@ -800,12 +722,7 @@ public class CatalogManager return null; } - /** - * Moves a catalog item to the a different CatalogPage. - * @param item The CatalogItem to move. - * @param pageId The unique identifier of the page. - * @return True if the move has been succesfully. - */ + public boolean moveCatalogItem(CatalogItem item, int pageId) { CatalogPage page = this.getCatalogPage(item.getPageId()); @@ -824,9 +741,7 @@ public class CatalogManager return true; } - /** - * @return Random recycler reward. - */ + public Item getRandomRecyclerPrize() { int level = 1; @@ -860,17 +775,7 @@ public class CatalogManager return null; } - /** - * Creates a new catalog page. - * @param caption The caption of the page. - * @param captionSave Save caption. - * @param roomId The id of the room if the page is a room bundle. - * @param icon The icon of the page. - * @param layout The layout of the page. - * @param minRank The minimum rank that is required to view the page. - * @param parentId The id of the parent page. - * @return The created CatalogPage. - */ + public CatalogPage createCatalogPage(String caption, String captionSave, int roomId, int icon, CatalogPageLayouts layout, int minRank, int parentId) { CatalogPage catalogPage = null; @@ -933,10 +838,7 @@ public class CatalogManager return catalogPage; } - /** - * @param item The CatalogItem to find the limited configuration for. - * @return The limited configuration for the CatalogItem. - */ + public CatalogLimitedConfiguration getLimitedConfig(CatalogItem item) { synchronized (this.limitedNumbers) @@ -945,11 +847,7 @@ public class CatalogManager } } - /** - * Creates or updates the CatalogLimitedConfiguration for the given CatalogItem. - * @param item The CatalogItem to create or update hte CatalogLimitedConfiguration for. - * @return The created or updated CatalogLimitedConfiguration. - */ + public CatalogLimitedConfiguration createOrUpdateLimitedConfig(CatalogItem item) { if (item.isLimited()) @@ -987,9 +885,7 @@ public class CatalogManager return null; } - /** - * Disposes the CatalogManager. - */ + public void dispose() { TIntObjectIterator pageIterator = this.catalogPages.iterator(); @@ -1011,15 +907,7 @@ public class CatalogManager Emulator.getLogging().logShutdownLine("Catalog Manager -> Disposed!"); } - /** - * Purchases a catalog item. - * @param page The page to purchase from. - * @param item The CatalogItem to purchase. - * @param habbo The Habbo that purchased this CatalogItem. - * @param amount The amount of times the item should be bought. - * @param extradata Any extradataassociated. - * @param free Determines if this purchase is free and thus no credits / points will be deducted. - */ + public void purchaseItem(CatalogPage page, CatalogItem item, Habbo habbo, int amount, String extradata, boolean free) { Item cBaseItem = null; @@ -1079,12 +967,7 @@ public class CatalogManager THashSet itemsList = new THashSet(); - /* - Scripting protection that prevents users from buying multiple items - when offer is not enabled for the item. - Automatically creates a new ModToolIssue and sends it to the online moderators. - */ if(amount > 1 && !item.isHaveOffer()) { String message = Emulator.getTexts().getValue("scripter.warning.catalog.amount").replace("%username%", habbo.getHabboInfo().getUsername()).replace("%itemname%", item.getName()).replace("%pagename%", page.getCaption()); diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageLayouts.java b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageLayouts.java index 916a30d0..4791e652 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageLayouts.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageLayouts.java @@ -2,179 +2,109 @@ package com.eu.habbo.habbohotel.catalog; public enum CatalogPageLayouts { - /** - * Default page, used most of the time. - */ + default_3x3, - /** - * The page that you can buy Guild furniture from. - */ + guild_furni, - /** - * The page that allows you to buy a Guild. - */ + guilds, - /** - * The page that allows you to buy a forum for your Guild. - */ + guild_forum, - /** - * The page with information about duckets. - */ + info_duckets, - /** - * The page with information about rentables. - */ + info_rentables, - /** - * The page with information about loyalty programme. - */ + info_loyalty, - /** - * The page you can buy VIP with loyalty points. - */ + loyalty_vip_buy, - /** - * The page where you can buy bots from. - */ + bots, - /** - * Pets - */ + pets, - /** - * Petss - */ + pets2, - /** - * Petsss - */ + pets3, - /** - * The page where you can claim club gifts. - */ + club_gift, - /** - * The front page. Without it, there is nothing. /s - */ + frontpage, - /** - * The page where you can buy those fancy badge displays. - */ + badge_display, - /** - * The new spaces layout. - */ + spaces_new, - /** - * Trax - */ + soundmachine, - /** - * Info about pets. - */ + info_pets, - /** - * The page where you can buy Habbo Club from. - */ + club_buy, - /** - * Roomads are being sold here. - */ + roomads, - /** - * Trophies page. - */ + trophies, - /** - * Single bundle for single people. - */ + single_bundle, - /** - * The Marketplace. - */ + marketplace, - /** - * Lists your own Marketplace items. - */ + marketplace_own_items, - /** - * The Recycler (Or ecotron) - */ + recycler, - /** - * Info, for the people that don't know how to drag 'n drop. - */ + recycler_info, - /** - * All the rewards you can get from the Recycler (Or ecotron) - */ + recycler_prizes, - /** - * The page where all the sold out LTDs go. - */ + sold_ltd_items, - /** - * This is gone in the newer PRODUCTION versions, unfortunately. - */ + plasto, - /** - * Color grouping using the default page. - */ + default_3x3_color_grouping, - /** - * Page where your recent purchases reside. - */ + recent_purchases, - /** - * Room Bundles - */ + room_bundle, - /** - * Pet Customization like pet color dyes - */ + petcustomization, - /** - * Root page. Do not use! - */ + root, - /** - * The page where you can buy Habbo VIP from. - */ + vip_buy, frontpage_featured, diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageType.java b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageType.java index 0163a344..4cc3fc6d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageType.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/CatalogPageType.java @@ -2,13 +2,9 @@ package com.eu.habbo.habbohotel.catalog; public enum CatalogPageType { - /** - * NORMAL Catalog - */ + NORMAL, - /** - * BUILDER Catalog (Not implemented yet!) - */ + BUILDER } diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/ClothItem.java b/src/main/java/com/eu/habbo/habbohotel/catalog/ClothItem.java index f8c10c24..21fd32bf 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/ClothItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/ClothItem.java @@ -5,19 +5,13 @@ import java.sql.SQLException; public class ClothItem { - /** - * Identifier. - */ + public int id; - /** - * Name - */ + public String name; - /** - * Set - */ + public int[] setId; public ClothItem(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/ClubOffer.java b/src/main/java/com/eu/habbo/habbohotel/catalog/ClubOffer.java index 4023e4b2..b9b4be53 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/ClubOffer.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/ClubOffer.java @@ -5,44 +5,28 @@ import java.sql.SQLException; public class ClubOffer { - /** - * Id of the offer. - */ + private final int id; - /** - * Name of the offer - */ + private final String name; - /** - * Total days - */ + private final int days; - /** - * Price in credits. - */ + private final int credits; - /** - * Price in points. - */ + private final int points; - /** - * Points type. - */ + private final int pointsType; - /** - * Is VIP (Legacy) - */ + private final boolean vip; - /** - * If the ClubOffer is an extension deal. - */ + private final boolean deal; public ClubOffer(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/Voucher.java b/src/main/java/com/eu/habbo/habbohotel/catalog/Voucher.java index 8dc0de80..f3a07ec4 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/Voucher.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/Voucher.java @@ -5,41 +5,25 @@ import java.sql.SQLException; public class Voucher { - /** - * Voucher ID - */ + private final int id; - /** - * Code - */ + public final String code; - /** - * Reward credits. - */ + public final int credits; - /** - * Reward points. - */ + public final int points; - /** - * Points type - */ + public final int pointsType; - /** - * Item from the catalog. - */ + public final int catalogItemId; - /** - * Constructs a new Voucher. - * @param set The ResultSet to read the data from. - * @throws SQLException - */ + public Voucher(ResultSet set) throws SQLException { this.id = set.getInt("id"); diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BadgeDisplayLayout.java b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BadgeDisplayLayout.java index ad094f30..8de0220e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BadgeDisplayLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BadgeDisplayLayout.java @@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Class for the interactive badge display catalog page. - */ + public class BadgeDisplayLayout extends CatalogPage { public BadgeDisplayLayout(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BotsLayout.java b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BotsLayout.java index 58b5eec0..c7d6e09b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BotsLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BotsLayout.java @@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Class for the bots page. - */ + public class BotsLayout extends CatalogPage { public BotsLayout(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubAddonsLayout.java b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubAddonsLayout.java index 4c208d77..e393d37c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubAddonsLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubAddonsLayout.java @@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Class for the page where additional buildersclub addons can be bought. - */ + public class BuildersClubAddonsLayout extends CatalogPage { public BuildersClubAddonsLayout(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubFrontPageLayout.java b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubFrontPageLayout.java index 374f1f14..e82d8ea9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubFrontPageLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubFrontPageLayout.java @@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Class for the frontpage of the buildersclub. - */ + public class BuildersClubFrontPageLayout extends CatalogPage { public BuildersClubFrontPageLayout(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubLoyaltyLayout.java b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubLoyaltyLayout.java index 11003b02..2925a055 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubLoyaltyLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubLoyaltyLayout.java @@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Class for the buildersclub rewards page. - */ + public class BuildersClubLoyaltyLayout extends CatalogPage { public BuildersClubLoyaltyLayout(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java index 780ec838..da3a8db8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java @@ -24,12 +24,7 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -/** - * Note: A lot of data in here is not cached in the emulator but rather loaded from the database. - * If you have a big hotel and the marketplace is used frequently this may cause some lagg. - * If you have issues with that please let us know so we can see if we need to modify the Marketplace so - * it caches the data in the Emulator. - */ + public class MarketPlace { //Configuration. Loaded from database & updated accordingly. @@ -38,10 +33,7 @@ public class MarketPlace //Currency to use. public static int MARKETPLACE_CURRENCY = 0; - /** - * @param habbo The Habbo to lookup items for. - * @return The items that are put on marketplace by the given Habbo. - */ + public static THashSet getOwnOffers(Habbo habbo) { THashSet offers = new THashSet(); @@ -64,11 +56,7 @@ public class MarketPlace return offers; } - /** - * Removes an offer from the marketplace. - * @param habbo The Habbo that owns the item. - * @param offerId The offer id. - */ + public static void takeBackItem(Habbo habbo, int offerId) { MarketPlaceOffer offer = habbo.getInventory().getOffer(offerId); @@ -79,11 +67,7 @@ public class MarketPlace } } - /** - * Removes an offer from the marketplace. - * @param habbo The Habbo that owns the item. - * @param offer The offer. - */ + private static void takeBackItem(Habbo habbo, MarketPlaceOffer offer) { if(offer != null && habbo.getInventory().getMarketplaceItems().contains(offer)) @@ -147,34 +131,13 @@ public class MarketPlace } } - /** - * Searches the marketplace for specific items in the given price range. - * @param minPrice The minimum price of the offers. - * @param maxPrice The maximum price of the offers - * @param search The search criteria for the offers. - * @param sort The sort criteria for the offers. - * @return The result of the search. - */ + public static List getOffers(int minPrice, int maxPrice, String search, int sort) { List offers = new ArrayList<>(10); //String query = "SELECT items_base.type AS type, items.item_id AS base_item_id, items.limited_data AS ltd_data, marketplace_items.*, COUNT(*) as number, AVG(price) as avg, MIN(price) as minPrice FROM marketplace_items INNER JOIN items ON marketplace_items.item_id = items.id INNER JOIN items_base ON items.item_id = items_base.id WHERE state = ? AND timestamp >= ?"; - /*String query = "SELECT " + - "B.* FROM marketplace_items a " + - "INNER JOIN (SELECT " + - "items_base.type AS type, " + - "items.item_id AS base_item_id, " + - "items.limited_data AS ltd_data, " + - "marketplace_items.*, " + - "AVG(price) as avg, " + - "MIN(marketplace_items.price) as minPrice, " + - "MAX(marketplace_items.price) as maxPrice, " + - "COUNT(*) as number " + - "FROM marketplace_items " + - "INNER JOIN items ON marketplace_items.item_id = items.id " + - "INNER JOIN items_base ON items.item_id = items_base.id " + - "WHERE state = 1 AND timestamp > ?";*/ + String query = "SELECT " + "B.* FROM marketplace_items a " + @@ -270,11 +233,7 @@ public class MarketPlace return offers; } - /** - * Serializes the item info. - * @param itemId The item id that should be looked up. - * @param message The message the data should be appended to. - */ + public static void serializeItemInfo(int itemId, ServerMessage message) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT avg(price) as price, COUNT(*) as sold, (datediff(NOW(), DATE(from_unixtime(timestamp)))) as day FROM marketplace_items INNER JOIN items ON items.id = marketplace_items.item_id INNER JOIN items_base ON items.item_id = items_base.id WHERE items.limited_data = '0:0' AND state = 2 AND items_base.sprite_id = ? AND DATE(from_unixtime(timestamp)) >= NOW() - INTERVAL 30 DAY GROUP BY DATE(from_unixtime(timestamp))")) @@ -308,10 +267,7 @@ public class MarketPlace } } - /** - * @param baseItemId The base item id that should be looked up. (items_base table) - * @return The amount of items of this type are on sale. - */ + public static int itemsOnSale(int baseItemId) { int number = 0; @@ -333,11 +289,7 @@ public class MarketPlace return number; } - /** - * @param baseItemId The base item id that should be looked up. (items_base table) - * @param days The amount of days. - * @return The average amount of coins this item was over the given amount of days. - */ + private static int avarageLastXDays(int baseItemId, int days) { int avg = 0; @@ -360,11 +312,7 @@ public class MarketPlace return calculateCommision(avg); } - /** - * Buys an item from the marketplace. - * @param offerId The offer id that should be bought. - * @param client The GameClient that buys it. - */ + public static void buyItem(int offerId, GameClient client) { RequestOffersEvent.cachedResults.clear(); @@ -451,14 +399,7 @@ public class MarketPlace } } - /** - * Sends an error message to the client. If the items was sold out or - * if the previous one isn't on sale anymore then it shows the new price. - * @param client The GameClient the messages should be send to. - * @param baseItemId The Item id data selected from the marketplace_offers table. - * @param offerId The id of the offer that was bought. - * @throws SQLException - */ + public static void sendErrorMessage(GameClient client, int baseItemId, int offerId) throws SQLException { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT marketplace_items.*, COUNT( * ) AS count\n" + @@ -487,13 +428,7 @@ public class MarketPlace } } - /** - * Sells an item to the marketplace. - * @param client The GameClient that sells it. - * @param item The HabboItem that is being sold. - * @param price The price it is being sold for. - * @return Whether it has succesfully been posted to the marketplace. - */ + public static boolean sellItem(GameClient client, HabboItem item, int price) { if(item == null || client == null) @@ -533,10 +468,7 @@ public class MarketPlace return true; } - /** - * Claims all the credits that are gained from selling items on the marketplace. - * @param client The GameClient the credits should be checked for. - */ + public static void getCredits(GameClient client) { int credits = 0; @@ -583,11 +515,7 @@ public class MarketPlace } } - /** - * Calculates the commission that is being added for the given price. - * @param price The price to calculate the commission for. - * @return The new price including the commission. - */ + public static int calculateCommision(int price) { return price + (int)Math.ceil(price / 100.0); diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlaceState.java b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlaceState.java index 6ff0d521..536b6157 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlaceState.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlaceState.java @@ -2,20 +2,13 @@ package com.eu.habbo.habbohotel.catalog.marketplace; public enum MarketPlaceState { - /** - * When the offer is available to be bought. - */ + OPEN(1), - /** - * When the offer has been sold. - */ + SOLD(2), - /** - * When the offer has been expired. - * When the offer has been cancelled. - */ + CLOSED(3); private final int state; @@ -30,11 +23,7 @@ public enum MarketPlaceState return this.state; } - /** - * Gets the offer state for the type. - * @param type The type to look for. - * @return The offer state defaults to CLOSED - */ + public static MarketPlaceState getType(int type) { switch(type) diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/AboutCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/AboutCommand.java index 010c2127..0ddff47d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/AboutCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/AboutCommand.java @@ -7,11 +7,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer; import java.util.concurrent.TimeUnit; -/** - * This is part of the open source license. Modification is prohobited. - * If you don't like it, use another emulator. Or otherwise deal with it. - * Respect the authors work. Don't be a dick. - */ + public class AboutCommand extends Command { public AboutCommand() diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/Command.java b/src/main/java/com/eu/habbo/habbohotel/commands/Command.java index 9490e449..1194f7c6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/Command.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/Command.java @@ -4,18 +4,10 @@ import com.eu.habbo.habbohotel.gameclients.GameClient; public abstract class Command { - /** - * Permission string the executor must have in order to access the command. - */ + public final String permission; - /** - * All keys the command can be exectuted from. - *

    - * Example: - * :userinfo TheGeneral - *

    - */ + public final String[] keys; public Command(String permission, String[] keys) @@ -24,12 +16,6 @@ public abstract class Command this.keys = keys; } - /** - * Executes an command for a given gameClient. - * @param gameClient The GameClient who executes the command. - * @param params Array of parameters given in the command. - * @return Returns true if the user should NOT say anything in the room. - * @throws Exception - */ + public abstract boolean handle(GameClient gameClient, String[] params) throws Exception; } \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java b/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java index e2603d17..06ed1f39 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java @@ -140,10 +140,7 @@ public class CommandHandler addCommand(new TestCommand()); } - /** - * Adds a new command to the commands list. - * @param command The command to be added. - */ + public static void addCommand(Command command) { if(command == null) @@ -152,10 +149,7 @@ public class CommandHandler commands.put(command.getClass().getName(), command); } - /** - * Adds a new command to the commands list. - * @param command The command class to be added. - */ + public static void addCommand(Class command) { try @@ -170,13 +164,7 @@ public class CommandHandler } } - /** - * Handles a command executed by the connected GameClient. - * This includes handling the petcommands aswell. - * @param gameClient The GameClient that executed the command. - * @param commandLine The whole sentence the GameClient used including the start: - * @return Wether the command has been succesfully executed. - */ + public static boolean handleCommand(GameClient gameClient, String commandLine) { if(gameClient != null) @@ -290,11 +278,7 @@ public class CommandHandler return false; } - /** - * Returns an arraylist of all commands that the given rank has access to based on the permissions that have been set. - * @param rankId The rank ID to search commands for. - * @return ArrayList of commands. - */ + public List getCommandsForRank(int rankId) { List allowedCommands = new ArrayList(); @@ -335,9 +319,7 @@ public class CommandHandler return null; } - /** - * Disposes the CommandHandler. - */ + public void dispose() { commands.clear(); @@ -345,9 +327,7 @@ public class CommandHandler Emulator.getLogging().logShutdownLine("Command Handler -> Disposed!"); } - /** - * Sort all commands based on their permission in alphabetical order. - */ + private static final Comparator ALPHABETICAL_ORDER = new Comparator() { public int compare(Command c1, Command c2) { int res = String.CASE_INSENSITIVE_ORDER.compare(c1.permission, c2.permission); diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/FacelessCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/FacelessCommand.java index c01b5731..ed6dbf61 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/FacelessCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/FacelessCommand.java @@ -5,9 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient; import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer; -/** - * Kudos to Wouto on RaGEZONE - */ + public class FacelessCommand extends Command { public FacelessCommand() diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/TestCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/TestCommand.java index a593c37e..bcf7eed6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/TestCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/TestCommand.java @@ -452,100 +452,13 @@ public class TestCommand extends Command } - /*if(params[1].equalsIgnoreCase("r")) - { - gameClient.getHabbo().getRoomUnit().getStatus().remove(params[2]); - return true; - } - String s = ""; - for(int i = 2; i < params.length; i++) - { - s+= params[i]; - if(i + 1 < params.length) - { - s+= " "; - } - } - - gameClient.getHabbo().getRoomUnit().getStatus().put(params[1], s); - gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserStatusComposer(gameClient.getHabbo().getRoomUnit()).compose());*/ //if(params.length >= 2) //{ // gameClient.sendResponse(new RoomUserActionComposer(gameClient.getHabbo().getRoomUnit(), Integer.valueOf(params[1]))); //} - /*if(params.length < 2) - return false; - /* - :test 1604 i:0 s:a i:1 i:2 i:3 i: 4 s:b i:3 i:1 i:1 s:Admin s:a s:M i:0 i:0 i:0 i:0 - if(params[1].equalsIgnoreCase("purple")) - { - AbstractPet pet = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getPet(13); - - if(pet instanceof Pet) - { - String a = ""; - String b = ""; - String c = ""; - if(params[2] != null) - { - a = params[2]; - if(params.length >= 4) - { - b = params[3]; - } - if(params.length >= 5) - { - c = params[4]; - } - pet.getRoomUnit().getStatus().put(a, b + " " + c); - gameClient.sendResponse(new RoomUserStatusComposer(pet.getRoomUnit())); - } - } - } - else if(params[1].equalsIgnoreCase("clear")) - { - AbstractPet pet = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getPet(13); - - if(pet instanceof Pet) - { - pet.getRoomUnit().getStatus().clear(); - gameClient.sendResponse(new RoomUserStatusComposer(pet.getRoomUnit())); - } - } - else if(params[1].equalsIgnoreCase("club")) - { - gameClient.sendResponse(new ClubDataComposer(gameClient.getHabbo(), Integer.valueOf(params[2]))); - return true; - } - int header = Integer.valueOf(params[1]); - - ServerMessage message = new ServerMessage(); - message.init(header); - - for (int i = 2; i < params.length; i++) - { - String[] data = params[i].split(":"); - System.out.println(data.length + "//"); - if (data[0].equals("i")) - { - message.appendInt(Integer.valueOf(data[1])); - } else if (data[0].equals("s")) - { - if(data[1].equalsIgnoreCase("%look%")) - { - data[1] = gameClient.getHabbo().getHabboInfo().getLook(); - } - message.appendString(data[1]); - } else if (data[0].equals("b")) - { - message.appendBoolean(data[1].equalsIgnoreCase("1")); - } - - } - gameClient.sendResponse(message);*/ //} //int header = Integer.valueOf(params[1]); @@ -559,28 +472,7 @@ public class TestCommand extends Command //gameClient.sendResponse(new SnowWarsCompose1(1604)); //gameClient.sendResponse(new SnowWarsLevelDataComposer()); - /* - ServerMessage response = new ServerMessage(); - response.init(Outgoing.RoomUsersComposer); - response.appendInt(1); - response.appendInt(0); - response.appendString(""); - response.appendString(""); - response.appendString(""); - response.appendInt(0); //Room Unit ID - response.appendInt(10); - response.appendInt(10); - response.appendString(""); - response.appendInt(0); - response.appendInt(200); - response.appendString(this.habbo.getHabboInfo().getGender()); - response.appendInt(this.habbo.getHabboStats().guild != 0 ? this.habbo.getHabboStats().guild : -1); - response.appendInt(this.habbo.getHabboStats().guild != 0 ? 1 : -1); - response.appendString(this.habbo.getHabboStats().guild != 0 ? Emulator.getGameEnvironment().getGuildManager().getGuild(this.habbo.getHabboStats().guild).getName() : ""); - response.appendString(""); - response.appendInt(this.habbo.getHabboInfo().getAchievementScore()); - response.appendBoolean(true); - }*/ + return true; } diff --git a/src/main/java/com/eu/habbo/habbohotel/crafting/CraftingManager.java b/src/main/java/com/eu/habbo/habbohotel/crafting/CraftingManager.java index a1f35760..63fcbdda 100644 --- a/src/main/java/com/eu/habbo/habbohotel/crafting/CraftingManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/crafting/CraftingManager.java @@ -13,11 +13,7 @@ import java.util.Map; public class CraftingManager { - /* - crafting_altars_recipes - crafting_recipes - crafting_recipes_ingredients - */ + private final THashMap altars; public CraftingManager() diff --git a/src/main/java/com/eu/habbo/habbohotel/gameclients/GameClient.java b/src/main/java/com/eu/habbo/habbohotel/gameclients/GameClient.java index 36c8660c..d1a9bbf4 100644 --- a/src/main/java/com/eu/habbo/habbohotel/gameclients/GameClient.java +++ b/src/main/java/com/eu/habbo/habbohotel/gameclients/GameClient.java @@ -20,19 +20,13 @@ import java.util.ArrayList; public class GameClient { - /** - * The Channel this client is using. - */ + private final Channel channel; - /** - * The Habbo it is linked to. - */ + private Habbo habbo; - /** - * The MAC Address of the connected client. - */ + private String machineId = ""; public GameClient(Channel channel) @@ -40,10 +34,7 @@ public class GameClient this.channel = channel; } - /** - * Sends an composer to the client. - * @param composer The composer to send. - */ + public void sendResponse(MessageComposer composer) { if(this.channel.isOpen()) @@ -59,10 +50,7 @@ public class GameClient } } - /** - * Sends an response to the client. - * @param response The response to send. - */ + public void sendResponse(ServerMessage response) { if(this.channel.isOpen()) @@ -80,10 +68,7 @@ public class GameClient } } - /** - * Sends multiple responses to the client. - * @param responses The responses to send. - */ + public void sendResponses(ArrayList responses) { ByteBuf buffer = Unpooled.buffer(); @@ -108,9 +93,7 @@ public class GameClient buffer.release(); } - /** - * Disposes the client. Disconnection mostly. - */ + public void dispose() { try diff --git a/src/main/java/com/eu/habbo/habbohotel/games/Game.java b/src/main/java/com/eu/habbo/habbohotel/games/Game.java index 3d384b94..74005226 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/Game.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/Game.java @@ -20,44 +20,28 @@ import java.util.Map; public abstract class Game implements Runnable { - /** - * The class that should be used that defines teams. - */ + public final Class gameTeamClazz; - /** - * The class that should be used that defines a player. - */ + public final Class gamePlayerClazz; - /** - * All the teams. - */ + protected final THashMap teams = new THashMap(); - /** - * The room this game is affected by. - */ + protected Room room; - /** - * Should this game progress any achievements. - */ + protected boolean countsAchievements; - /** - * Time the game started. - */ + protected int startTime; - /** - * Time the game ended. - */ + protected int endTime; - /** - * Wether the game is running. - */ + public boolean isRunning; public Game(Class gameTeamClazz, Class gamePlayerClazz, Room room, boolean countsAchievements) @@ -68,19 +52,10 @@ public abstract class Game implements Runnable this.countsAchievements = countsAchievements; } - /** - * Should reset the game to it's default state and call start() when done initialising. - * Only call start if you need to start a game. - */ + public abstract void initialise(); - /** - * When overridden call super first! - * Adds a particular Habbo to a specific team. - * @param habbo The Habbo to add to an team. - * @param teamColor The teamcolor to add the Habbo too. - * @return True when user has joined the game. - */ + public boolean addHabbo(Habbo habbo, GameTeamColors teamColor) { try @@ -121,14 +96,7 @@ public abstract class Game implements Runnable return false; } - /** - * When overridden call super first! - * Removes an Habbo when the following events occur: - *
  • The Habbo gets disconnected.
  • - *
  • The Habbo leaves the room.
  • - *
  • The Habbo triggers leave team wired.
  • - * @param habbo The Habbo to be removed. - */ + public void removeHabbo(Habbo habbo) { if (habbo != null) @@ -172,10 +140,7 @@ public abstract class Game implements Runnable } } - /** - * This method should start a game. Make sure to call super.start() - * to register the time the game was started. - */ + public void start() { this.isRunning = true; @@ -190,18 +155,10 @@ public abstract class Game implements Runnable WiredHandler.handle(WiredTriggerType.GAME_STARTS, null, this.room, new Object[]{this}); } - /** - * Main game loop. - */ + public abstract void run(); - /** - * Should stop the game. - * - * Called upon room unload or when the timer runs out. - * - * Make sure to call super.stop() when overriden to save the scores to the database. - */ + public void stop() { this.isRunning = false; @@ -223,11 +180,7 @@ public abstract class Game implements Runnable } } - /** - * Saves all scores to the game. - * Used for the Wired Highscores. - * Must have set the room. - */ + private void saveScores() { if(this.room == null) @@ -239,11 +192,7 @@ public abstract class Game implements Runnable } } - /** - * Gets the team for the given Habbo. - * @param habbo The Habbo to look for the team. - * @return The team the Habbo is in. - */ + public GameTeam getTeamForHabbo(Habbo habbo) { if(habbo != null) @@ -263,11 +212,7 @@ public abstract class Game implements Runnable return null; } - /** - * Get the team by the team color. - * @param teamColor The teamcolor to look up. - * @return The team for the given team color. - */ + public GameTeam getTeam(GameTeamColors teamColor) { synchronized (this.teams) @@ -276,11 +221,7 @@ public abstract class Game implements Runnable } } - /** - * Adds a new team to the game. - * Note: Overwrites any existing team for the team.teamColor - * @param team The team to add. - */ + public void addTeam(GameTeam team) { synchronized (this.teams) @@ -289,34 +230,25 @@ public abstract class Game implements Runnable } } - /** - * @return The room this game is affected by. - */ + public Room getRoom() { return this.room; } - /** - * @return The time the game was started. - */ + public int getStartTime() { return this.startTime; } - /** - * @return Last time this game ended. - */ + public int getEndTime() { return this.endTime; } - /** - * Adds time to the current game. - * @param time The amount of time to add. - */ + public void addTime(int time) { this.endTime += time; diff --git a/src/main/java/com/eu/habbo/habbohotel/games/GamePlayer.java b/src/main/java/com/eu/habbo/habbohotel/games/GamePlayer.java index 1fbb7c7b..94cf50c0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/GamePlayer.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/GamePlayer.java @@ -6,76 +6,48 @@ import com.eu.habbo.habbohotel.wired.WiredTriggerType; public class GamePlayer { - /** - * The Habbo that is linked to the game player. - */ + private Habbo habbo; - /** - * The team color of this player. - */ + private GameTeamColors teamColor; - /** - * The score of this player. - * - * This score gets saved at the end of a game for the Wired HighScore furniture. - */ + private int score; - /** - * Creates a new GamePlayer for the given Habbo and it's team. - * @param habbo The Habbo who is linked to this GamePlayer. - * @param teamColor The team the GamePlayer is in. - */ + public GamePlayer(Habbo habbo, GameTeamColors teamColor) { this.habbo = habbo; this.teamColor = teamColor; } - /** - * Resets the GamePlayer object to it's 'default' state. - * This method will be called by the emulator: - *
      - *
    • The game starts.
    • - *
    • The game ends.
    • - *
    - */ + public void reset() { this.score = 0; } - /** - * Adds an given amount of score to this object. - * @param amount The amount of score to add. - */ + public synchronized void addScore(int amount) { this.score += amount; WiredHandler.handle(WiredTriggerType.SCORE_ACHIEVED, null, this.habbo.getHabboInfo().getCurrentRoom(), new Object[]{this.habbo.getHabboInfo().getCurrentRoom().getGame(this.habbo.getHabboInfo().getCurrentGame()).getTeamForHabbo(this.habbo).getTotalScore(), amount}); } - /** - * @return The Habbo linked to this object. - */ + public Habbo getHabbo() { return this.habbo; } - /** - * @return The GameTeamColor for this object. - */ + public GameTeamColors getTeamColor() { return this.teamColor; } - /** - * @return The score amount for this object. - */ + public int getScore() { return this.score; diff --git a/src/main/java/com/eu/habbo/habbohotel/games/GameTeam.java b/src/main/java/com/eu/habbo/habbohotel/games/GameTeam.java index f58ad281..c606835e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/GameTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/GameTeam.java @@ -8,25 +8,16 @@ import gnu.trove.set.hash.THashSet; public class GameTeam { - /** - * List of all players in this team. - */ + private final THashSet members; - /** - * The team color of this team. - */ + public final GameTeamColors teamColor; - /** - * The total score of this team. - */ + private int teamScore; - /** - * Creates an new GameTeam with the given team color. - * @param teamColor The team color this GameTeam is identified by. - */ + public GameTeam(GameTeamColors teamColor) { this.teamColor = teamColor; @@ -34,9 +25,7 @@ public class GameTeam this.members = new THashSet(); } - /** - * Initialises the team and resets each player to it's default state. - */ + public void initialise() { for(GamePlayer player : this.members) @@ -47,34 +36,25 @@ public class GameTeam this.teamScore = 0; } - /** - * Resets this team by clearing all members in the team. - */ + public void reset() { this.members.clear(); } - /** - * Adds an given amount of score to the team score. - * @param teamScore The amount of score that will be added. - */ + public void addTeamScore(int teamScore) { this.teamScore += teamScore; } - /** - * @return The team score of this team. - */ + public int getTeamScore() { return this.teamScore; } - /** - * @return The sum of each team members score + the team score. - */ + public synchronized int getTotalScore() { int score = this.teamScore; @@ -87,10 +67,7 @@ public class GameTeam return score; } - /** - * Adds an GamePlayer to the team. - * @param gamePlayer The GamePlayer that needs to be added. - */ + public void addMember(GamePlayer gamePlayer) { synchronized (this.members) @@ -99,10 +76,7 @@ public class GameTeam } } - /** - * Removes an GamePlayer from the team. - * @param gamePlayer The GamePlayer that needs to be removed. - */ + public void removeMember(GamePlayer gamePlayer) { synchronized (this.members) @@ -111,19 +85,13 @@ public class GameTeam } } - /** - * @return An collection of all GamePlayers. - */ + public THashSet getMembers() { return this.members; } - /** - * Checks wether the given Habbo is part of this team. - * @param habbo The habbo to check. - * @return True when the given Habbo is part of the team. - */ + public boolean isMember(Habbo habbo) { for(GamePlayer p : this.members) @@ -137,11 +105,7 @@ public class GameTeam return false; } - /** - * Gets the GamePlayer object for the given Habbo. - * @param habbo The habbo to get the GamePlayer object for. - * @return The GamePlayer for the given Habbo. If not present returns null. - */ + @Deprecated public GamePlayer getPlayerForHabbo(Habbo habbo) { diff --git a/src/main/java/com/eu/habbo/habbohotel/games/GameTeamColors.java b/src/main/java/com/eu/habbo/habbohotel/games/GameTeamColors.java index f84d39d0..2b41d8af 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/GameTeamColors.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/GameTeamColors.java @@ -2,29 +2,19 @@ package com.eu.habbo.habbohotel.games; public enum GameTeamColors { - /** - * Team Red. - */ + RED(0), - /** - * Team Green. - */ + GREEN(1), - /** - * Team Blue. - */ + BLUE(2), - /** - * Team Yellow. - */ + YELLOW(3), - /** - * Additional GameTeamColors - */ + NONE(4), ONE(5), @@ -38,9 +28,7 @@ public enum GameTeamColors NINE(13), TEN(14); - /** - * The type of the TeamColor. Aka identifier. - */ + public final int type; GameTeamColors(int type) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java index 607c12c5..447c2c1f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java @@ -31,24 +31,16 @@ import java.util.Map; public class BattleBanzaiGame extends Game { - /** - * The effect id BB effects start at. - */ + public static final int effectId = 33; - /** - * Points for hijacking another users tile. - */ + public static final int POINTS_HIJACK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.steal"); - /** - * Points for coloring a grey tile. - */ + public static final int POINTS_FILL_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.fill"); - /** - * Points for locking a tile. - */ + public static final int POINTS_LOCK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.lock"); private int timeLeft; @@ -57,9 +49,7 @@ public class BattleBanzaiGame extends Game private int countDown; - /** - * All locked tiles. - */ + private final THashMap> lockedTiles; public BattleBanzaiGame(Room room) @@ -285,9 +275,7 @@ public class BattleBanzaiGame extends Game this.lockedTiles.clear(); } - /** - * Resets the map. - */ + protected synchronized void resetMap() { for (HabboItem item : this.room.getFloorItems()) @@ -342,11 +330,7 @@ public class BattleBanzaiGame extends Game } } - /** - * Locks an tile - * @param teamColor The color to lock. - * @param item The item to lock. - */ + public void tileLocked(GameTeamColors teamColor, HabboItem item, Habbo habbo) { if(item instanceof InteractionBattleBanzaiTile) @@ -365,9 +349,7 @@ public class BattleBanzaiGame extends Game } } - /** - * Updates the counters in the room. - */ + public void refreshCounters() { for(GameTeam team : this.teams.values()) @@ -379,10 +361,7 @@ public class BattleBanzaiGame extends Game } } - /** - * Updates the counters for the given GameTeamColors in the room. - * @param teamColors The color that should be updated. - */ + public void refreshCounters(GameTeamColors teamColors) { int totalScore = this.teams.get(teamColors).getTotalScore(); diff --git a/src/main/java/com/eu/habbo/habbohotel/games/football/FootballGame.java b/src/main/java/com/eu/habbo/habbohotel/games/football/FootballGame.java index 6d0f44db..b9cf2509 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/football/FootballGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/football/FootballGame.java @@ -13,9 +13,7 @@ import com.eu.habbo.messages.outgoing.rooms.users.RoomUserActionComposer; import java.util.Map; -/** - * Thanks to Beny for adding football game to Arcturus! - */ + public class FootballGame extends Game { private Room room; diff --git a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java index 91aacf01..5c03be0f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGamePlayer.java @@ -51,9 +51,7 @@ public class FreezeGamePlayer extends GamePlayer } } - /* - Freeze - */ + public void addLife() { if(this.lives < FreezeGame.MAX_LIVES) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/tag/IceTagGame.java b/src/main/java/com/eu/habbo/habbohotel/games/tag/IceTagGame.java index da606ebc..065fc706 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/tag/IceTagGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/tag/IceTagGame.java @@ -5,161 +5,7 @@ import com.eu.habbo.habbohotel.items.interactions.games.tag.InteractionTagPole; import com.eu.habbo.habbohotel.items.interactions.games.tag.icetag.InteractionIceTagPole; import com.eu.habbo.habbohotel.rooms.Room; -/*public class IceTagGame extends Game -{ - private static final int MALE_SKATES = 38; - private static final int FEMALE_SKATES = 39; - public boolean hasIceTagGame = false; - - public IceTagGame(Room room) throws Exception - { - super(null, null, room); - } - - @Override - public void initialise() - { - - } - - @Override - public boolean addHabbo(Habbo habbo, GameTeamColors teamColor) - { - return super.addHabbo(habbo, teamColor); - } - - @Override - public void removeHabbo(Habbo habbo) - { - - } - - @Override - public void start() - { - } - - @Override - public void run() - { - - } - - @Override - public void stop() - { - } - - @EventHandler - public static void onUserLookAtPoint(RoomUnitLookAtPointEvent event) - { - if(!isValidEffect(event.roomUnit.getEffectId())) - return; - - Room room = event.room; - - Habbo h = event.room.getHabbo(event.roomUnit); - - boolean found = false; - - if (room != null && h != null) - { - for(Habbo habbo : room.getCurrentHabbos().valueCollection()) - { - if(habbo.getRoomUnit().getEffectId() == (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES + 7 : FEMALE_SKATES + 7)) - found = true; - } - - if(!found) - { - room.giveEffect(h, (h.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES) + 7); - return; - } - - THashSet items = room.getRoomSpecialTypes().getItemsOfType(InteractionTagPole.class); - - if(items.isEmpty()) - return; - - if(PathFinder.tilesAdjecent(event.location.X, event.location.Y, h.getRoomUnit().getX(), h.getRoomUnit().getY())) - { - if (h.getRoomUnit().getEffectId() == (h.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES + 7 : FEMALE_SKATES + 7)) - { - boolean affectedHabbo = false; - for (Habbo habbo : room.getHabbosAt(event.location)) - { - if (habbo == h) - continue; - - if (habbo.getRoomUnit().getEffectId() == (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES)) - { - room.giveEffect(habbo, (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES) + 7); - room.giveEffect(h, (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES)); - } - - affectedHabbo = true; - - break; - } - - if (affectedHabbo) - { - for (HabboItem item : items) - { - item.setExtradata("1"); - room.updateItem(item); - Emulator.getThreading().run(new HabboItemNewState(item, room, "0"), 1000); - } - } - } - } - } - } - - @EventHandler - public static void onUserWalkEvent(UserTakeStepEvent event) - { - if (event.habbo.getHabboInfo().getCurrentGame() == IceTagGame.class) - { - - } - else - { - THashSet - } - } - - private static boolean isValidEffect(int effectId) - { - if(effectId == MALE_SKATES) - return true; - - if(effectId == FEMALE_SKATES) - return true; - - if(effectId - 7 == MALE_SKATES) - return true; - - if (effectId - 7 == FEMALE_SKATES) - return true; - - return false; - } - - private static boolean hasValidEffect(Habbo habbo) - { - if (habbo.getHabboInfo().getGender().equals(HabboGender.M)) - { - return habbo.getRoomUnit().getEffectId() == MALE_SKATES || habbo.getRoomUnit().getEffectId() - 7 == MALE_SKATES; - } - else - { - return habbo.getRoomUnit().getEffectId() == FEMALE_SKATES || habbo.getRoomUnit().getEffectId() - 7 == FEMALE_SKATES; - } - } -} -*/ public class IceTagGame extends TagGame { diff --git a/src/main/java/com/eu/habbo/habbohotel/games/tag/TagGamePlayer.java b/src/main/java/com/eu/habbo/habbohotel/games/tag/TagGamePlayer.java index f7465d91..74011325 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/tag/TagGamePlayer.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/tag/TagGamePlayer.java @@ -6,12 +6,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class TagGamePlayer extends GamePlayer { - /** - * Creates a new GamePlayer for the given Habbo and it's team. - * - * @param habbo The Habbo who is linked to this GamePlayer. - * @param teamColor The team the GamePlayer is in. - */ + public TagGamePlayer(Habbo habbo, GameTeamColors teamColor) { super(habbo, teamColor); diff --git a/src/main/java/com/eu/habbo/habbohotel/guides/GuardianTicket.java b/src/main/java/com/eu/habbo/habbohotel/guides/GuardianTicket.java index 555d9b7e..cf74f801 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guides/GuardianTicket.java +++ b/src/main/java/com/eu/habbo/habbohotel/guides/GuardianTicket.java @@ -39,10 +39,7 @@ public class GuardianTicket this.date = new Date(); } - /** - * Requests an Guardian to vote on this ticket. - * @param guardian The Guardian to ask. - */ + public void requestToVote(Habbo guardian) { guardian.getClient().sendResponse(new GuardianNewReportReceivedComposer(this)); @@ -52,10 +49,7 @@ public class GuardianTicket Emulator.getThreading().run(new GuardianNotAccepted(this, guardian), Emulator.getConfig().getInt("guardians.accept.timer") * 1000); } - /** - * Adds an guardian to this ticket. - * @param guardian The guardian to add. - */ + public void addGuardian(Habbo guardian) { GuardianVote vote = this.votes.get(guardian); @@ -68,10 +62,7 @@ public class GuardianTicket } } - /** - * Removes an Guardian from this ticket. - * @param guardian The Guardian to remove. - */ + public void removeGuardian(Habbo guardian) { GuardianVote vote = this.getVoteForGuardian(guardian); @@ -91,11 +82,7 @@ public class GuardianTicket this.updateVotes(); } - /** - * Set the vote for an Guardian. - * @param guardian The Guardian to set the vote for. - * @param vote The GuardianVoteType to set the vote to. - */ + public void vote(Habbo guardian, GuardianVoteType vote) { this.votes.get(guardian).type = vote; @@ -107,9 +94,7 @@ public class GuardianTicket this.finish(); } - /** - * Updates the votes to all other voting guardians. - */ + public void updateVotes() { synchronized (this.votes) @@ -124,9 +109,7 @@ public class GuardianTicket } } - /** - * Tries to finish the voting on a ticket and searches for more guardians if needed. - */ + public void finish() { int votedCount = this.getVotedCount(); @@ -183,17 +166,13 @@ public class GuardianTicket } } - /** - * @return True if an verdict has been set. - */ + public boolean isFinished() { return !(this.verdict == null); } - /** - * @return Calculates the verdict of this ticket. - */ + public GuardianVoteType calculateVerdict() { int countAcceptably = 0; @@ -289,11 +268,7 @@ public class GuardianTicket return this.guardianCount; } - /** - * Sorts all votes. - * @param guardian The guardian to remove from this vote list. - * @return The sorted votes list. - */ + public ArrayList getSortedVotes(Habbo guardian) { synchronized (this.votes) @@ -316,9 +291,7 @@ public class GuardianTicket } } - /** - * @return The amount of votes (Acceptably, Badly or Awfully) thath as been cast. - */ + public int getVotedCount() { int count = 0; diff --git a/src/main/java/com/eu/habbo/habbohotel/guides/GuideManager.java b/src/main/java/com/eu/habbo/habbohotel/guides/GuideManager.java index ca5e897c..304079a2 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guides/GuideManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/guides/GuideManager.java @@ -55,9 +55,7 @@ public class GuideManager this.activeGuardians.remove(habbo); } - /** - * Guide Shit - */ + public void setOnGuide(Habbo habbo, boolean onDuty) { @@ -76,14 +74,7 @@ public class GuideManager } } - /** - * Searches for an helper to handle the tour. - * Automatically schedules the tour request untill an helper is found - * or the request has been cancelled by the requester. - * - * @param tour The tour to find a helper for. - * @return Wether an helper has been found. - */ + public boolean findHelper(GuideTour tour) { synchronized (this.activeHelpers) @@ -111,11 +102,7 @@ public class GuideManager return false; } - /** - * Declines an tourrequest for the current helper assigned. - * Automatically searches for a new helper. - * @param tour The tour to decline. - */ + public void declineTour(GuideTour tour) { Habbo helper = tour.getHelper(); @@ -130,11 +117,7 @@ public class GuideManager } } - /** - * Starts an new tour session. - * @param tour The tour to start. - * @param helper The helper to assign. - */ + public void startSession(GuideTour tour, Habbo helper) { synchronized (this.activeTours) @@ -152,21 +135,7 @@ public class GuideManager } } - /** - * Ends an tour session. - * - *
      - * The requester cancels the tour request. - *
    - *
      - * The requester says no more help needed. - *
    - *
      - * The requester reported the helper. - *
    - *
    - * @param tour - */ + public void endSession(GuideTour tour) { synchronized (this.activeTours) @@ -187,11 +156,7 @@ public class GuideManager } } - /** - * Recommend the guide. - * @param tour The GuideTour this applies to. - * @param recommend Recommended or not. - */ + public void recommend(GuideTour tour, boolean recommend) { synchronized (this.activeTours) @@ -204,11 +169,7 @@ public class GuideManager } } - /** - * Gets the GuideTour for the given helper. - * @param helper The helper to find the tour for. - * @return The GuideTour for the helper. NULL when not found. - */ + public GuideTour getGuideTourByHelper(Habbo helper) { synchronized (this.activeTours) @@ -225,11 +186,7 @@ public class GuideManager return null; } - /** - * Gets the GuideTour for the given requester. - * @param noob The noob to find the tour for. - * @return The GuideTour for the noob. NULL when not found. - */ + public GuideTour getGuideTourByNoob(Habbo noob) { synchronized (this.activeTours) @@ -246,11 +203,7 @@ public class GuideManager return null; } - /** - * Searches for any GuideTour linked to the either the noob or the helper. - * @param habbo The Habbo to look for. - * @return An given tour. - */ + public GuideTour getGuideTourByHabbo(Habbo habbo) { synchronized (this.activeTours) @@ -267,33 +220,25 @@ public class GuideManager return null; } - /** - * @return The amount of helpers that are on duty. - */ + public int getGuidesCount() { return this.activeHelpers.size(); } - /** - * @return The amount of guardians that are on duty. - */ + public int getGuardiansCount() { return this.activeGuardians.size(); } - /** - * @return true if there are guardians on duty. - */ + public boolean activeGuardians() { return this.activeGuardians.size() > 0; } - /** - * @return The average waiting time before an helper is assinged. - */ + public int getAverageWaitingTime() { synchronized (this.tourRequestTiming) @@ -312,14 +257,9 @@ public class GuideManager } } - /** - * Guardians - */ - /** - * Adds a new guardian ticket to the active ticket Queue - * @param ticket The GuardianTicket to add. - */ + + public void addGuardianTicket(GuardianTicket ticket) { synchronized (this.activeTickets) @@ -330,10 +270,7 @@ public class GuideManager } } - /** - * Searches for new guardians to vote on the given ticket. - * @param ticket The GuardianTicket to find Guardians for. - */ + public void findGuardians(GuardianTicket ticket) { synchronized (this.activeGuardians) @@ -376,11 +313,7 @@ public class GuideManager } } - /** - * Accept a ticket for an Guardian. - * @param guardian The Guardian who accepts. - * @param accepted Accepted. - */ + public void acceptTicket(Habbo guardian, boolean accepted) { GuardianTicket ticket = this.getTicketForGuardian(guardian); @@ -401,9 +334,7 @@ public class GuideManager } } - /** - * @return The active GuardianTicket for the Guardian. - */ + public GuardianTicket getTicketForGuardian(Habbo guardian) { synchronized (this.activeGuardians) @@ -412,9 +343,7 @@ public class GuideManager } } - /** - * @return The most recent ticket send by the reporter. NULL when not found. - */ + public GuardianTicket getRecentTicket(Habbo reporter) { GuardianTicket ticket = null; @@ -465,10 +394,7 @@ public class GuideManager return ticket; } - /** - * Closes a ticket and moves it to the closed ticket queue. - * @param ticket The GuardianTicket to close. - */ + public void closeTicket(GuardianTicket ticket) { synchronized (this.activeTickets) @@ -500,11 +426,7 @@ public class GuideManager } } - /** - * Sets the give Guardian active for Guardian duty. - * @param habbo The Guardian to set on duty. - * @param onDuty On duty or not. - */ + public void setOnGuardian(Habbo habbo, boolean onDuty) { if(onDuty) @@ -524,9 +446,7 @@ public class GuideManager } } - /** - * Cleans up shit. - */ + public void cleanup() { synchronized (this.activeTours) diff --git a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildManager.java b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildManager.java index b52af23b..9253c2f7 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildManager.java @@ -21,14 +21,10 @@ import java.util.NoSuchElementException; public class GuildManager { - /** - * Guildparts. The things you use to create the badge. - */ + private final THashMap> guildParts; - /** - * Cached guilds. - */ + private final TIntObjectMap guilds; public GuildManager() @@ -41,9 +37,7 @@ public class GuildManager Emulator.getLogging().logStart("Guild Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)"); } - /** - * Loads the guild parts. - */ + public void loadGuildParts() { this.guildParts.clear(); @@ -68,17 +62,7 @@ public class GuildManager } } - /** - * Creates a new guild. - * @param habbo - * @param roomId - * @param name - * @param description - * @param badge - * @param colorOne - * @param colorTwo - * @return - */ + public Guild createGuild(Habbo habbo, int roomId, String roomName, String name, String description, String badge, int colorOne, int colorTwo) { Guild guild = new Guild(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), roomId, roomName, name, description, colorOne, colorTwo, badge); @@ -134,10 +118,7 @@ public class GuildManager return guild; } - /** - * Deletes a guild. - * @param guild The guild to delete. - */ + public void deleteGuild(Guild guild) { THashSet members = this.getGuildMembers(guild); @@ -192,9 +173,7 @@ public class GuildManager } } - /** - * Removes inactive guilds from the cache. - */ + public void clearInactiveGuilds() { List toRemove = new ArrayList(); @@ -222,13 +201,7 @@ public class GuildManager } } - /** - * Join a guild. - * @param guild The guild to join. - * @param client The client that joins. - * @param userId The Habbo ID that joins. - * @param acceptRequest Accepted the request. - */ + public void joinGuild(Guild guild, GameClient client, int userId, boolean acceptRequest) { boolean error = false; @@ -359,11 +332,7 @@ public class GuildManager } } - /** - * Makes the user admin of the guild. - * @param guild The guild that the user should become admin of. - * @param userId The userID that becomes admin. - */ + public void setAdmin(Guild guild, int userId) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE guilds_members SET level_id = ? WHERE user_id = ? AND guild_id = ? LIMIT 1")) @@ -379,11 +348,7 @@ public class GuildManager } } - /** - * Demotes the admin back to user. - * @param guild The guild that the admin is demoted of. - * @param userId The user id. - */ + public void removeAdmin(Guild guild, int userId) { if(guild.getOwnerId() == userId) @@ -402,11 +367,7 @@ public class GuildManager } } - /** - * Removes a member from the guild. - * @param guild The guild. - * @param userId The member - */ + public void removeMember(Guild guild, int userId) { if(guild.getOwnerId() == userId) @@ -433,33 +394,20 @@ public class GuildManager } } - /** - * Adds a guild to the cache. - * @param guild The guild to add. - */ + public void addGuild(Guild guild) { guild.lastRequested = Emulator.getIntUnixTimestamp(); this.guilds.put(guild.getId(), guild); } - /** - * Gets the guild member for the given Habbo. - * @param guild The guild to look up. - * @param habbo The Habbo to look up. - * @return The GuildMember. - */ + public GuildMember getGuildMember(Guild guild, Habbo habbo) { return getGuildMember(guild.getId(), habbo.getHabboInfo().getId()); } - /** - * Gets the guild member for the given Habbo. - * @param guildId The guild to look up. - * @param habboId The Habbo to look up. - * @return The GuildMember. - */ + public GuildMember getGuildMember(int guildId, int habboId) { GuildMember member = null; @@ -483,21 +431,13 @@ public class GuildManager return member; } - /** - * Gets the guild members for the guild. - * @param guildId The guild to lookup. - * @return The guild members. - */ + public THashSet getGuildMembers(int guildId) { return this.getGuildMembers(this.getGuild(guildId)); } - /** - * Gets the guild members for the guild. - * @param guild The guild to lookup. - * @return The guild members. - */ + THashSet getGuildMembers(Guild guild) { THashSet guildMembers = new THashSet(); @@ -521,14 +461,7 @@ public class GuildManager return guildMembers; } - /** - * Gets the guild members for the guild. - * @param guild The guild to lookup. - * @param page The page to lookup. - * @param levelId The levelid (Admins, Users, Unaccepted) - * @param query The search query. - * @return The found members. - */ + public ArrayList getGuildMembers(Guild guild, int page, int levelId, String query) { ArrayList guildMembers = new ArrayList(); @@ -556,11 +489,7 @@ public class GuildManager return guildMembers; } - /** - * Gets all the admins for a guild. - * @param guild The guild to lookup. - * @return The GuildMembers that have admin permission for the guild. - */ + public THashMap getOnlyAdmins(Guild guild) { THashMap guildAdmins = new THashMap(); @@ -594,10 +523,7 @@ public class GuildManager } } - /** - * @param guildId The guild id - * @return The guild. Caches if needed. - */ + public Guild getGuild(int guildId) { Guild g = this.guilds.get(guildId); @@ -742,11 +668,7 @@ public class GuildManager return this.guildParts.get(type).get(id); } - /** - * Sets the furniture guild. - * @param furni The furni to set. - * @param guildId The guild to set. - */ + public void setGuild(InteractionGuildFurni furni, int guildId) { furni.setGuildId(guildId); @@ -762,9 +684,7 @@ public class GuildManager } } - /** - * Disposes the GuildManager - */ + public void dispose() { TIntObjectIterator guildIterator = this.guilds.iterator(); diff --git a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPart.java b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPart.java index fe61f8fe..40a20e4b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPart.java +++ b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPart.java @@ -5,19 +5,13 @@ import java.sql.SQLException; public class GuildPart { - /** - * Identifier. - */ + public final int id; - /** - * Part A - */ + public final String valueA; - /** - * Part B - */ + public final String valueB; public GuildPart(ResultSet set) throws SQLException diff --git a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPartType.java b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPartType.java index fe466d0f..6c504bca 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPartType.java +++ b/src/main/java/com/eu/habbo/habbohotel/guilds/GuildPartType.java @@ -2,19 +2,13 @@ package com.eu.habbo.habbohotel.guilds; public enum GuildPartType { - /** - * Badge base. - */ + BASE, - /** - * Symbol - */ + SYMBOL, - /** - * Colors - */ + BASE_COLOR, SYMBOL_COLOR, BACKGROUND_COLOR diff --git a/src/main/java/com/eu/habbo/habbohotel/guilds/forums/GuildForum.java b/src/main/java/com/eu/habbo/habbohotel/guilds/forums/GuildForum.java index 517a1af4..6e13b8de 100644 --- a/src/main/java/com/eu/habbo/habbohotel/guilds/forums/GuildForum.java +++ b/src/main/java/com/eu/habbo/habbohotel/guilds/forums/GuildForum.java @@ -81,14 +81,7 @@ public class GuildForum implements ISerialize } //TODO: - /* - Verwijderen door guild admin -> state naar HIDDEN_BY_ADMIN - Guild admins moeten nog wel forum kunnen bekijken. - Verwijderen door staff -> state naar HIDDEN_BY_STAFF - Guild admins kunnen de thread niet zien. Staff wel. - Thread wordt nooit uit de database verwijderd, alleen als de groep verwijderd wordt. - */ public void hideThread(int threadId) { this.threads.get(threadId).setState(ThreadState.HIDDEN_BY_ADMIN); @@ -143,12 +136,7 @@ public class GuildForum implements ISerialize public enum ThreadState { - /* - public static const _SafeStr_11113:int = 0; - public static const _SafeStr_11114:int = 1; - public static const _SafeStr_11115:int = 10; - public static const _SafeStr_9691:int = 20; - */ + OPEN(0), CLOSED(1), diff --git a/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFame.java b/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFame.java index ad07dfca..3348e072 100644 --- a/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFame.java +++ b/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFame.java @@ -7,14 +7,10 @@ import java.sql.*; public class HallOfFame { - /** - * Hall of Fame winners are in here. - */ + private final THashMap winners = new THashMap(); - /** - * The name of the competition. - */ + private static String competitionName; public HallOfFame() @@ -24,9 +20,7 @@ public class HallOfFame reload(); } - /** - * Reloads the HoF - */ + public void reload() { this.winners.clear(); diff --git a/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFameWinner.java b/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFameWinner.java index ef1c2a4c..0a71abaa 100644 --- a/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFameWinner.java +++ b/src/main/java/com/eu/habbo/habbohotel/hotelview/HallOfFameWinner.java @@ -5,24 +5,16 @@ import java.sql.SQLException; public class HallOfFameWinner implements Comparable { - /** - * Habbo ID - */ + private int id; - /** - * Name - */ + private String username; - /** - * Look - */ + private String look; - /** - * Score - */ + private int points; public HallOfFameWinner(ResultSet set) throws SQLException @@ -33,33 +25,25 @@ public class HallOfFameWinner implements Comparable this.points = set.getInt("hof_points"); } - /** - * Habbo ID - */ + public int getId() { return this.id; } - /** - * Name - */ + public String getUsername() { return this.username; } - /** - * Look - */ + public String getLook() { return this.look; } - /** - * Score - */ + public int getPoints() { return this.points; diff --git a/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsList.java b/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsList.java index 8d41f19f..79f3deb0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsList.java +++ b/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsList.java @@ -15,9 +15,7 @@ public class NewsList this.reload(); } - /** - * Reloads the news. - */ + public void reload() { synchronized (this.newsWidgets) @@ -37,10 +35,7 @@ public class NewsList } } - /** - * The newsitems displayed on the HotelView - * @return - */ + public THashSet getNewsWidgets() { return newsWidgets; diff --git a/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsWidget.java b/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsWidget.java index e27c049a..380b0b34 100644 --- a/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsWidget.java +++ b/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsWidget.java @@ -5,39 +5,25 @@ import java.sql.SQLException; public class NewsWidget { - /** - * News ID - */ + private int id; - /** - * Title - */ + private String title; - /** - * Message - */ + private String message; - /** - * Text on the button - */ + private String buttonMessage; - /** - * Type - */ + private int type; - /** - * Link - */ + private String link; - /** - * Image - */ + private String image; public NewsWidget(ResultSet set) throws SQLException @@ -51,57 +37,43 @@ public class NewsWidget this.image = set.getString("image"); } - /** - * News ID - */ + public int getId() { return this.id; } - /** - * Title - */ + public String getTitle() { return this.title; } - /** - * Message - */ + public String getMessage() { return this.message; } - /** - * Text on the button - */ + public String getButtonMessage() { return this.buttonMessage; } - /** - * Type - */ + public int getType() { return this.type; } - /** - * Link - */ + public String getLink() { return this.link; } - /** - * Image - */ + public String getImage() { return this.image; diff --git a/src/main/java/com/eu/habbo/habbohotel/items/ItemInteraction.java b/src/main/java/com/eu/habbo/habbohotel/items/ItemInteraction.java index c1f3d06d..6bda6e67 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/ItemInteraction.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/ItemInteraction.java @@ -7,32 +7,20 @@ public class ItemInteraction private final String name; private final Class type; - /** - * Creates an new ItemInteraction that will be used to load custom ItemInteractions. - * Note that the name (item_interaction_type) must be unique. Failing to do so will result - * into an launch failure at startup. - * @param name The name of this item interaction. Do not use capitals or spaces. - * @param type The interaction class that is linked and will be instantiated for new items. - */ + public ItemInteraction(String name, Class type) { this.name = name; this.type = type; } - /** - * @return The class that is lined to this interaction. - */ + public Class getType() { return this.type; } - /** - * Should only be used upon startup and never get called outside of the emulator. - * Use getType() in order to identify the correct interactions! - * @return The interaction name as defined in the database. - */ + public String getName() { return this.name; diff --git a/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java b/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java index a7ce7020..017acc84 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java @@ -146,12 +146,8 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("effect_tile", InteractionEffectTile.class)); this.interactionsList.add(new ItemInteraction("sticky_pole", InteractionStickyPole.class)); - /* - Wireds - */ - /* - Triggers - */ + + this.interactionsList.add(new ItemInteraction("wf_trg_walks_on_furni", WiredTriggerHabboWalkOnFurni.class)); this.interactionsList.add(new ItemInteraction("wf_trg_walks_off_furni", WiredTriggerHabboWalkOffFurni.class)); this.interactionsList.add(new ItemInteraction("wf_trg_enter_room", WiredTriggerHabboEntersRoom.class)); @@ -169,9 +165,7 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("wf_trg_says_command", WiredTriggerHabboSaysCommand.class)); this.interactionsList.add(new ItemInteraction("wf_trg_score_achieved", WiredTriggerScoreAchieved.class)); - /* - Effects - */ + this.interactionsList.add(new ItemInteraction("wf_act_toggle_state", WiredEffectToggleFurni.class)); this.interactionsList.add(new ItemInteraction("wf_act_reset_timers", WiredEffectResetTimers.class)); this.interactionsList.add(new ItemInteraction("wf_act_match_to_sshot", WiredEffectMatchFurni.class)); @@ -209,9 +203,7 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("wf_act_give_respect", WiredEffectGiveRespect.class)); this.interactionsList.add(new ItemInteraction("wf_act_alert", WiredEffectAlert.class)); - /* - Conditions - */ + this.interactionsList.add(new ItemInteraction("wf_cnd_has_furni_on", WiredConditionFurniHaveFurni.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_furnis_hv_avtrs", WiredConditionFurniHaveHabbo.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_stuff_is", WiredConditionFurniTypeMatch.class)); @@ -242,23 +234,15 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("wf_cnd_freeze", WiredConditionFreezeGameActive.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_not_freeze", WiredConditionNotFreezeGameActive.class)); - /* - Extra - */ + this.interactionsList.add(new ItemInteraction("wf_xtra_random", WiredExtraRandom.class)); this.interactionsList.add(new ItemInteraction("wf_xtra_unseen", WiredExtraUnseen.class)); - /* - Highscores - */ + this.interactionsList.add(new ItemInteraction("wf_highscore", InteractionWiredHighscore.class)); - /* - Battle Banzai - */ - /* - Battle Banzai Items - */ + + //battlebanzai_pyramid //battlebanzai_puck extends pushable this.interactionsList.add(new ItemInteraction("battlebanzai_timer", InteractionBattleBanzaiTimer.class)); @@ -266,69 +250,49 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("battlebanzai_random_teleport", InteractionBattleBanzaiTeleporter.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_sphere", InteractionBattleBanzaiSphere.class)); - /* - Battle Banzai Gates - */ + this.interactionsList.add(new ItemInteraction("battlebanzai_gate_blue", InteractionBattleBanzaiGateBlue.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_green", InteractionBattleBanzaiGateGreen.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_red", InteractionBattleBanzaiGateRed.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_yellow", InteractionBattleBanzaiGateYellow.class)); - /* - Battle Banzai Scoreboards - */ + this.interactionsList.add(new ItemInteraction("battlebanzai_counter_blue", InteractionBattleBanzaiScoreboardBlue.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_green", InteractionBattleBanzaiScoreboardGreen.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_red", InteractionBattleBanzaiScoreboardRed.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_yellow", InteractionBattleBanzaiScoreboardYellow.class)); - /* - Freeze - */ - /* - Freeze Items - */ + + this.interactionsList.add(new ItemInteraction("freeze_block", InteractionFreezeBlock.class)); this.interactionsList.add(new ItemInteraction("freeze_tile", InteractionFreezeTile.class)); this.interactionsList.add(new ItemInteraction("freeze_exit", InteractionFreezeExitTile.class)); this.interactionsList.add(new ItemInteraction("freeze_timer", InteractionFreezeTimer.class)); - /* - Freeze Gates - */ + this.interactionsList.add(new ItemInteraction("freeze_gate_blue", InteractionFreezeGateBlue.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_green", InteractionFreezeGateGreen.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_red", InteractionFreezeGateRed.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_yellow", InteractionFreezeGateYellow.class)); - /* - Freeze Scoreboards - */ + this.interactionsList.add(new ItemInteraction("freeze_counter_blue", InteractionFreezeScoreboardBlue.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_green", InteractionFreezeScoreboardGreen.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_red", InteractionFreezeScoreboardRed.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_yellow", InteractionFreezeScoreboardYellow.class)); - /* - Ice Tag - */ + this.interactionsList.add(new ItemInteraction("icetag_pole", InteractionIceTagPole.class)); this.interactionsList.add(new ItemInteraction("icetag_field", InteractionIceTagField.class)); - /* - Bunnyrun - */ + this.interactionsList.add(new ItemInteraction("bunnyrun_pole", InteractionBunnyrunPole.class)); this.interactionsList.add(new ItemInteraction("bunnyrun_field", InteractionBunnyrunField.class)); - /* - Rollerskate - */ + this.interactionsList.add(new ItemInteraction("rollerskate_field", InteractionRollerskateField.class)); - /* - Football - */ + this.interactionsList.add(new ItemInteraction("football", InteractionFootball.class)); this.interactionsList.add(new ItemInteraction("football_gate", InteractionFootballGate.class)); this.interactionsList.add(new ItemInteraction("football_counter_blue", InteractionFootballScoreboardBlue.class)); @@ -345,10 +309,7 @@ public class ItemManager this.interactionsList.add(new ItemInteraction("snowstorm_pile", null)); } - /** - * Adds an new ItemInteraction to the interaction list. - * @param itemInteraction The ItemInteraction that must be added. - */ + public void addItemInteraction(ItemInteraction itemInteraction) { for (ItemInteraction interaction : this.interactionsList) @@ -362,11 +323,7 @@ public class ItemManager this.interactionsList.add(itemInteraction); } - /** - * Gets that correct ItemInteraction class for the given Interaction. - * @param type The Interaction that must be found. - * @return The ItemInteraction definition for the given class. - */ + public ItemInteraction getItemInteraction(Class type) { for (ItemInteraction interaction : this.interactionsList) @@ -379,11 +336,7 @@ public class ItemManager return getItemInteraction(InteractionDefault.class); } - /** - * Gets that correct ItemInteraction class for the given Interaction. - * @param type The Interaction that must be found. - * @return The ItemInteraction definition for the given class. - */ + public ItemInteraction getItemInteraction(String type) { for (ItemInteraction interaction : this.interactionsList) @@ -395,11 +348,7 @@ public class ItemManager return this.getItemInteraction(InteractionDefault.class); } - /** - * Loads all items from the database. Updates the item definition when needed. - * - * Note: Does not change the interaction type. Emulator requires a restart for that. - */ + public void loadItems() { try ( @@ -432,9 +381,7 @@ public class ItemManager } } - /** - * Loads the crackable items and their rewards from the database. - */ + public void loadCrackable() { this.crackableRewards.clear(); @@ -462,11 +409,7 @@ public class ItemManager } } - /** - * Gets the amount of clicks required for an crackable item. - * @param itemId The Item id. - * @return The amount of clicks required. - */ + public int getCrackableCount(int itemId) { if(this.crackableRewards.containsKey(itemId)) @@ -475,12 +418,7 @@ public class ItemManager return 0; } - /** - * Calculates the current state of the crackable item depending on the amount of ticks. - * @param count The current amount of ticks. - * @param max The amount of ticks needed. - * @return State of the crackable. - */ + public int calculateCrackState(int count, int max, Item baseItem) { return (int)Math.floor((1.0D / ((double)max / (double)count) * baseItem.getStateCount())); @@ -496,9 +434,7 @@ public class ItemManager return this.getItem(this.crackableRewards.get(itemId).getRandomReward()); } - /** - * Loads soundtracks from the database. - */ + public void loadSoundTracks() { this.soundTracks.clear(); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/PostItColor.java b/src/main/java/com/eu/habbo/habbohotel/items/PostItColor.java index 4b6a6d43..71be4758 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/PostItColor.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/PostItColor.java @@ -2,24 +2,16 @@ package com.eu.habbo.habbohotel.items; public enum PostItColor { - /** - * Blue! - */ + BLUE("9CCEFF"), - /** - * Green! - */ + GREEN("9CFF9C"), - /** - * Pink! (Or purple :P) - */ + PINK("FF9CFF"), - /** - * Yellow - */ + YELLOW("FFFF33"); public final String hexColor; @@ -29,11 +21,7 @@ public enum PostItColor this.hexColor = hexColor; } - /** - * If the color is a custom color. - * @param color The color to check. - * @return True if the color is a custom color. - */ + public static boolean isCustomColor(String color) { for(PostItColor postItColor : PostItColor.values()) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPushable.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPushable.java index 72ef0a78..15222bf6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPushable.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPushable.java @@ -11,9 +11,7 @@ import java.sql.SQLException; public abstract class InteractionPushable extends InteractionDefault { - /** - * Currently running Runnable for this item. - */ + private KickBallAction currentThread; public InteractionPushable(ResultSet set, Item baseItem) throws SQLException @@ -116,183 +114,57 @@ public abstract class InteractionPushable extends InteractionDefault } } - /** - * Gets the velocity of the item when a Habbo kicks the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return The item's new velocity - */ + public abstract int getWalkOnVelocity(RoomUnit roomUnit, Room room); - /** - * Gets the direction the item should start moving in when a Habbo kicks the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return Direction that the item should start moving in - */ + public abstract RoomUserRotation getWalkOnDirection(RoomUnit roomUnit, Room room); - /** - * Gets the velocity of the item when a Habbo walks off the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return The item's new velocity - */ + public abstract int getWalkOffVelocity(RoomUnit roomUnit, Room room); - /** - * Gets the direction the item should start moving in when a Habbo walks off the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return Direction that the item should start moving in - */ + public abstract RoomUserRotation getWalkOffDirection(RoomUnit roomUnit, Room room); - /** - * Gets the velocity of the item when a Habbo drags the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return The item's new velocity - */ + public abstract int getDragVelocity(RoomUnit roomUnit, Room room); - /** - * Gets the direction the item should start moving in when a Habbo drags the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return Direction that the item should start moving in - */ + public abstract RoomUserRotation getDragDirection(RoomUnit roomUnit, Room room); - /** - * Gets the velocity of the item when a Habbo tackles the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return The item's new velocity - */ + public abstract int getTackleVelocity(RoomUnit roomUnit, Room room); - /** - * Gets the direction the item should start moving in when a Habbo tackles the item - * - * @param roomUnit The Habbo that initiated the event - * @param room The room this event happened in - * @return Direction that the item should start moving in - */ + public abstract RoomUserRotation getTackleDirection(RoomUnit roomUnit, Room room); - /** - * Gets the delay till the next move of the item in milliseconds. - * - * @param currentStep The current step of the move sequence - * @param totalSteps The total number of steps to complete the move sequence - * @return Time in milliseconds till the next move of the item - */ + public abstract int getNextRollDelay(int currentStep, int totalSteps); //The length in milliseconds when the ball should next roll - /** - * Gets the new direction of the item when it cannot move any further. - * - * @param room The room this event happened in - * @param currentDirection The current direction of the item - * @return New direction of the item - */ + public abstract RoomUserRotation getBounceDirection(Room room, RoomUserRotation currentDirection); //Returns the new direction to move the ball when the ball cannot move - /** - * Checks if the next move is allowed. - * - * @param room The room this event happened in - * @param from The current coordinate of the item - * @param to The coordinate the item wishes to move to - * @return Is this move allowed? - */ + public abstract boolean validMove(Room room, RoomTile from, RoomTile to); //Checks if the next move is valid - /** - * Triggered when a Habbo drags a pushable item. - * - * @param room The room that this event happened in - * @param roomUnit The Habbo that initiated the event - * @param velocity The new velocity of the item - * @param direction The direction the item is moving in - */ + public abstract void onDrag(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); - /** - * Triggered when a Habbo kicks a pushable item. - * - * @param room The room that this event happened in - * @param roomUnit The Habbo that initiated the event - * @param velocity The new velocity of the item - * @param direction The direction the item is moving in - */ + public abstract void onKick(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); - /** - * Triggered when a Habbo tackles the ball (double clicks). - * - * @param room The room that this event happened in - * @param roomUnit The Habbo that initiated the event - * @param velocity The new velocity of the item - * @param direction The direction the item is moving in - */ + public abstract void onTackle(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); - /** - * Triggered when an item is moved due to a kick, drag or tackle. - * State changes should be executed here - * - * @param room The room that the event happened in - * @param from The old coordinate of the item - * @param to The new coordinate of the item - * @param direction The direction the item is moving in - * @param kicker The Habbo which initiated the move of the item - * @param nextRoll The delay till the next move of the item - * @param currentStep The current step of the move sequence - * @param totalSteps The total number of steps to complete the move sequence - */ + public abstract void onMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps); - /** - * Triggered when an item cannot move any further and has changed it's direction. - * - * @param room The room that the event happened in - * @param oldDirection The old direction of the item - * @param newDirection The new direction of the item - * @param kicker The Habbo which initiated the move of the item - */ + public abstract void onBounce(Room room, RoomUserRotation oldDirection, RoomUserRotation newDirection, RoomUnit kicker); - /** - * Triggered when an item stops moving - * - * @param room The room that the event happened in - * @param kicker The Habbo which initiated the move of the item - * @param currentStep The current step of the move sequence - * @param totalSteps The total number of steps to complete the move sequence - */ + public abstract void onStop(Room room, RoomUnit kicker, int currentStep, int totalSteps); - /** - * Checks if the item is still allowed to move. If not, the ball will stop. - * - * @param room The room that the event happened in - * @param from The old coordinate of the item - * @param to The new coordinate of the item - * @param direction The direction the item is moving in - * @param kicker The Habbo which initiated the move of the item - * @param nextRoll The delay till the next move of the item - * @param currentStep The current step of the move sequence - * @param totalSteps The total number of steps to complete the move sequence - * @return Can the item still move? - */ + public abstract boolean canStillMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps); } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionTeleport.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionTeleport.java index 0edaaf2d..5f626214 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionTeleport.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionTeleport.java @@ -61,26 +61,7 @@ public class InteractionTeleport extends HabboItem if(room != null && client != null && objects.length <= 1) { - /*client.getHabbo().getRoomUnit().cmdTeleport = false; - this.roomUnitId - RoomTile loc = room.getLayout().getTile(this.getX(), this.getY()); - if (loc.equals(room.getLayout().getDoorTile())) - return; - /*if (!this.getBaseItem().allowWalk()) - { - loc = HabboItem.getSquareInFront(room.getLayout(), this); - } - - if (loc != null) - { - - else - { - client.getHabbo().getRoomUnit().setGoalLocation(loc); - Emulator.getThreading().run(new RoomUnitTeleportWalkToAction(client.getHabbo(), this, room), client.getHabbo().getRoomUnit().getPath().size() + 2 * 510); - } - }*/ super.onClick(client, room, objects); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java index 343b1a1e..4bfc7d8d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java @@ -15,6 +15,8 @@ import java.sql.SQLException; public abstract class InteractionWired extends HabboItem { + private long cooldown; + InteractionWired(ResultSet set, Item baseItem) throws SQLException { super(set, baseItem); @@ -101,4 +103,24 @@ public abstract class InteractionWired extends HabboItem this.setExtradata(this.getExtradata().equals("1") ? "0" : "1"); room.sendComposer(new ItemStateComposer(this).compose()); } + + + protected long requiredCooldown() + { + return 500; + } + + + + public boolean canExecute(long newMillis) + { + if (newMillis - this.cooldown < this.requiredCooldown()) + { + this.cooldown = newMillis; + return false; + } + + this.cooldown = newMillis; + return true; + } } diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java index 24a3e224..09295dae 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java @@ -14,7 +14,6 @@ import java.sql.SQLException; public abstract class InteractionWiredEffect extends InteractionWired { private int delay; - private long cooldown; public InteractionWiredEffect(ResultSet set, Item baseItem) throws SQLException { @@ -69,58 +68,24 @@ public abstract class InteractionWiredEffect extends InteractionWired } - /** - * Checks if the cooldown has passed and updates it to the new cooldown. - * @param newMillis The new timestamp the wired was executed. - * @return True if the wired can be executed. - */ - public boolean canExecute(long newMillis) - { - if (newMillis - this.cooldown < this.requiredCooldown()) - { - this.cooldown = newMillis; - return false; - } - - this.cooldown = newMillis; - return true; - } public abstract boolean saveData(ClientMessage packet, GameClient gameClient); - /** - * Sets the delay of execution. - * @param value The delay of execution. - */ + protected void setDelay(int value) { this.delay = value; } - /** - * @return The delay of execution. - */ + public int getDelay() { return this.delay; } - /** - * @return The type of the wired trigger. - */ + public abstract WiredEffectType getType(); - /** - * @return The delay between two activations. - */ - protected long requiredCooldown() - { - return 500; - } - /** - * @return Returns true if the InteractionWiredEffect can only be executed - * if there is a RoomUnit triggering the wired. - */ public boolean requiresTriggeringUser() { return false; diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredHighscore.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredHighscore.java index 4f8d8cef..f9d030f9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredHighscore.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredHighscore.java @@ -112,10 +112,7 @@ public class InteractionWiredHighscore extends HabboItem } } - /* - FUCK OFF - */ @Override public void serializeExtradata(ServerMessage serverMessage) { diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/football/scoreboards/InteractionFootballScoreboard.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/football/scoreboards/InteractionFootballScoreboard.java index 92add261..2550cd86 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/football/scoreboards/InteractionFootballScoreboard.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/football/scoreboards/InteractionFootballScoreboard.java @@ -13,9 +13,7 @@ import com.eu.habbo.habbohotel.wired.WiredEffectType; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Thanks to Beny for coding football game for Arcturus! - */ + public class InteractionFootballScoreboard extends InteractionGameScoreboard { private int score; @@ -60,11 +58,7 @@ public class InteractionFootballScoreboard extends InteractionGameScoreboard return false; } - /** - * - * @param amount - * @return New score. - */ + public int changeScore(int amount) { this.score += amount; diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/freeze/InteractionFreezeTimer.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/freeze/InteractionFreezeTimer.java index a93227f5..4ba621f9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/freeze/InteractionFreezeTimer.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/freeze/InteractionFreezeTimer.java @@ -47,10 +47,7 @@ public class InteractionFreezeTimer extends InteractionGameTimer super.onClick(client, room, objects); } - /** - * Overrides from the InteractionGameTimer class. - * @return The specific game class which should be linked to this timer. - */ + @Override public Class getGameType() { diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectTeleport.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectTeleport.java index 6fe16d9a..da6fb16a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectTeleport.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectTeleport.java @@ -137,6 +137,7 @@ public class WiredEffectTeleport extends InteractionWiredEffect int currentEffect = habbo.getRoomUnit().getEffectId(); room.giveEffect(habbo, 4); + final WiredEffectTeleport teleportWired = this; Emulator.getThreading().run(new RoomUnitTeleport(habbo.getRoomUnit(), room, item.getX(), item.getY(), item.getZ() + (item.getBaseItem().allowSit() ? item.getBaseItem().getHeight() - 0.50 : 0D), currentEffect), WiredHandler.TELEPORT_DELAY); Emulator.getThreading().run(new Runnable() { @@ -145,7 +146,7 @@ public class WiredEffectTeleport extends InteractionWiredEffect { try { - item.onWalkOn(habbo.getRoomUnit(), room, new Object[]{}); + item.onWalkOn(habbo.getRoomUnit(), room, new Object[]{teleportWired}); } catch (Exception e) {} diff --git a/src/main/java/com/eu/habbo/habbohotel/modtool/WordFilter.java b/src/main/java/com/eu/habbo/habbohotel/modtool/WordFilter.java index 2b4cc99a..8aa42ce9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/modtool/WordFilter.java +++ b/src/main/java/com/eu/habbo/habbohotel/modtool/WordFilter.java @@ -72,12 +72,7 @@ public class WordFilter } } - /** - * Normalises a string to replace all weird unicode characters to regular characters. - * May dispose certain characters (Like Chinese) - * @param message The {@String} to normalise. - * @return A String with only regular characters. - */ + public String normalise(String message) { return Normalizer.normalize(message, Normalizer.Form.NFD) diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/PetManager.java b/src/main/java/com/eu/habbo/habbohotel/pets/PetManager.java index 84516ec8..16cd300b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/PetManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/PetManager.java @@ -523,11 +523,7 @@ public class PetManager return new Pet(set); } - /** - * Deletes a pet from the database. - * @param pet The pet to delete. - * @return true if the pet has been deleted. - */ + public boolean deletePet(AbstractPet pet) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM users_pets WHERE id = ? LIMIT 1")) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index b9f443f8..24e2d2c4 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -1066,17 +1066,7 @@ public class Room implements Comparable, ISerialize, Runnable message.appendString(s); } - /*if(g != null) - { - message.appendInt(58); - message.appendInt(g.getId()); - message.appendString(g.getName()); - message.appendString(g.getBadge()); - } - else - { - message.appendInt(56); - }*/ + int base = 0; @@ -1386,9 +1376,7 @@ public class Room implements Comparable, ISerialize, Runnable if (allowFurniture || (!allowFurniture && !stackContainsRoller)) { - /** - * Redneck way to prevent checking ifregistered each time. - */ + Event furnitureRolledEvent = null; if (Emulator.getPluginManager().isRegistered(FurnitureRolledEvent.class, true)) @@ -2792,10 +2780,7 @@ public class Room implements Comparable, ISerialize, Runnable this.removeHabboItem(this.getHabboItem(id)); } - /** - * Removes an {@see HabboItem} from the list of room items. Does not visually remove it from the room. - * @param item The item to remove. - */ + public void removeHabboItem(HabboItem item) { if (item != null) @@ -2967,14 +2952,7 @@ public class Room implements Comparable, ISerialize, Runnable } - /*items.addAll(this.roomSpecialTypes.getBanzaiTeleporters()); - items.addAll(this.roomSpecialTypes.getNests()); - items.addAll(this.roomSpecialTypes.getPetDrinks()); - items.addAll(this.roomSpecialTypes.getPetFoods()); - items.addAll(this.roomSpecialTypes.getRollers()); - items.addAll(this.roomSpecialTypes.getTriggers()); - items.addAll(this.roomSpecialTypes.getEffects()); - items.addAll(this.roomSpecialTypes.getConditions());*/ + return items; @@ -4773,17 +4751,13 @@ public class Room implements Comparable, ISerialize, Runnable this.pickUpItem(item, null); } - /** - * Ejects all furniture from the room not belonging to the room owner. - */ + public void ejectAll() { this.ejectAll(null); } - /** - * @param habbo The Habbo to exclude to eject its items. - */ + public void ejectAll(Habbo habbo) { THashMap> userItemsMap = new THashMap>(); @@ -4997,9 +4971,7 @@ public class Room implements Comparable, ISerialize, Runnable } } - /* - SELECT SUM(score + team_score) as total_score, COUNT(*) as wins, users.username, score, GROUP_CONCAT(users.username) as usernames FROM room_game_scores INNER JOIN users ON room_game_scores.user_id = users.id WHERE room_id = 0 GROUP BY game_start_timestamp, game_name, team_id ORDER BY total_score ASC, wins DESC LIMIT 10 - */ + if(scoreType == WiredHighscoreScoreType.CLASSIC) { query += "GROUP BY game_start_timestamp, user_id, team_id ORDER BY total_score DESC"; diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java index 50244566..64bfe26b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java @@ -357,17 +357,7 @@ public class RoomManager return room; } - /** - * Creates and preloads a room. - * @param ownerId - * @param ownerName - * @param name - * @param description - * @param modelName - * @param usersMax - * @param categoryId - * @return - */ + public Room createRoom(int ownerId, String ownerName, String name, String description, String modelName, int usersMax, int categoryId) { Room room = null; @@ -396,16 +386,7 @@ public class RoomManager return room; } - /** - * Creates a room for the given Habbo and also preloads the room. - * @param habbo - * @param name - * @param description - * @param modelName - * @param usersMax - * @param categoryId - * @return - */ + public Room createRoomForHabbo(Habbo habbo, String name, String description, String modelName, int usersMax, int categoryId) { Room room = this.createRoom(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), name, description, modelName, usersMax, categoryId); diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomRightLevels.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomRightLevels.java index 65c6f368..d6865b07 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomRightLevels.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomRightLevels.java @@ -2,54 +2,34 @@ package com.eu.habbo.habbohotel.rooms; public enum RoomRightLevels { - /** - * No Rights. - */ + NONE (0), - /** - * Rights given by the room owner. - */ + RIGHTS (1), - /** - * Rights trough guild allowing members to build. - */ + GUILD_RIGHTS(2), - /** - * Rights as Admin of the guild. - */ + GUILD_ADMIN (3), - /** - * Room owner rights. - */ + OWNER (4), - /** - * Moderator rights. - */ + MODERATOR (5), - /** - * Six. Unknown. - */ + SIX (6), - /** - * Seven. Unknown. - */ + SEVEN (7), - /** - * Eight. Unknown. - */ + EIGHT (8), - /** - * Nine. Unknown. - */ + NINE (9); public final int level; diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomSpecialTypes.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomSpecialTypes.java index 51e15d82..e64e582e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomSpecialTypes.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomSpecialTypes.java @@ -71,9 +71,7 @@ public class RoomSpecialTypes this.cycleTasks = new THashSet<>(0); } - /* - Banzai Teleporter - */ + public InteractionBattleBanzaiTeleporter getBanzaiTeleporter(int itemId) { return this.banzaiTeleporters.get(itemId); @@ -108,9 +106,7 @@ public class RoomSpecialTypes } } - /* - Nests - */ + public InteractionNest getNest(int itemId) { return this.nests.get(itemId); @@ -137,9 +133,7 @@ public class RoomSpecialTypes } } - /* - Pet Drinks - */ + public InteractionPetDrink getPetDrink(int itemId) { return this.petDrinks.get(itemId); @@ -166,9 +160,7 @@ public class RoomSpecialTypes } } - /* - Pet Foods. - */ + public InteractionPetFood getPetFood(int itemId) { return this.petFoods.get(itemId); @@ -195,9 +187,7 @@ public class RoomSpecialTypes } } - /* - Pet Toys. - */ + public InteractionPetToy getPetToy(int itemId) { return this.petToys.get(itemId); @@ -224,9 +214,7 @@ public class RoomSpecialTypes } } - /* - Rollers - */ + public InteractionRoller getRoller(int itemId) { synchronized (this.rollers) @@ -256,9 +244,7 @@ public class RoomSpecialTypes return rollers; } - /* - Wired Triggers - */ + public InteractionWiredTrigger getTrigger(int itemId) { synchronized (this.wiredTriggers) @@ -339,9 +325,7 @@ public class RoomSpecialTypes } } - /* - Wired Effects - */ + public InteractionWiredEffect getEffect(int itemId) { synchronized (this.wiredEffects) @@ -422,9 +406,7 @@ public class RoomSpecialTypes } } - /* - Wired Conditions - */ + public InteractionWiredCondition getCondition(int itemId) { synchronized (this.wiredConditions) @@ -508,9 +490,7 @@ public class RoomSpecialTypes } } - /* - Wired Extra - */ + public THashSet getExtras(int x, int y) { synchronized (this.wiredExtras) @@ -561,9 +541,7 @@ public class RoomSpecialTypes return false; } - /* - GameScoreboards - */ + public InteractionGameScoreboard getGameScorebord(int itemId) { return this.gameScoreboards.get(itemId); @@ -690,9 +668,7 @@ public class RoomSpecialTypes } } - /* - GameGates - */ + public InteractionGameGate getGameGate(int itemId) { return this.gameGates.get(itemId); @@ -744,9 +720,7 @@ public class RoomSpecialTypes } } - /* - GameTimers - */ + public InteractionGameTimer getGameTimer(int itemId) { return this.gameTimers.get(itemId); @@ -803,9 +777,7 @@ public class RoomSpecialTypes } } - /* - Freeze Exit Tile - */ + public InteractionFreezeExitTile getFreezeExitTile() { for(InteractionFreezeExitTile t : this.freezeExitTile.values()) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTile.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTile.java index a9a24aee..258ecbea 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTile.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTile.java @@ -11,23 +11,14 @@ public class RoomTile private boolean allowStack = true; private boolean walkable = true; - /** - * Pathfinder - */ + private RoomTile previous = null; private boolean diagonally; private short movementPanelty; private short gCosts; private short hCosts; - /** - * @param x - * @param y - * @param z - * @param state - * @param walkable - * @param allowStack - */ + public RoomTile(short x, short y, short z, RoomTileState state, boolean walkable, boolean allowStack) { this.x = x; diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTileState.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTileState.java index 5ea976cc..b52f58d8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTileState.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomTileState.java @@ -1,8 +1,6 @@ package com.eu.habbo.habbohotel.rooms; -/** - * Created on 6-9-2014 14:44. - */ + public enum RoomTileState { OPEN, diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java index 7ffd56fb..8b9e9e78 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java @@ -107,9 +107,7 @@ public class RoomUnit { try { - /** - * !this.status.containsKey("mv") && - */ + if (!this.isWalking() && !isKicked) { if (this.status.remove("mv") == null) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUserRotation.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUserRotation.java index b3d5522f..f6dbe326 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUserRotation.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUserRotation.java @@ -1,8 +1,6 @@ package com.eu.habbo.habbohotel.rooms; -/** - * Created on 13-9-2014 17:14. - */ + public enum RoomUserRotation { NORTH(0), NORTH_EAST(1), diff --git a/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java b/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java index 2db0dda5..cc8730b9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java @@ -126,9 +126,7 @@ public class Habbo implements Runnable this.client = client; } - /* - Called upon succesfull SSO Login. NOT socket connection. - */ + public void connect() { if (!Emulator.getConfig().getBoolean("networking.tcp.proxy")) @@ -215,34 +213,19 @@ public class Habbo implements Runnable } } - /** - * Checks if the Habbo has the allowed permission. - * - * @param key The permission to check. - * @return True if the Habbo has the permission. - */ + public boolean hasPermission(String key) { return hasPermission(key, false); } - /** - * Checks if the Habbo has the allowed permission. - * - * @param key The permission to check. - * @param hasRoomRights True if the Habbo is the room owner. - * @return True if the Habbo has the permission. - */ + public boolean hasPermission(String key, boolean hasRoomRights) { return Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this, key, hasRoomRights); } - /** - * Gives credits to the Habbo and updates the credits balance in game. - * - * @param credits The amount of credits to give. - */ + public void giveCredits(int credits) { if (credits == 0) @@ -256,11 +239,7 @@ public class Habbo implements Runnable this.client.sendResponse(new UserCreditsComposer(this.client.getHabbo())); } - /** - * Gives pixels to the Habbo and updates the pixels balance in game. - * - * @param pixels The amount of pixels to give. - */ + public void givePixels(int pixels) { if (pixels == 0) @@ -275,22 +254,13 @@ public class Habbo implements Runnable this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo())); } - /** - * Gives points to the Habbo and updates the points balance in game. - * - * @param points The amount of points to give. - */ + public void givePoints(int points) { this.givePoints(Emulator.getConfig().getInt("seasonal.primary.type"), points); } - /** - * Gives points to the Habbo and updates the points balance in game. - * - * @param type The points type to give. - * @param points The amount of points to give. - */ + public void givePoints(int type, int points) { if (points == 0) @@ -304,22 +274,13 @@ public class Habbo implements Runnable this.client.sendResponse(new UserPointsComposer(this.client.getHabbo().getHabboInfo().getCurrencyAmount(type), event.points, event.type)); } - /** - * Whispers a message to the Habbo. - * - * @param message The message to whisper. - */ + public void whisper(String message) { this.whisper(message, this.habboStats.chatColor); } - /** - * Whispers a message to the Habbo. - * - * @param message The message to whisper. - * @param bubble The chat bubble type to use. - */ + public void whisper(String message, RoomChatMessageBubbles bubble) { if (this.getRoomUnit().isInRoom()) @@ -328,22 +289,13 @@ public class Habbo implements Runnable } } - /** - * Makes the Habbo talk in the room. - * - * @param message The message to say. - */ + public void talk(String message) { this.talk(message, this.habboStats.chatColor); } - /** - * Makes the Habbo talk in the room. - * - * @param message The message to say. - * @param bubble The chat bubble type to use. - */ + public void talk(String message, RoomChatMessageBubbles bubble) { if (this.getRoomUnit().isInRoom()) @@ -352,22 +304,13 @@ public class Habbo implements Runnable } } - /** - * Makes the Habbo shout in the room. - * - * @param message The message to shout. - */ + public void shout(String message) { this.shout(message, this.habboStats.chatColor); } - /** - * Makes the Habbo shout in the room. - * - * @param message The message to shout. - * @param bubble The chat bubble type to use. - */ + public void shout(String message, RoomChatMessageBubbles bubble) { if (this.getRoomUnit().isInRoom()) @@ -376,51 +319,31 @@ public class Habbo implements Runnable } } - /** - * Sends an alert to the Habbo. - * - * @param message The message the alert contains. - */ + public void alert(String message) { this.client.sendResponse(new GenericAlertComposer(message)); } - /** - * Sends an old style alert to the Habbo. - * - * @param messages The messages the alert contains. - */ + public void alert(String[] messages) { this.client.sendResponse(new MessagesForYouComposer(messages)); } - /** - * Sends an alert with url to the Habbo. - * - * @param message The message the alert contains. - * @param url The URL the alert contains. - */ + public void alertWithUrl(String message, String url) { this.client.sendResponse(new StaffAlertWithLinkComposer(message, url)); } - /** - * Forwards the Habbo to a room. - * - * @param id The id of the room to go to. - */ + public void goToRoom(int id) { this.client.sendResponse(new ForwardToRoomComposer(id)); } - /** - * Adds a new furniture to the inventory and also updates the client. - * @param item The furniture to add. - */ + public void addFurniture(HabboItem item) { this.habboInventory.getItemsComponent().addItem(item); @@ -428,10 +351,7 @@ public class Habbo implements Runnable this.client.sendResponse(new InventoryRefreshComposer()); } - /** - * Adds new furniture to the inventory and also updates the client. - * @param items The furniture to add. - */ + public void addFurniture(THashSet items) { this.habboInventory.getItemsComponent().addItems(items); @@ -439,40 +359,28 @@ public class Habbo implements Runnable this.client.sendResponse(new InventoryRefreshComposer()); } - /** - * Removes a furniture from the inventory and also updates the client. - * @param item The furniture to remove. - */ + public void removeFurniture(HabboItem item) { this.habboInventory.getItemsComponent().removeHabboItem(item); this.client.sendResponse(new RemoveHabboItemComposer(item.getId())); } - /** - * Adds a bot to the HabboInventory. - * @param bot The bot to add. - */ + public void addBot(Bot bot) { this.habboInventory.getBotsComponent().addBot(bot); this.client.sendResponse(new AddBotComposer(bot)); } - /** - * Removes a bot from the HabboInventory. - * @param bot The bot to remove. - */ + public void removeBot(Bot bot) { this.habboInventory.getBotsComponent().removeBot(bot); this.client.sendResponse(new RemoveBotComposer(bot)); } - /** - * Deletes a bot from the database. Also picks it up from the room or removes it from the inventory. - * @param bot The Bot to delete. - */ + public void deleteBot(Bot bot) { this.removeBot(bot); @@ -480,31 +388,21 @@ public class Habbo implements Runnable Emulator.getGameEnvironment().getBotManager().deleteBot(bot); } - /** - * Adds a pet to the HabboInventory. - * @param pet The Pet to add. - */ + public void addPet(Pet pet) { this.habboInventory.getPetsComponent().addPet(pet); this.client.sendResponse(new AddPetComposer(pet)); } - /** - * Removes a pet from the HabboInventory. - * @param pet The Pet to remove. - */ + public void removePet(Pet pet) { this.habboInventory.getPetsComponent().removePet(pet); this.client.sendResponse(new RemovePetComposer(pet)); } - /** - * Creates a new badge and adds it to the HabboInventory. - * @param code The badgecode to use. - * @return true if succesfully added. False otherwise. - */ + public boolean addBadge(String code) { if (this.habboInventory.getBadgesComponent().getBadge(code) == null) @@ -518,10 +416,7 @@ public class Habbo implements Runnable return false; } - /** - * Deletes a badge from the database and removes it from the inventory. - * @param badge The Badge to delete. - */ + public void deleteBadge(HabboBadge badge) { this.habboInventory.getBadgesComponent().removeBadge(badge); diff --git a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java index 25d89a64..a58ca832 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java @@ -313,6 +313,9 @@ public abstract class HabboItem implements Runnable, IEventTriggers @Override public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { + if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired) + return; + WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this}); } diff --git a/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java b/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java index 36601509..bc4cc4be 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java @@ -321,13 +321,7 @@ public class HabboManager return nameChanges; } - /** - * Sets the rank for an user. - * Updates the database if the user is offline. - * @param userId The ID of the user. - * @param rankId The new rank ID for the user. - * @throws Exception When the rank does not exist. - */ + public void setRank(int userId, int rankId) throws Exception { Habbo habbo = this.getHabbo(userId); diff --git a/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java b/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java index 8ab5dc41..c4c90e8d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java +++ b/src/main/java/com/eu/habbo/habbohotel/wired/WiredHandler.java @@ -83,7 +83,8 @@ public class WiredHandler public static boolean handle(InteractionWiredTrigger trigger, final RoomUnit roomUnit, final Room room, final Object[] stuff) { - if(trigger.execute(roomUnit, room, stuff)) + long millis = System.currentTimeMillis(); + if(trigger.canExecute(millis) && trigger.execute(roomUnit, room, stuff)) { trigger.activateBox(room); @@ -123,7 +124,6 @@ public class WiredHandler Collections.shuffle(effectList); } - long millis = System.currentTimeMillis(); if (hasExtraUnseen) { diff --git a/src/main/java/com/eu/habbo/messages/incoming/Incoming_1006.java b/src/main/java/com/eu/habbo/messages/incoming/Incoming_1006.java index d52066bd..f2578e0d 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/Incoming_1006.java +++ b/src/main/java/com/eu/habbo/messages/incoming/Incoming_1006.java @@ -4,442 +4,32 @@ public class Incoming_1006 { - /* - Achievements - */ + //public static final int RequestAchievementsEvent = 2562; - /* - Wired - */ - /*public static final int WiredTriggerSaveDataEvent = 3201; - public static final int WiredEffectSaveDataEvent = 3006; - public static final int WiredConditionSaveDataEvent = 1041;*/ - - /* - Pets - */ - /*public static final int RequestPetInformationEvent = 777; - public static final int PetPickupEvent = 863; - public static final int ScratchPetEvent = 3464; - public static final int RequestPetTrainingPanelEvent = 2476; - public static final int HorseUseItemEvent = 1616; - public static final int HorseRideSettingsEvent = 2448; - public static final int HorseRideEvent = 3268;*/ - - /* - Groups - */ - /* public static final int RequestGuildBuyRoomsEvent = 701; - public static final int RequestGuildPartsEvent = 2344; - public static final int RequestGuildBuyEvent = 872; - public static final int RequestGuildInfoEvent = 2079; - public static final int RequestGuildManageEvent = 2418; - public static final int RequestGuildMembersEvent = 2382; - public static final int RequestGuildJoinEvent = 77; - public static final int GuildChangeNameDescEvent = 3232; - public static final int GuildChangeBadgeEvent = 1475; - public static final int GuildChangeColorsEvent = 463; - public static final int GuildRemoveMemberEvent = 3002; - public static final int GuildRemoveAdminEvent = 3264; - public static final int GuildChangeSettingsEvent = 2156; - public static final int GuildAcceptMembershipEvent = 1066; - public static final int GuildDeclineMembershipEvent = 1320; - public static final int GuildSetAdminEvent = 2957; - public static final int GuildSetFavoriteEvent = 1463; - public static final int RequestOwnGuildsEvent = 2240; - public static final int RequestGuildFurniWidgetEvent = 3031; - - /* - Trading - */ - /*public static final int TradeStartEvent = 466; - public static final int TradeOfferItemEvent = 2223; - public static final int TradeCancelOfferItemEvent = 373; - public static final int TradeAcceptEvent = 1062; - public static final int TradeUnAcceptEvent = 1131; - public static final int TradeConfirmEvent = 1144; - public static final int TradeCloseEvent = 3387; - - /* - ModTool - */ - /* public static final int ModToolRequestRoomInfoEvent = 225; - public static final int ModToolRequestRoomChatlogEvent = 1903; - public static final int ModToolRequestUserInfoEvent = 3077; - public static final int ModToolPickTicketEvent = 3975; - public static final int ModToolAlertEvent = 1980; - public static final int ModToolKickEvent = 3418; - public static final int ModToolBanEvent = 2930; - public static final int ModToolWarnEvent = 3763; - public static final int ModToolRequestUserChatlogEvent = 203; - public static final int ModToolRoomAlertEvent = 295; - public static final int ModToolChangeRoomSettingsEvent = 2530; - public static final int ModToolRequestRoomVisitsEvent = 2549; - - /* - Catalog - */ - /*public static final int Unknown3 = 3794; //Catalogue Initialized Composer? - public static final int RequestRecylerLogicEvent = 1077; - public static final int RequestCatalogIndexEvent = 81; - public static final int GetMarketplaceConfigEvent = 1952; //Configuration IDs composer? - public static final int RequestDiscountEvent = 3794; - public static final int RequestCatalogModeEvent = 3406; - public static final int RequestGiftConfigurationEvent = 382; - public static final int RequestCatalogPageEvent = 1754; - public static final int CatalogBuyItemEvent = 2967; - public static final int CatalogBuyItemAsGiftEvent = 2474; - public static final int RedeemVoucherEvent = 1571; - public static final int ReloadRecyclerEvent = 2779; - public static final int RecycleEvent = 2318; - public static final int OpenRecycleBoxEvent = 3977; - public static final int RequestPetBreedsEvent = 1064; - public static final int CheckPetNameEvent = 678; - public static final int GetClubDataEvent = 1608; - - /* - Polls - */ - /* public static final int CancelPollEvent = 276; - public static final int GetPollDataEvent = 1960; - public static final int AnswerPollEvent = 1847; - - /* - Marketplace - */ - /*public static final int RequestOwnItemsEvent = 829; - public static final int TakeBackItemEvent = 2910; - public static final int RequestOffersEvent = 541; - public static final int RequestItemInfoEvent = 36; - public static final int BuyItemEvent = 3878; - public static final int RequestSellItemEvent = 2087; - public static final int SellItemEvent = 172; - public static final int RequestCreditsEvent = 2138; - /* - Handshake - */ - /* public static final int ReleaseVersionEvent = 4000; - public static final int RequestBannerToken = 2619; - public static final int GenerateSecretKeyEvent = 3575; - public static final int MachineIDEvent = 512; - public static final int SecureLoginEvent = 1309; - - /* - Friends - */ - /*public static final int RequestFriendsEvent = 776; - public static final int ChangeRelationEvent = 2521; - public static final int RemoveFriendEvent = 2786; - public static final int SearchUserEvent = 1267; - public static final int FriendRequestEvent = 3765; - public static final int AcceptFriendRequest = 333; - public static final int FriendPrivateMessageEvent = 1527; - public static final int RequestFriendRequestEvent = 275; - public static final int StalkFriendEvent = 3394; - - /* - HotelView - */ - /* public static final int HotelViewEvent = 3266; - public static final int RequestBonusRareEvent = 1199; - public static final int RequestNewsListEvent = 896; - public static final int HotelViewDataEvent = 595; - - /* - Navigator - */ - /*public static final int RequestRoomCategoriesEvent = 1431; - public static final int RequestPublicRoomsEvent = 3735; - public static final int RequestPopularRoomsEvent = 235; - public static final int RequestHighestScoreRoomsEvent = 1728; - public static final int RequestMyRoomsEvent = 2676; - public static final int RequestCanCreateRoomEvent = 3844; - public static final int RequestPromotedRoomsEvent = 3030; - public static final int RequestCreateRoomEvent = 3524; - public static final int RequestTagsEvent = 1337; - public static final int SearchRoomsByTagEvent = 1956; - public static final int SearchRoomsEvent = 3551; - public static final int SearchRoomsFriendsNowEvent = 3306; - public static final int SearchRoomsFriendsOwnEvent = 3478; - public static final int SearchRoomsWithRightsEvent = 3785; - public static final int SearchRoomsInGroupEvent = 1160; - public static final int SearchRoomsMyFavoriteEvent = 1532; - public static final int SearchRoomsVisitedEvent = 589; - /* - Rooms - */ - /* public static final int RequestRoomLoadEvent = 3751; //3751 - public static final int RoomVoteEvent = 242; - public static final int RequestRoomSettingsEvent = 3741; - public static final int RequestHeightmapEvent = 308; - public static final int RequestRoomDataEvent = 183; - public static final int RoomSettingsSaveEvent = 2384; - public static final int RoomUserTalkEvent = 3349; - public static final int RoomUserShoutEvent = 936; - public static final int RoomUserWhisperEvent = 1362; - public static final int RoomUserActionEvent = 475; - public static final int RoomUserSitEvent = 484; - public static final int RoomUserDanceEvent = 1139; - public static final int RoomUserSignEvent = 2189; - public static final int RoomUserGiveRespectEvent = 2041; - public static final int RoomUserWalkEvent = 951; - public static final int RoomPlaceItemEvent = 474; - public static final int RotateMoveItemEvent = 194; - public static final int MoveWallItemEvent = 1029; - public static final int RoomPickupItemEvent = 152; - public static final int RoomPlacePaintEvent = 874; - public static final int RoomUserStartTypingEvent = 3684; - public static final int RoomUserStopTypingEvent = 2005; - public static final int ToggleFloorItemEvent = 120; - public static final int ToggleWallItemEvent = 2650; - public static final int RoomUserLookAtPoint = 1365; - public static final int RoomBackgroundEvent = 2715; - public static final int MannequinSaveNameEvent = 2098; - public static final int MannequinSaveLookEvent = 1804; - public static final int AdvertisingSaveEvent = 68; - public static final int RoomUserDropHandItemEvent = 157; - public static final int BotPlaceEvent = 148; - public static final int BotPickupEvent = 2865; - public static final int BotSaveSettingsEvent = 1384; - public static final int BotSettingsEvent = 3098; - public static final int TriggerDiceEvent = 987; - public static final int CloseDiceEvent = 1739; - public static final int TriggerColorWheelEvent = 2367; - public static final int MoodLightSettingsEvent = 2468; - public static final int MoodLightTurnOnEvent = 1181; - public static final int RedeemItemEvent = 3599; - public static final int RequestRoomRightsEvent = 2928; - public static final int RoomRemoveAllRightsEvent = 405; - public static final int RoomUserGiveRightsEvent = 2221; - public static final int RoomUserRemoveRightsEvent = 3639; - public static final int PetPlaceEvent = 3711; - public static final int RoomUserKickEvent = 1874; - public static final int SetStackHelperHeightEvent = 2540; - /* - Users - */ - /* public static final int RequestUserDataEvent = 112; - public static final int RequestUserCreditsEvent = 938; - public static final int RequestUserClubEvent = 3874; - public static final int RequestMeMenuSettingsEvent = 671; - public static final int RequestUserCitizinShipEvent = 3096; - public static final int RequestUserProfileEvent = 532; - public static final int RequestProfileFriendsEvent = 3925; - public static final int RequestUserTagsEvent = 3102; - public static final int RequestUserWardrobeEvent = 1251; - public static final int SaveWardrobeEvent = 637; - public static final int UserSaveLookEvent = 2404; - public static final int SaveMottoEvent = 2832; - public static final int UserWearBadgeEvent = 2473; - public static final int RequestWearingBadgesEvent = 3968; - /* - Inventory - */ - /* public static final int RequestInventoryItemsEvent = 372; // 1223 - public static final int RequestInventoryPetsEvent = 1900; - public static final int RequestInventoryBadgesEvent = 3072; - public static final int RequestInventoryBotsEvent = 1351; - /* - Not correctly implemented - */ - /*public static final int RequestResolutionEvent = 1854;*/ - /*public static final int MannequinSaveLookEvent = 2252;//1804 - public static final int RequestCatalogPageEvent = 1904;//1754 - public static final int RequestWearingBadgesEvent = 3364;//3968 - public static final int BotPickupEvent = 1890;//2865 - public static final int HorseRideEvent = 1425;//3268 - public static final int RequestCreateRoomEvent = 1075;//3524 - public static final int SaveMottoEvent = 3060;//2832 - public static final int GenerateSecretKeyEvent = 2342;//3575 - public static final int ModToolAlertEvent = 641;//1980 - public static final int TradeAcceptEvent = 843;//1062 - public static final int RequestCatalogModeEvent = 2941;//3406 - public static final int RequestUserCreditsEvent = 3985;//938 - public static final int FriendPrivateMessageEvent = 2046;//1527 - public static final int CloseDiceEvent = 2438;//1739 - public static final int RoomUserRemoveRightsEvent = 1872;//3639 - public static final int GuildDeclineMembershipEvent = 3464;//1320 - public static final int AnswerPollEvent = 3647;//1847 - public static final int UserWearBadgeEvent = 2265;//2473 - public static final int RoomVoteEvent = -242;//242 - public static final int RoomUserSignEvent = 1037;//2189 - public static final int RequestUserDataEvent = 3243;//112 - public static final int RoomUserShoutEvent = 1559;//936 - public static final int ScratchPetEvent = 2363;//3464 - public static final int RoomUserWalkEvent = 3264;//951 - public static final int RequestUserTagsEvent = 3364;//3102 - public static final int RequestTagsEvent = 3906;//1337 - public static final int GetMarketplaceConfigEvent = 1142;//1952 - public static final int RequestHeightmapEvent = 2450;//308 - public static final int TradeCloseEvent = 759;//3387 - public static final int CatalogBuyItemEvent = 3269;//2967 - public static final int RequestGuildMembersEvent = 556;//2382 - public static final int RequestPetInformationEvent = 1330;//777 - public static final int RoomUserWhisperEvent = 3700;//1362 - public static final int ModToolRequestUserInfoEvent = 852;//3077 - public static final int RotateMoveItemEvent = 3753;//194 - public static final int CancelPollEvent = 797;//276 - public static final int RequestRoomLoadEvent = 2144;//3751 //2086 //2144 - public static final int RequestGuildPartsEvent = 2165;//2344 - public static final int RoomPlacePaintEvent = 2534;//874 - public static final int RequestPopularRoomsEvent = 1627;//2346;//235 - public static final int ModToolRequestRoomInfoEvent = 346;//225 - public static final int FriendRequestEvent = 3667;//3765 - public static final int RecycleEvent = 2627;//2318 - public static final int RequestRoomCategoriesEvent = 783;//1431 - public static final int ToggleWallItemEvent = 3649;//2650 - public static final int RoomUserTalkEvent = 2462;//3349 - public static final int HotelViewDataEvent = 3813;//595 - public static final int RoomUserDanceEvent = 1764;//1139 - public static final int RequestUserProfileEvent = 1299;//532 - public static final int SearchRoomsFriendsNowEvent = 542;//3306 - public static final int SetStackHelperHeightEvent = 3280;//2540 - public static final int RedeemVoucherEvent = 114;//1571 - public static final int HorseUseItemEvent = 1105;//1616 - public static final int BuyItemEvent = 3161;//3878 - public static final int AdvertisingSaveEvent = 3645;//68 - public static final int RequestPetTrainingPanelEvent = 2867;//2476 - public static final int RoomBackgroundEvent = 1275;//2715 - public static final int RequestNewsListEvent = 1205;//896 - public static final int RequestPromotedRoomsEvent = 3527;//3030 - public static final int GuildSetAdminEvent = 1954;//2957 - public static final int GetClubDataEvent = 1232;//1608 - public static final int RequestMeMenuSettingsEvent = 254;//671 - public static final int MannequinSaveNameEvent = 2872;//2098 - public static final int SellItemEvent = 1147;//172 - public static final int GuildAcceptMembershipEvent = 816;//1066 - public static final int RequestBannerToken = 1497;//2619 - public static final int RequestRecylerLogicEvent = 2669;//1077 - public static final int RequestGuildJoinEvent = 1971;//77 - public static final int RequestCatalogIndexEvent = 1789;//81 - public static final int RequestInventoryPetsEvent = 3555;//1900 - public static final int ModToolRequestRoomVisitsEvent = 1854;//2549 - public static final int ModToolWarnEvent = 2891;//3763 - public static final int RequestItemInfoEvent = 2326;//36 - public static final int ModToolRequestRoomChatlogEvent = 2285;//1903 - public static final int UserSaveLookEvent = 2889;//2404 - public static final int ToggleFloorItemEvent = 2970;//120 - public static final int TradeUnAcceptEvent = 1287;//1131 - public static final int WiredTriggerSaveDataEvent = 3931;//3201 - public static final int RoomRemoveAllRightsEvent = 36;//405 - public static final int TakeBackItemEvent = 560;//2910 - public static final int OpenRecycleBoxEvent = 3502;//3977 - public static final int GuildChangeNameDescEvent = 3503;//3232 - public static final int RequestSellItemEvent = 1380;//2087 - public static final int ModToolChangeRoomSettingsEvent = 2571;//2530 - public static final int ModToolRequestUserChatlogEvent = 600;//203 - public static final int GuildChangeSettingsEvent = 1026;//2156 - public static final int RoomUserDropHandItemEvent = 1699;//157 - public static final int RequestProfileFriendsEvent = 3510;//3925 - public static final int TradeCancelOfferItemEvent = 2646;//373 - public static final int TriggerDiceEvent = 1000;//987 - public static final int GetPollDataEvent = 491;//1960 - public static final int MachineIDEvent = -512;//512 - public static final int RequestDiscountEvent = 458;//3794 - public static final int RequestFriendRequestEvent = 1823;//275 - public static final int RoomSettingsSaveEvent = 1824;//2384 - public static final int AcceptFriendRequest = 3110;//333 - public static final int ReleaseVersionEvent = 4000;//4000 - public static final int SearchRoomsMyFavoriteEvent = 1181;//1532 - public static final int TradeStartEvent = 2842;//466 - public static final int ChangeRelationEvent = 668;//2521 - public static final int RoomUserSitEvent = 2292;//484 - public static final int RequestCanCreateRoomEvent = 3929;//3844 - public static final int ModToolKickEvent = 1132;//3418 - public static final int MoveWallItemEvent = 3043;//1029 - public static final int SearchRoomsEvent = 2188;//3551 - public static final int RequestHighestScoreRoomsEvent = 1379;//1728 - public static final int CatalogBuyItemAsGiftEvent = 3186;//2474 - public static final int RoomUserGiveRespectEvent = 2901;//2041 - public static final int RemoveFriendEvent = 3767;//2786 - public static final int SearchRoomsFriendsOwnEvent = 1870;//3478 - public static final int GuildSetFavoriteEvent = 2864;//1463 - public static final int PetPlaceEvent = 81;//3711 - public static final int BotSettingsEvent = 3630;//3098 - public static final int StalkFriendEvent = 3829;//3394 - public static final int RoomPickupItemEvent = 2316;//152 - public static final int RedeemItemEvent = 3333;//3599 - public static final int RequestFriendsEvent = 2386;//776 - public static final int RequestAchievementsEvent = 3474;//2562 - public static final int GuildChangeColorsEvent = 3260;//463 - public static final int RequestInventoryBadgesEvent = 2480;//3072 - public static final int RequestPetBreedsEvent = 3851;//1064 - public static final int GuildChangeBadgeEvent = 2754;//1475 - public static final int ModToolBanEvent = 574;//2930 - public static final int SaveWardrobeEvent = 1188;//637 - public static final int HotelViewEvent = 1784;//3266 - public static final int ModToolPickTicketEvent = 3088;//3975 - public static final int ModToolReleaseTicketEvent = 734; - public static final int ModToolCloseTicketEvent = 1837; - public static final int TriggerColorWheelEvent = 2882;//2367 - public static final int SearchRoomsByTagEvent = -1956;//1956 - public static final int RequestPublicRoomsEvent = 2021;//3735 //UPDATED OLD 3178 - public static final int RequestResolutionEvent = 3871;//1854 - public static final int Unknown3 = 458;//3794 - public static final int RequestInventoryItemsEvent = 1920;//372 - public static final int ModToolRoomAlertEvent = 1863;//295 - public static final int WiredEffectSaveDataEvent = 1645;//3006 - public static final int CheckPetNameEvent = 3567;//678 - public static final int SecureLoginEvent = 1957;//1309 - public static final int BotSaveSettingsEvent = 736;//1384 - public static final int RequestGuildBuyEvent = 2594;//872 - public static final int SearchUserEvent = 3026;//1267 - public static final int GuildRemoveMemberEvent = 353;//3002 - public static final int WiredConditionSaveDataEvent = 2096;//1041 - public static final int RoomUserLookAtPoint = 2115;//1365 - public static final int MoodLightTurnOnEvent = 883;//1181 - public static final int MoodLightSettingsEvent = 3878;//2468 - public static final int RequestMyRoomsEvent = 2360;//2676 - public static final int RequestCreditsEvent = 1623;//2138 - public static final int SearchRoomsInGroupEvent = 2066;//1160 - public static final int HorseRideSettingsEvent = 1731;//2448 - public static final int HandleDoorbellEvent = 91; - public static final int RoomUserKickEvent = 1718;//1874 - public static final int RoomPlaceItemEvent = 2554;//474 - public static final int RequestInventoryBotsEvent = 3549;//1351 - public static final int RequestUserWardrobeEvent = 3057;//1251 - public static final int RequestRoomRightsEvent = 2197;//2928 - public static final int RequestGuildBuyRoomsEvent = 1035;//701 - public static final int BotPlaceEvent = 2143;//148 - public static final int SearchRoomsWithRightsEvent = 307;//3785 - public static final int RequestBonusRareEvent = 1966;//1199 - public static final int GuildRemoveAdminEvent = 864;//3264 - public static final int RequestRoomSettingsEvent = 2176;//3741 - public static final int RequestOffersEvent = 2688;//541 - public static final int RequestUserCitizinShipEvent = 2151;//3096 - public static final int RoomUserStopTypingEvent = 3890;//2005 - public static final int RoomUserStartTypingEvent = 3896;//3684 - public static final int RequestGuildManageEvent = 3169;//2418 - public static final int RequestUserClubEvent = 2189;//3874 - public static final int PetPickupEvent = -3167;//863 - public static final int RequestOwnGuildsEvent = 484;//2240 - public static final int SearchRoomsVisitedEvent = 24;//589 - public static final int TradeOfferItemEvent = 1324;//2223 - public static final int TradeConfirmEvent = 3866;//1144 - public static final int RoomUserGiveRightsEvent = 3167;//2221 - public static final int RequestGuildInfoEvent = 331;//2079 - public static final int ReloadRecyclerEvent = 72;//2779 - public static final int RoomUserActionEvent = 2000;//475 - public static final int RequestGiftConfigurationEvent = 102;//382 - public static final int RequestRoomDataEvent = 2086;//183 - public static final int RequestRoomHeightmapEvent = 3075; - public static final int RequestGuildFurniWidgetEvent = 3239;//3031 - public static final int RequestOwnItemsEvent = 1486;//829 - public static final int RequestReportRoomEvent = 2343; - public static final int ReportEvent = 330; - public static final int TriggerOneWayGateEvent = 408; - public static final int FloorPlanEditorSaveEvent = 2324; - public static final int FloorPlanEditorRequestDoorSettingsEvent = 1168; - public static final int FloorPlanEditorRequestBlockedTilesEvent = 1241;*/ + + + + + + + + + + + + + + + public static final int MannequinSaveLookEvent = 3770;//1804 //Updated public static final int RequestCatalogPageEvent = 2914;//1754 //Updated diff --git a/src/main/java/com/eu/habbo/messages/incoming/Incoming_Back.java b/src/main/java/com/eu/habbo/messages/incoming/Incoming_Back.java index ab741322..3cd829a1 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/Incoming_Back.java +++ b/src/main/java/com/eu/habbo/messages/incoming/Incoming_Back.java @@ -4,442 +4,32 @@ public class Incoming_Back { - /* - Achievements - */ + //public static final int RequestAchievementsEvent = 2562; - /* - Wired - */ - /*public static final int WiredTriggerSaveDataEvent = 3201; - public static final int WiredEffectSaveDataEvent = 3006; - public static final int WiredConditionSaveDataEvent = 1041;*/ - - /* - Pets - */ - /*public static final int RequestPetInformationEvent = 777; - public static final int PetPickupEvent = 863; - public static final int ScratchPetEvent = 3464; - public static final int RequestPetTrainingPanelEvent = 2476; - public static final int HorseUseItemEvent = 1616; - public static final int HorseRideSettingsEvent = 2448; - public static final int HorseRideEvent = 3268;*/ - - /* - Groups - */ - /* public static final int RequestGuildBuyRoomsEvent = 701; - public static final int RequestGuildPartsEvent = 2344; - public static final int RequestGuildBuyEvent = 872; - public static final int RequestGuildInfoEvent = 2079; - public static final int RequestGuildManageEvent = 2418; - public static final int RequestGuildMembersEvent = 2382; - public static final int RequestGuildJoinEvent = 77; - public static final int GuildChangeNameDescEvent = 3232; - public static final int GuildChangeBadgeEvent = 1475; - public static final int GuildChangeColorsEvent = 463; - public static final int GuildRemoveMemberEvent = 3002; - public static final int GuildRemoveAdminEvent = 3264; - public static final int GuildChangeSettingsEvent = 2156; - public static final int GuildAcceptMembershipEvent = 1066; - public static final int GuildDeclineMembershipEvent = 1320; - public static final int GuildSetAdminEvent = 2957; - public static final int GuildSetFavoriteEvent = 1463; - public static final int RequestOwnGuildsEvent = 2240; - public static final int RequestGuildFurniWidgetEvent = 3031; - - /* - Trading - */ - /*public static final int TradeStartEvent = 466; - public static final int TradeOfferItemEvent = 2223; - public static final int TradeCancelOfferItemEvent = 373; - public static final int TradeAcceptEvent = 1062; - public static final int TradeUnAcceptEvent = 1131; - public static final int TradeConfirmEvent = 1144; - public static final int TradeCloseEvent = 3387; - - /* - ModTool - */ - /* public static final int ModToolRequestRoomInfoEvent = 225; - public static final int ModToolRequestRoomChatlogEvent = 1903; - public static final int ModToolRequestUserInfoEvent = 3077; - public static final int ModToolPickTicketEvent = 3975; - public static final int ModToolAlertEvent = 1980; - public static final int ModToolKickEvent = 3418; - public static final int ModToolBanEvent = 2930; - public static final int ModToolWarnEvent = 3763; - public static final int ModToolRequestUserChatlogEvent = 203; - public static final int ModToolRoomAlertEvent = 295; - public static final int ModToolChangeRoomSettingsEvent = 2530; - public static final int ModToolRequestRoomVisitsEvent = 2549; - - /* - Catalog - */ - /*public static final int Unknown3 = 3794; //Catalogue Initialized Composer? - public static final int RequestRecylerLogicEvent = 1077; - public static final int RequestCatalogIndexEvent = 81; - public static final int GetMarketplaceConfigEvent = 1952; //Configuration IDs composer? - public static final int RequestDiscountEvent = 3794; - public static final int RequestCatalogModeEvent = 3406; - public static final int RequestGiftConfigurationEvent = 382; - public static final int RequestCatalogPageEvent = 1754; - public static final int CatalogBuyItemEvent = 2967; - public static final int CatalogBuyItemAsGiftEvent = 2474; - public static final int RedeemVoucherEvent = 1571; - public static final int ReloadRecyclerEvent = 2779; - public static final int RecycleEvent = 2318; - public static final int OpenRecycleBoxEvent = 3977; - public static final int RequestPetBreedsEvent = 1064; - public static final int CheckPetNameEvent = 678; - public static final int GetClubDataEvent = 1608; - - /* - Polls - */ - /* public static final int CancelPollEvent = 276; - public static final int GetPollDataEvent = 1960; - public static final int AnswerPollEvent = 1847; - - /* - Marketplace - */ - /*public static final int RequestOwnItemsEvent = 829; - public static final int TakeBackItemEvent = 2910; - public static final int RequestOffersEvent = 541; - public static final int RequestItemInfoEvent = 36; - public static final int BuyItemEvent = 3878; - public static final int RequestSellItemEvent = 2087; - public static final int SellItemEvent = 172; - public static final int RequestCreditsEvent = 2138; - /* - Handshake - */ - /* public static final int ReleaseVersionEvent = 4000; - public static final int RequestBannerToken = 2619; - public static final int GenerateSecretKeyEvent = 3575; - public static final int MachineIDEvent = 512; - public static final int SecureLoginEvent = 1309; - - /* - Friends - */ - /*public static final int RequestFriendsEvent = 776; - public static final int ChangeRelationEvent = 2521; - public static final int RemoveFriendEvent = 2786; - public static final int SearchUserEvent = 1267; - public static final int FriendRequestEvent = 3765; - public static final int AcceptFriendRequest = 333; - public static final int FriendPrivateMessageEvent = 1527; - public static final int RequestFriendRequestEvent = 275; - public static final int StalkFriendEvent = 3394; - - /* - HotelView - */ - /* public static final int HotelViewEvent = 3266; - public static final int RequestBonusRareEvent = 1199; - public static final int RequestNewsListEvent = 896; - public static final int HotelViewDataEvent = 595; - - /* - Navigator - */ - /*public static final int RequestRoomCategoriesEvent = 1431; - public static final int RequestPublicRoomsEvent = 3735; - public static final int RequestPopularRoomsEvent = 235; - public static final int RequestHighestScoreRoomsEvent = 1728; - public static final int RequestMyRoomsEvent = 2676; - public static final int RequestCanCreateRoomEvent = 3844; - public static final int RequestPromotedRoomsEvent = 3030; - public static final int RequestCreateRoomEvent = 3524; - public static final int RequestTagsEvent = 1337; - public static final int SearchRoomsByTagEvent = 1956; - public static final int SearchRoomsEvent = 3551; - public static final int SearchRoomsFriendsNowEvent = 3306; - public static final int SearchRoomsFriendsOwnEvent = 3478; - public static final int SearchRoomsWithRightsEvent = 3785; - public static final int SearchRoomsInGroupEvent = 1160; - public static final int SearchRoomsMyFavoriteEvent = 1532; - public static final int SearchRoomsVisitedEvent = 589; - /* - Rooms - */ - /* public static final int RequestRoomLoadEvent = 3751; //3751 - public static final int RoomVoteEvent = 242; - public static final int RequestRoomSettingsEvent = 3741; - public static final int RequestHeightmapEvent = 308; - public static final int RequestRoomDataEvent = 183; - public static final int RoomSettingsSaveEvent = 2384; - public static final int RoomUserTalkEvent = 3349; - public static final int RoomUserShoutEvent = 936; - public static final int RoomUserWhisperEvent = 1362; - public static final int RoomUserActionEvent = 475; - public static final int RoomUserSitEvent = 484; - public static final int RoomUserDanceEvent = 1139; - public static final int RoomUserSignEvent = 2189; - public static final int RoomUserGiveRespectEvent = 2041; - public static final int RoomUserWalkEvent = 951; - public static final int RoomPlaceItemEvent = 474; - public static final int RotateMoveItemEvent = 194; - public static final int MoveWallItemEvent = 1029; - public static final int RoomPickupItemEvent = 152; - public static final int RoomPlacePaintEvent = 874; - public static final int RoomUserStartTypingEvent = 3684; - public static final int RoomUserStopTypingEvent = 2005; - public static final int ToggleFloorItemEvent = 120; - public static final int ToggleWallItemEvent = 2650; - public static final int RoomUserLookAtPoint = 1365; - public static final int RoomBackgroundEvent = 2715; - public static final int MannequinSaveNameEvent = 2098; - public static final int MannequinSaveLookEvent = 1804; - public static final int AdvertisingSaveEvent = 68; - public static final int RoomUserDropHandItemEvent = 157; - public static final int BotPlaceEvent = 148; - public static final int BotPickupEvent = 2865; - public static final int BotSaveSettingsEvent = 1384; - public static final int BotSettingsEvent = 3098; - public static final int TriggerDiceEvent = 987; - public static final int CloseDiceEvent = 1739; - public static final int TriggerColorWheelEvent = 2367; - public static final int MoodLightSettingsEvent = 2468; - public static final int MoodLightTurnOnEvent = 1181; - public static final int RedeemItemEvent = 3599; - public static final int RequestRoomRightsEvent = 2928; - public static final int RoomRemoveAllRightsEvent = 405; - public static final int RoomUserGiveRightsEvent = 2221; - public static final int RoomUserRemoveRightsEvent = 3639; - public static final int PetPlaceEvent = 3711; - public static final int RoomUserKickEvent = 1874; - public static final int SetStackHelperHeightEvent = 2540; - /* - Users - */ - /* public static final int RequestUserDataEvent = 112; - public static final int RequestUserCreditsEvent = 938; - public static final int RequestUserClubEvent = 3874; - public static final int RequestMeMenuSettingsEvent = 671; - public static final int RequestUserCitizinShipEvent = 3096; - public static final int RequestUserProfileEvent = 532; - public static final int RequestProfileFriendsEvent = 3925; - public static final int RequestUserTagsEvent = 3102; - public static final int RequestUserWardrobeEvent = 1251; - public static final int SaveWardrobeEvent = 637; - public static final int UserSaveLookEvent = 2404; - public static final int SaveMottoEvent = 2832; - public static final int UserWearBadgeEvent = 2473; - public static final int RequestWearingBadgesEvent = 3968; - /* - Inventory - */ - /* public static final int RequestInventoryItemsEvent = 372; // 1223 - public static final int RequestInventoryPetsEvent = 1900; - public static final int RequestInventoryBadgesEvent = 3072; - public static final int RequestInventoryBotsEvent = 1351; - /* - Not correctly implemented - */ - /*public static final int RequestResolutionEvent = 1854;*/ - /*public static final int MannequinSaveLookEvent = 2252;//1804 - public static final int RequestCatalogPageEvent = 1904;//1754 - public static final int RequestWearingBadgesEvent = 3364;//3968 - public static final int BotPickupEvent = 1890;//2865 - public static final int HorseRideEvent = 1425;//3268 - public static final int RequestCreateRoomEvent = 1075;//3524 - public static final int SaveMottoEvent = 3060;//2832 - public static final int GenerateSecretKeyEvent = 2342;//3575 - public static final int ModToolAlertEvent = 641;//1980 - public static final int TradeAcceptEvent = 843;//1062 - public static final int RequestCatalogModeEvent = 2941;//3406 - public static final int RequestUserCreditsEvent = 3985;//938 - public static final int FriendPrivateMessageEvent = 2046;//1527 - public static final int CloseDiceEvent = 2438;//1739 - public static final int RoomUserRemoveRightsEvent = 1872;//3639 - public static final int GuildDeclineMembershipEvent = 3464;//1320 - public static final int AnswerPollEvent = 3647;//1847 - public static final int UserWearBadgeEvent = 2265;//2473 - public static final int RoomVoteEvent = -242;//242 - public static final int RoomUserSignEvent = 1037;//2189 - public static final int RequestUserDataEvent = 3243;//112 - public static final int RoomUserShoutEvent = 1559;//936 - public static final int ScratchPetEvent = 2363;//3464 - public static final int RoomUserWalkEvent = 3264;//951 - public static final int RequestUserTagsEvent = 3364;//3102 - public static final int RequestTagsEvent = 3906;//1337 - public static final int GetMarketplaceConfigEvent = 1142;//1952 - public static final int RequestHeightmapEvent = 2450;//308 - public static final int TradeCloseEvent = 759;//3387 - public static final int CatalogBuyItemEvent = 3269;//2967 - public static final int RequestGuildMembersEvent = 556;//2382 - public static final int RequestPetInformationEvent = 1330;//777 - public static final int RoomUserWhisperEvent = 3700;//1362 - public static final int ModToolRequestUserInfoEvent = 852;//3077 - public static final int RotateMoveItemEvent = 3753;//194 - public static final int CancelPollEvent = 797;//276 - public static final int RequestRoomLoadEvent = 2144;//3751 //2086 //2144 - public static final int RequestGuildPartsEvent = 2165;//2344 - public static final int RoomPlacePaintEvent = 2534;//874 - public static final int RequestPopularRoomsEvent = 1627;//2346;//235 - public static final int ModToolRequestRoomInfoEvent = 346;//225 - public static final int FriendRequestEvent = 3667;//3765 - public static final int RecycleEvent = 2627;//2318 - public static final int RequestRoomCategoriesEvent = 783;//1431 - public static final int ToggleWallItemEvent = 3649;//2650 - public static final int RoomUserTalkEvent = 2462;//3349 - public static final int HotelViewDataEvent = 3813;//595 - public static final int RoomUserDanceEvent = 1764;//1139 - public static final int RequestUserProfileEvent = 1299;//532 - public static final int SearchRoomsFriendsNowEvent = 542;//3306 - public static final int SetStackHelperHeightEvent = 3280;//2540 - public static final int RedeemVoucherEvent = 114;//1571 - public static final int HorseUseItemEvent = 1105;//1616 - public static final int BuyItemEvent = 3161;//3878 - public static final int AdvertisingSaveEvent = 3645;//68 - public static final int RequestPetTrainingPanelEvent = 2867;//2476 - public static final int RoomBackgroundEvent = 1275;//2715 - public static final int RequestNewsListEvent = 1205;//896 - public static final int RequestPromotedRoomsEvent = 3527;//3030 - public static final int GuildSetAdminEvent = 1954;//2957 - public static final int GetClubDataEvent = 1232;//1608 - public static final int RequestMeMenuSettingsEvent = 254;//671 - public static final int MannequinSaveNameEvent = 2872;//2098 - public static final int SellItemEvent = 1147;//172 - public static final int GuildAcceptMembershipEvent = 816;//1066 - public static final int RequestBannerToken = 1497;//2619 - public static final int RequestRecylerLogicEvent = 2669;//1077 - public static final int RequestGuildJoinEvent = 1971;//77 - public static final int RequestCatalogIndexEvent = 1789;//81 - public static final int RequestInventoryPetsEvent = 3555;//1900 - public static final int ModToolRequestRoomVisitsEvent = 1854;//2549 - public static final int ModToolWarnEvent = 2891;//3763 - public static final int RequestItemInfoEvent = 2326;//36 - public static final int ModToolRequestRoomChatlogEvent = 2285;//1903 - public static final int UserSaveLookEvent = 2889;//2404 - public static final int ToggleFloorItemEvent = 2970;//120 - public static final int TradeUnAcceptEvent = 1287;//1131 - public static final int WiredTriggerSaveDataEvent = 3931;//3201 - public static final int RoomRemoveAllRightsEvent = 36;//405 - public static final int TakeBackItemEvent = 560;//2910 - public static final int OpenRecycleBoxEvent = 3502;//3977 - public static final int GuildChangeNameDescEvent = 3503;//3232 - public static final int RequestSellItemEvent = 1380;//2087 - public static final int ModToolChangeRoomSettingsEvent = 2571;//2530 - public static final int ModToolRequestUserChatlogEvent = 600;//203 - public static final int GuildChangeSettingsEvent = 1026;//2156 - public static final int RoomUserDropHandItemEvent = 1699;//157 - public static final int RequestProfileFriendsEvent = 3510;//3925 - public static final int TradeCancelOfferItemEvent = 2646;//373 - public static final int TriggerDiceEvent = 1000;//987 - public static final int GetPollDataEvent = 491;//1960 - public static final int MachineIDEvent = -512;//512 - public static final int RequestDiscountEvent = 458;//3794 - public static final int RequestFriendRequestEvent = 1823;//275 - public static final int RoomSettingsSaveEvent = 1824;//2384 - public static final int AcceptFriendRequest = 3110;//333 - public static final int ReleaseVersionEvent = 4000;//4000 - public static final int SearchRoomsMyFavoriteEvent = 1181;//1532 - public static final int TradeStartEvent = 2842;//466 - public static final int ChangeRelationEvent = 668;//2521 - public static final int RoomUserSitEvent = 2292;//484 - public static final int RequestCanCreateRoomEvent = 3929;//3844 - public static final int ModToolKickEvent = 1132;//3418 - public static final int MoveWallItemEvent = 3043;//1029 - public static final int SearchRoomsEvent = 2188;//3551 - public static final int RequestHighestScoreRoomsEvent = 1379;//1728 - public static final int CatalogBuyItemAsGiftEvent = 3186;//2474 - public static final int RoomUserGiveRespectEvent = 2901;//2041 - public static final int RemoveFriendEvent = 3767;//2786 - public static final int SearchRoomsFriendsOwnEvent = 1870;//3478 - public static final int GuildSetFavoriteEvent = 2864;//1463 - public static final int PetPlaceEvent = 81;//3711 - public static final int BotSettingsEvent = 3630;//3098 - public static final int StalkFriendEvent = 3829;//3394 - public static final int RoomPickupItemEvent = 2316;//152 - public static final int RedeemItemEvent = 3333;//3599 - public static final int RequestFriendsEvent = 2386;//776 - public static final int RequestAchievementsEvent = 3474;//2562 - public static final int GuildChangeColorsEvent = 3260;//463 - public static final int RequestInventoryBadgesEvent = 2480;//3072 - public static final int RequestPetBreedsEvent = 3851;//1064 - public static final int GuildChangeBadgeEvent = 2754;//1475 - public static final int ModToolBanEvent = 574;//2930 - public static final int SaveWardrobeEvent = 1188;//637 - public static final int HotelViewEvent = 1784;//3266 - public static final int ModToolPickTicketEvent = 3088;//3975 - public static final int ModToolReleaseTicketEvent = 734; - public static final int ModToolCloseTicketEvent = 1837; - public static final int TriggerColorWheelEvent = 2882;//2367 - public static final int SearchRoomsByTagEvent = -1956;//1956 - public static final int RequestPublicRoomsEvent = 2021;//3735 //UPDATED OLD 3178 - public static final int RequestResolutionEvent = 3871;//1854 - public static final int Unknown3 = 458;//3794 - public static final int RequestInventoryItemsEvent = 1920;//372 - public static final int ModToolRoomAlertEvent = 1863;//295 - public static final int WiredEffectSaveDataEvent = 1645;//3006 - public static final int CheckPetNameEvent = 3567;//678 - public static final int SecureLoginEvent = 1957;//1309 - public static final int BotSaveSettingsEvent = 736;//1384 - public static final int RequestGuildBuyEvent = 2594;//872 - public static final int SearchUserEvent = 3026;//1267 - public static final int GuildRemoveMemberEvent = 353;//3002 - public static final int WiredConditionSaveDataEvent = 2096;//1041 - public static final int RoomUserLookAtPoint = 2115;//1365 - public static final int MoodLightTurnOnEvent = 883;//1181 - public static final int MoodLightSettingsEvent = 3878;//2468 - public static final int RequestMyRoomsEvent = 2360;//2676 - public static final int RequestCreditsEvent = 1623;//2138 - public static final int SearchRoomsInGroupEvent = 2066;//1160 - public static final int HorseRideSettingsEvent = 1731;//2448 - public static final int HandleDoorbellEvent = 91; - public static final int RoomUserKickEvent = 1718;//1874 - public static final int RoomPlaceItemEvent = 2554;//474 - public static final int RequestInventoryBotsEvent = 3549;//1351 - public static final int RequestUserWardrobeEvent = 3057;//1251 - public static final int RequestRoomRightsEvent = 2197;//2928 - public static final int RequestGuildBuyRoomsEvent = 1035;//701 - public static final int BotPlaceEvent = 2143;//148 - public static final int SearchRoomsWithRightsEvent = 307;//3785 - public static final int RequestBonusRareEvent = 1966;//1199 - public static final int GuildRemoveAdminEvent = 864;//3264 - public static final int RequestRoomSettingsEvent = 2176;//3741 - public static final int RequestOffersEvent = 2688;//541 - public static final int RequestUserCitizinShipEvent = 2151;//3096 - public static final int RoomUserStopTypingEvent = 3890;//2005 - public static final int RoomUserStartTypingEvent = 3896;//3684 - public static final int RequestGuildManageEvent = 3169;//2418 - public static final int RequestUserClubEvent = 2189;//3874 - public static final int PetPickupEvent = -3167;//863 - public static final int RequestOwnGuildsEvent = 484;//2240 - public static final int SearchRoomsVisitedEvent = 24;//589 - public static final int TradeOfferItemEvent = 1324;//2223 - public static final int TradeConfirmEvent = 3866;//1144 - public static final int RoomUserGiveRightsEvent = 3167;//2221 - public static final int RequestGuildInfoEvent = 331;//2079 - public static final int ReloadRecyclerEvent = 72;//2779 - public static final int RoomUserActionEvent = 2000;//475 - public static final int RequestGiftConfigurationEvent = 102;//382 - public static final int RequestRoomDataEvent = 2086;//183 - public static final int RequestRoomHeightmapEvent = 3075; - public static final int RequestGuildFurniWidgetEvent = 3239;//3031 - public static final int RequestOwnItemsEvent = 1486;//829 - public static final int RequestReportRoomEvent = 2343; - public static final int ReportEvent = 330; - public static final int TriggerOneWayGateEvent = 408; - public static final int FloorPlanEditorSaveEvent = 2324; - public static final int FloorPlanEditorRequestDoorSettingsEvent = 1168; - public static final int FloorPlanEditorRequestBlockedTilesEvent = 1241;*/ + + + + + + + + + + + + + + + public static final int MannequinSaveLookEvent = 3770;//1804 //Updated public static final int RequestCatalogPageEvent = 2914;//1754 //Updated diff --git a/src/main/java/com/eu/habbo/messages/incoming/friends/FriendRequestEvent.java b/src/main/java/com/eu/habbo/messages/incoming/friends/FriendRequestEvent.java index 703cb866..bfc1dc7a 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/friends/FriendRequestEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/friends/FriendRequestEvent.java @@ -14,9 +14,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -/** - * Created on 25-8-2014 18:11. - */ + public class FriendRequestEvent extends MessageHandler { @Override diff --git a/src/main/java/com/eu/habbo/messages/incoming/friends/RequestFriendsEvent.java b/src/main/java/com/eu/habbo/messages/incoming/friends/RequestFriendsEvent.java index cf29484d..32c3c0fb 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/friends/RequestFriendsEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/friends/RequestFriendsEvent.java @@ -9,12 +9,7 @@ public class RequestFriendsEvent extends MessageHandler @Override public void handle() throws Exception { - /*ArrayList messages = new ArrayList(); - messages.add(new FriendsComposer(this.client.getHabbo()).compose()); - messages.add(new MessengerInitComposer(this.client.getHabbo()).compose()); - - this.client.sendResponses(messages);*/ //this.client.sendResponse(new FriendsComposer(this.client.getHabbo())); diff --git a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java index 37b4a822..5d6d139c 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java @@ -26,17 +26,7 @@ import java.util.ArrayList; public class SecureLoginEvent extends MessageHandler { - /************************************************************************************************* - * - ##### ####### # # ####### ####### ####### ###### ### ####### - # # # # ## # # # # # # # # # - # # # # # # # # # # # # # # # - # # # # # # # # # # ##### # # # # - # # # # # # # # # # # # # # # - # # # # # ## # # # # # # # # - ##### ####### # # ####### # ####### ###### ### # - * -The General - *************************************************************************************************/ + @Override public void handle() throws Exception diff --git a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent_BACKUP.java b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent_BACKUP.java index ff8b67f4..f19ed4cc 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent_BACKUP.java +++ b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent_BACKUP.java @@ -20,17 +20,7 @@ import java.util.ArrayList; public class SecureLoginEvent_BACKUP extends MessageHandler { - /************************************************************************************************* - * - ##### ####### # # ####### ####### ####### ###### ### ####### - # # # # ## # # # # # # # # # - # # # # # # # # # # # # # # # - # # # # # # # # # # ##### # # # # - # # # # # # # # # # # # # # # - # # # # # ## # # # # # # # # - ##### ####### # # ####### # ####### ###### ### # - * -The General - *************************************************************************************************/ + @Override public void handle() throws Exception @@ -55,26 +45,9 @@ public class SecureLoginEvent_BACKUP extends MessageHandler ArrayList messages = new ArrayList(); - /*messages.add(new SecureLoginOKComposer().compose()); - messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose()); - messages.add(new FriendsComposer(this.client.getHabbo()).compose()); - messages.add(new MessengerInitComposer(this.client.getHabbo()).compose()); - messages.add(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", "").compose()); - messages.add(new AddHabboItemComposer(this.client.getHabbo().getInventory().getItemsComponent().getItemsAsValueCollection()).compose()); - for(int i = 0; i < 9; i++) - { - messages.add(new MinimailCountComposer().compose()); - } - messages.add(new UserEffectsListComposer().compose()); - this.client.sendResponses(messages);*/ - /*messages.add(new SecureLoginOKComposer().compose()); - messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose()); - messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose()); - messages.add(new MessengerInitComposer(this.client.getHabbo()).compose()); - messages.add(new FriendsComposer(this.client.getHabbo()).compose());*/ messages.add(new SecureLoginOKComposer().compose()); messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0).compose()); @@ -112,31 +85,8 @@ public class SecureLoginEvent_BACKUP extends MessageHandler //this.client.sendResponse(new UserEffectsListComposer()); - /* ServerMessage msg = new MinimailCountComposer().compose(); - for(int i = 0; i < 9; i++) - { - //Not sure why habbo does this. ohwell. - this.client.sendResponse(msg); - }*/ -/* - this.client.sendResponse(new DebugConsoleComposer()); - this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo())); - this.client.sendResponse(new NewUserIdentityComposer()); - this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo())); - this.client.sendResponse(new UserPerksComposer()); - this.client.sendResponse(new SessionRightsComposer()); - //this.client.sendResponse(new AddHabboItemComposer(this.client.getHabbo().getInventory().getItemsComponent().getItemsAsValueCollection())); - this.client.sendResponse(new UserClothesComposer()); - - //this.client.sendResponse(new UnknownComposer4()); - //this.client.sendResponse(new UnknownComposer5()); - this.client.sendResponse(new BuildersClubExpiredComposer()); - this.client.sendResponse(new FavoriteRoomsCountComposer()); - this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo())); - this.client.sendResponse(new UserAchievementScoreComposer(this.client.getHabbo())); - this.client.sendResponse(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", ""));*/ Emulator.getPluginManager().fireEvent(new UserLoginEvent(habbo, this.client.getChannel().localAddress())); diff --git a/src/main/java/com/eu/habbo/messages/incoming/hotelview/HotelViewDataEvent.java b/src/main/java/com/eu/habbo/messages/incoming/hotelview/HotelViewDataEvent.java index 540efb7f..12b9605b 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/hotelview/HotelViewDataEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/hotelview/HotelViewDataEvent.java @@ -9,30 +9,8 @@ public class HotelViewDataEvent extends MessageHandler { public void handle() { - /*String[] data = hotelViewData.split(","); - if(data.length > 1) - { - this.client.sendResponse(new HotelViewDataComposer(hotelViewData, data[data.length - 1].replace(";", ""))); - System.out.println("Hotelview Data: " + hotelViewData); - } - else - { - System.out.println("Hotelview Data error: " + hotelViewData); - this.client.sendResponse(new HotelViewDataComposer(hotelViewData, "")); - }*/ - /*String hotelViewData = this.packet.readString(); - String[] types = hotelViewData.split(";"); - - for(String s : types) - { - if(!s.contains(",")) - continue; - - String[] data = s.split(","); - this.client.sendResponse(new HotelViewDataComposer(hotelViewData, data[data.length - 1])); - }*/ try { diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/jukebox/JukeBoxAddSoundTrackEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/jukebox/JukeBoxAddSoundTrackEvent.java index 511d170a..1d187975 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/jukebox/JukeBoxAddSoundTrackEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/jukebox/JukeBoxAddSoundTrackEvent.java @@ -33,58 +33,7 @@ public class JukeBoxAddSoundTrackEvent extends MessageHandler if (item instanceof InteractionMusicDisc) { - /*for (HabboItem jukeBox : room.getRoomSpecialTypes().getItemsOfType(InteractionJukeBox.class)) - { - if (jukeBox instanceof InteractionJukeBox) - { - SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(((InteractionMusicDisc) item).getSongId()); - ArrayList soundTracks = new ArrayList(); - soundTracks.add(track); - if (!((InteractionJukeBox)jukeBox).hasItemInPlaylist(itemId)) - { - ((InteractionJukeBox) jukeBox).addToPlayList(itemId, room); - } - else - { - ((InteractionJukeBox) jukeBox).removeFromPlayList(itemId, room); - } - - //room.sendComposer(new JukeBoxPlayListComposer(((InteractionJukeBox) jukeBox), room).compose()); - THashSet soundTrackTHashSet = new THashSet<>(); - List toRemove = new ArrayList(); - ((InteractionJukeBox) jukeBox).getMusicDisks().forEach(new TIntProcedure() - { - @Override - public boolean execute(int i) - { - HabboItem item = room.getHabboItem(i); - - if (item != null && item instanceof InteractionMusicDisc) - { - SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(((InteractionMusicDisc) item).getSongId()); - - if (track != null) - { - soundTrackTHashSet.add(track); - return true; - } - } - toRemove.add(i); - - return true; - } - }); - - for (Integer i : toRemove) - { - ((InteractionJukeBox) jukeBox).removeFromPlayList(i, room); - } - - room.sendComposer(new JukeBoxPlayListUpdatedComposer(soundTrackTHashSet).compose()); - } - break; - }*/ if (this.client.getHabbo().getHabboInfo().getCurrentRoom().hasRights(this.client.getHabbo())) { diff --git a/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java b/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java index f779cacb..fc56ffb2 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java @@ -17,10 +17,7 @@ public class RequestUserDataEvent extends MessageHandler if (this.client.getHabbo() != null) { //this.client.sendResponse(new TestComposer()); - /*this.client.sendResponse(new MinimailCountComposer()); - this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo())); - this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo())); - this.client.sendResponse(new SessionRightsComposer());*/ + //this.client.sendResponse(new UserDataComposer(this.client.getHabbo())); //this.client.sendResponse(new HotelViewComposer()); //this.client.sendResponse(new UserHomeRoomComposer()); @@ -35,42 +32,11 @@ public class RequestUserDataEvent extends MessageHandler //this.client.sendResponse(new GenericAlertComposer(Emulator.getTexts().getValue("hotel.alert.message.welcome").replace("%user%", this.client.getHabbo().getHabboInfo().getUsername()), this.client.getHabbo())); - //******// + // ArrayList messages = new ArrayList(); -/* - messages.add(new MinimailCountComposer().compose()); - messages.add(new FavoriteRoomsCountComposer().compose()); - messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose()); - messages.add(new SessionRightsComposer().compose()); - messages.add(new DebugConsoleComposer().compose()); - messages.add(new UserCurrencyComposer(this.client.getHabbo()).compose()); - messages.add(new UserDataComposer(this.client.getHabbo()).compose()); - messages.add(new UserPerksComposer().compose()); - messages.add(new BuildersClubExpiredComposer().compose()); - messages.add(new UserBCLimitsComposer().compose()); - messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose()); - messages.add(new UserClothesComposer().compose()); - messages.add(new UserClubComposer(this.client.getHabbo()).compose()); - messages.add(new MeMenuSettingsComposer().compose()); - if(this.client.getHabbo().hasPermission("acc_supporttool")) - { - this.client.sendResponse(new ModToolComposer()); - } - - messages.add(new CatalogUpdatedComposer().compose()); - messages.add(new CatalogModeComposer(0).compose()); - messages.add(new DiscountComposer().compose()); - messages.add(new MarketplaceConfigComposer().compose()); - messages.add(new GiftConfigurationComposer().compose()); - messages.add(new RecyclerLogicComposer().compose()); - // - - //messages.add(new MessengerInitComposer(this.client.getHabbo()).compose()); - this.client.sendResponses(messages); -*/ // messages.add(new DebugConsoleComposer().compose()); // messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose()); @@ -134,19 +100,7 @@ public class RequestUserDataEvent extends MessageHandler this.client.sendResponses(messages); - /*this.client.sendResponse(new MinimailCountComposer()); - this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo())); - this.client.sendResponse(new SessionRightsComposer()); - this.client.sendResponse(new DebugConsoleComposer()); - this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo())); - this.client.sendResponse(new UserDataComposer(this.client.getHabbo())); - this.client.sendResponse(new UserPerksComposer()); - this.client.sendResponse(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", "")); - //this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo())); - this.client.sendResponse(new FavoriteRoomsCountComposer()); - this.client.sendResponse(new UserBCLimitsComposer()); - this.client.sendResponse(new UserAchievementScoreComposer(this.client.getHabbo())); - this.client.sendResponse(new UserClothesComposer());*/ + } else { diff --git a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java index c5fe5194..4cec568f 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java @@ -397,24 +397,11 @@ public class Outgoing public final static int UnknownQuestComposer1 = 230; // PRODUCTION-201611291003-338511768 public final static int ModToolSanctionDataComposer = 2782; // PRODUCTION-201611291003-338511768 public final static int RoomEventMessageComposer = 2274; - /** - * int << count - * { - * string << ? - * int << Count - * { - * string << Name - * int << ID - * string << Consequence - * } - * } - */ - /** - * Music Disks / Trax / Jukebox - */ + + public final static int JukeBoxMySongsComposer = 2602; // PRODUCTION-201611291003-338511768 public final static int JukeBoxNowPlayingMessageComposer = 469; // PRODUCTION-201611291003-338511768 public final static int JukeBoxPlaylistFullComposer = 105; // PRODUCTION-201611291003-338511768 @@ -424,9 +411,7 @@ public class Outgoing public final static int JukeBoxTrackDataComposer = 3365; // PRODUCTION-201611291003-338511768 public final static int JukeBoxTrackCodeComposer = 1381; // PRODUCTION-201611291003-338511768 - /** - * Crafting - */ + public final static int CraftableProductsComposer = 1000; // PRODUCTION-201611291003-338511768 public final static int CraftingRecipeComposer = 2774; // PRODUCTION-201611291003-338511768 public final static int CraftingResultComposer = 618; // PRODUCTION-201611291003-338511768 @@ -549,37 +534,7 @@ public class Outgoing public final static int UnknownGuildComposer3 = 876; public final static int GameCenterGameComposer = 3805; - /* - 0x0909 //unused -1347 //Unused cry[to -195 //unused -1982 //unused -2142 //unused -2494 //u -2668 //u -2756 //u -2819 //u -3035 //u -3099 //u -3138 //u -3191 //u -3560 //Game2WeeklyLeaderboardParser -3684 //u -3805 //u Gamecomposer -3863 //u -3885 //u Crypto -3915 //u -416 //u - -463 //u -600 //u - -761 //u -872 //u - - - */ public static final int SnowStormGameStartedComposer = 5000; public static final int SnowStormQuePositionComposer = 5001; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_1006.java b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_1006.java index 32c417e3..0e7f1d80 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_1006.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_1006.java @@ -3,449 +3,33 @@ package com.eu.habbo.messages.outgoing; public class Outgoing_1006 { - /* - Talents - */ + //public static final int TalentTrackComposer = 2842; - /* - Wired - */ - /*public static final int WiredTriggerDataComposer = 861; - public static final int WiredEffectDataComposer = 1279; - public static final int WiredConditionDataComposer = 1639; - public static final int WiredSavedComposer = 39; - /* - Pets - */ - /*public static final int PetInformationComposer = 2286; - public static final int RoomPetRespectComposer = 778; - public static final int RoomPetExperienceComposer = 717; - public static final int PetTrainingPanelComposer = 456; - public static final int RoomPetHorseFigureComposer = 1644; - /* - Groups - */ - /*public static final int GuildBuyRoomsComposer = 3938; - public static final int GroupPartsComposer = 567; - public static final int GuildBoughtComposer = 389; - public static final int GuildInfoComposer = 2978; - public static final int GuildManageComposer = 601; - public static final int GuildMembersComposer = 3986; - public static final int GuildJoinErrorComposer = 1952; - public static final int GuildRefreshMembersListComposer = 2055; - public static final int GuildMemberUpdateComposer = 862; - public static final int GuildListComposer = 587; - public static final int GuildFurniWidgetComposer = 269; - /* - Trading - */ - /*public static final int TradeUpdateComposer = 1221; - public static final int TradeStartComposer = 3713; - public static final int TradeStartFailComposer = 2320; - public static final int TradeCompleteComposer = 3766; - public static final int TradeCloseWindowComposer = 2000; - public static final int TradeStoppedComposer = 2020; - public static final int TradeAcceptedComposer = 741; - /* - ModTool - */ - /*public static final int ModToolComposer = 1901; - public static final int ModToolRoomInfoComposer = 3722; - public static final int ModToolRoomChatlogComposer = 3869; - public static final int ModToolRoomEntryInfoComposer = 2644; - public static final int ModToolUserInfoComposer = 2583; - public static final int ModToolUserChatlogComposer = 3738; - public static final int ModToolUserRoomVisitsComposer = 2129; - public static final int ModToolIssueInfoComposer = 2473; - public static final int ModToolIssueChatlogComposer = 1445; - public static final int ModToolIssueUpdateComposer = 3019; - public static final int ModToolComposerOne = 2303; - public static final int ModToolComposerTwo = 1917; - /* - Catalog - */ - /*public static final int GiftConfigurationComposer = 1048; - public static final int DiscountComposer = 1061; - public static final int MarketplaceConfigComposer = 2524; - public static final int CatalogUpdatedComposer = 2028; - public static final int CatalogModeComposer = 3442; - public static final int CatalogPagesListComposer = 1684; - public static final int CatalogPageComposer = 3518; - public static final int PurchaseOKComposer = 1189; - public static final int RecyclerLogicComposer = 1317; - public static final int ReloadRecyclerComposer = 1093; - public static final int RecyclerCompleteComposer = 2125; - public static final int ClubDataComposer = 1919; - public static final int MarketplaceOwnItemsComposer = 593; - public static final int MarketplaceCancelSaleComposer = 1959; - public static final int MarketplaceOffersComposer = 3289; - public static final int MarketplaceItemInfoComposer = 1066; - public static final int MarketplaceBuyErrorComposer = 1823; - public static final int MarketplaceSellItemComposer = 1932; - public static final int PetBreedsComposer = 3302; - public static final int PetNameErrorComposer = 3575; - /* - Alerts (All of them) - */ - /*public static final int AlertLimitedSoldOutComposer = 3290; - public static final int AlertPurchaseFailedComposer = 2602; - public static final int RedeemVoucherOKComposer = 2719; - public static final int RedeemVoucherErrorComposer = 2630; - public static final int RoomEnterErrorComposer = 1619; - public static final int WiredRewardAlertComposer = 723; - public static final int PetErrorComposer = 779; - public static final int BotErrorComposer = 3420; - public static final int BubbleAlertComposer = 777; - public static final int GenericErrorMessages = 2839; - /* - Handshake - */ - /*public static final int BannerTokenComposer = 3033; - public static final int SecureLoginOKComposer = 2753; - public static final int SessionRightsComposer = 1313; - public static final int DebugConsoleComposer = 336; - /* - HotelView - */ - /* public static final int HotelViewComposer = 3152; - public static final int HallOfFameComposer = 670; - public static final int NewsWidgetsComposer = 1345; - public static final int BonusRareComposer = 3517; - public static final int HotelViewDataComposer = 1374; - /* - Generic - */ - /* public static final int GenericAlertComposer = 1548; - public static final int MinimailCountComposer = 2253; - public static final int FavoriteRoomsCountComposer = 3829; - - /* - Polls - */ //public static final int PollStartComposer = 749; //public static final int PollQuestionsComposer = 3187; - /* - Friends - */ - /*public static final int FriendsComposer = 2067; - public static final int UpdateFriendComposer = 170; - public static final int UserSearchResultComposer = 1573; - public static final int FriendRequestComposer = 2468; - public static final int RemoveFriendComposer = 1106; - public static final int FriendChatMessageComposer = 2094; - public static final int LoadFriendRequestsComposer = 2193; - public static final int FriendRequestErrorComposer = 2467; - public static final int StalkErrorComposer = 1135; - /* - Inventory - */ - /*public static final int InventoryItemsComposer = 3029; - public static final int InventoryPetsComposer = 435; - public static final int InventoryBotsComposer = 320; - public static final int InventoryBadgesComposer = 1629; - public static final int AddHabboItemComposer = 274; - public static final int AddBotComposer = 3043; - public static final int RemoveBotComposer = 2565; - public static final int RemoveHabboItemComposer = 3233; - public static final int InventoryRefreshComposer = 3243; - public static final int InventoryItemUpdateComposer = 1577; - public static final int AddPetComposer = 3099; - public static final int RemovePetComposer = 467; - public static final int InventoryAchievementsComposer = 3295; - /* - Navigator - */ - /*public static final int RoomCategoriesComposer = 3241; - public static final int PublicRoomsComposer = 2506; - public static final int PrivateRoomsComposer = 2653; - public static final int CanCreateRoomComposer = 2463; - public static final int RoomCreatedComposer = 3373; - public static final int TagsComposer = 3487; - /* - Rooms - */ - /*public static final int RoomPaintComposer = 2979; - public static final int RoomRightsComposer = 520; - public static final int RoomOwnerComposer = 1069; - public static final int RoomScoreComposer = 2805; - public static final int RoomDataComposer = 3995; - public static final int RoomHeightMapComposer = 1624; - public static final int RoomUsersComposer = 1073; - public static final int RoomThicknessComposer = 2627; - public static final int RoomOpenComposer = 925; - public static final int RoomModelComposer = 2297; - public static final int RoomRelativeMapComposer = 1975; - public static final int RoomPaneComposer = 2644; - public static final int RoomFloorItemsComposer = 2124; - public static final int RoomWallItemsComposer = 395; - public static final int RoomUserTalkComposer = 612; - public static final int RoomUserShoutComposer = 3271; - public static final int RoomUserWhisperComposer = 2323; - public static final int RoomUserActionComposer = 12; - public static final int RoomUserRespectComposer = 2143; - public static final int RoomUserDanceComposer = 2091; - public static final int RoomUserEffectComposer = 3040; - public static final int RoomUserStatusComposer = 3386; - public static final int RoomUserRemoveComposer = 2819; - public static final int AddWallItemComposer = 2156; - public static final int AddFloorItemComposer = 1590; - public static final int RemoveWallItemComposer = 2466; - public static final int RemoveFloorItemComposer = 36; - public static final int FloorItemUpdateComposer = 648; - public static final int UpdateStackHeightComposer = 1576; - public static final int RoomUserTypingComposer = 3624; - public static final int WallItemUpdateComposer = 2190; - public static final int RoomUserHandItemComposer = 3664; - public static final int RoomUserRemoveRightsComposer = 1496; - public static final int RoomRightsListComposer = 1891; - public static final int RoomAddRightsListComposer = 3611; - public static final int ChangeNameUpdatedComposer = 542; - public static final int BotSettingsComposer = 1522; - public static final int RoomSettingsUpdatedComposer = 543; - public static final int RoomChatSettingsComposer = 3710; - public static final int DoorbellAddUserComposer = 3198; - public static final int RoomAccessDeniedComposer = 3953; - public static final int MoodLightDataComposer = 2033; - public static final int ObjectOnRollerComposer = 1488; - public static final int PresentItemOpenedComposer = 1540; - public static final int FreezeLivesComposer = 3526; - /* - Users - */ - /*public static final int UserBCLimitsComposer = 3442; - public static final int UserCurrencyComposer = 3454; - public static final int UserDataComposer = 3491; - public static final int UserPerksComposer = 1218; - public static final int UserPermissionsComposer = 3872; - public static final int UserCreditsComposer = 2204; - public static final int UserClubComposer = 2869; - public static final int MeMenuSettingsComposer = 15; - public static final int UserCitizinShipComposer = 3439; - public static final int UserTagsComposer = 933; - public static final int UserHomeRoomComposer = 40; - public static final int UserProfileComposer = 1503; - public static final int ProfileFriendsComposer = 322; - public static final int UserUpdateCurrencyComposer = 1290; - public static final int UserWardrobeComposer = 370; - public static final int RoomUserDataComposer = 3944; - public static final int UserBadgesComposer = 3486; - public static final int AddUserBadgeComposer = 3197; - /* - Ones that are someway implemented but not correctly. - */ + public static final int PetStatusUpdateComposer = 3566; //Updated - /* - Not implemented but know what they are: - */ - /*public static final int UserAddEffectComposer = 2181; //int, int, int (type, ?? (effectId?), duration - public final static int FavoriteRoomsCountComposer = 2420;//3829 - public final static int UserCurrencyComposer = 584;//3454 - public final static int RedeemVoucherOKComposer = 2136;//2719 - public final static int RoomUserShoutComposer = 3274;//3271 - public final static int RoomUserStatusComposer = 2566;//3386 - public final static int RoomUserDataComposer = 2538;//3944 - public final static int RoomAddRightsListComposer = 1992;//3611 - public final static int RoomRemoveRightsListComposer = 2021; - public final static int RoomRightsListComposer = 2857;//1891 - public final static int RoomUserHandItemComposer = 2425;//3664 - public final static int RoomUsersComposer = 961;//1073 - public final static int FriendRequestComposer = 3550;//2468 - public final static int GuildBoughtComposer = 2087;//389 - public final static int AddUserBadgeComposer = 10;//3197 - public final static int RecyclerCompleteComposer = 1513;//2125 - public final static int GuildBuyRoomsComposer = 3938;//3938 - public final static int FriendsComposer = 1535;//2067 - public final static int StalkErrorComposer = 1739;//1135 - public final static int TradeCloseWindowComposer = 3545;//2000 - public final static int RemoveFloorItemComposer = 679;//36 - public final static int InventoryPetsComposer = 2799;//435 - public final static int UserCreditsComposer = 689;//2204 - public final static int WiredTriggerDataComposer = 3639;//861 - public final static int TradeStoppedComposer = 1941;//2020 - public final static int ModToolUserChatlogComposer = 912;//3738 - public final static int GuildInfoComposer = 3398;//2978 - public final static int UserPermissionsComposer = 3514;//3872 - public final static int PetNameErrorComposer = 2773;//3575 - public final static int TradeStartFailComposer = 796;//2320 - public final static int AddHabboItemComposer = 828;//274 - public final static int InventoryBotsComposer = 3908;//320 - public final static int CanCreateRoomComposer = 1458;//2463 - public final static int MarketplaceBuyErrorComposer = 3313;//1823 - public final static int BonusRareComposer = 2194;//3517 - public final static int HotelViewComposer = 2553;//3152 - public final static int UpdateFriendComposer = 2605;//170 //2605 - public final static int FloorItemUpdateComposer = 1334;//648 - public final static int RoomAccessDeniedComposer = 1504;//3953 - public final static int GuildFurniWidgetComposer = 2909;//269 - public final static int GiftConfigurationComposer = 1965;//1048 - public final static int UserClubComposer = 3926;//2869 - public final static int InventoryBadgesComposer = 79;//1629 - public final static int RoomUserTypingComposer = 3765;//3624 - public final static int GuildJoinErrorComposer = 1551;//1952 - public final static int RoomCategoriesComposer = 815;//3241 - public final static int InventoryAchievementsComposer = 894;//3295 - public final static int MarketplaceItemInfoComposer = 688;//1066 - public final static int UserTagsComposer = 1578;//933 - public final static int RoomRelativeMapComposer = 124;//1975 - public final static int ModToolComposerTwo = 1761;//1917 - public final static int ModToolComposerOne = 2621;//2303 - public final static int RoomRightsComposer = 3358;//520 - public final static int ObjectOnRollerComposer = 1294;//1488 - public final static int PollStartComposer = 3353;//749 - public final static int GuildRefreshMembersListComposer = 3650;//2055 - public final static int UserPerksComposer = 2284;//1218 - public final static int UserCitizinShipComposer = 2486;//3439 - public final static int PublicRoomsComposer = 2433;//2506 - public final static int MarketplaceOffersComposer = 3738;//3289 - public final static int ModToolComposer = 3064;//1901 - public final static int UserBadgesComposer = 820;//3486 - public final static int GuildManageComposer = 1797;//601 - public final static int RemoveFriendComposer = -1106;//1106 - public final static int BannerTokenComposer = -3033;//3033 - public final static int UserDataComposer = 2337;//3491 - public final static int UserSearchResultComposer = 1542;//1573 - public final static int ModToolUserRoomVisitsComposer = 2728;//2129 - public final static int RoomUserRespectComposer = 2019;//2143 - public final static int RoomChatSettingsComposer = 864;//3710 - public final static int RemoveHabboItemComposer = 2192;//3233 - public final static int RoomUserRemoveComposer = 2529;//2819 - public final static int RoomHeightMapComposer = 3157;//1624 - public final static int RoomPetHorseFigureComposer = 1312;//1644 - public final static int PetErrorComposer = 1940;//779 - public final static int TradeUpdateComposer = 77;//1221 - public final static int PrivateRoomsComposer = 1251;//2653 - public final static int RoomModelComposer = 617;//2297 - public final static int RoomScoreComposer = 2925;//2805 - public final static int DoorbellAddUserComposer = 3556;//3198 - public final static int SecureLoginOKComposer = 294;//2753 - public final static int SessionRightsComposer = 376;//1313 - public final static int GuildMemberUpdateComposer = 3609;//862 - public final static int RoomFloorItemsComposer = 2648;//2124 - public final static int InventoryItemsComposer = 1927;//3029 - public final static int RoomUserTalkComposer = 2735;//612 - public final static int TradeStartComposer = 181;//3713 - public final static int InventoryItemUpdateComposer = 369;//1577 - public final static int ModToolIssueUpdateComposer = 2951;//3019 - public final static int MeMenuSettingsComposer = 1362;//15 - public final static int ModToolRoomInfoComposer = 84;//3722 - public final static int GuildListComposer = 3445;//587 - public final static int RecyclerLogicComposer = 3486;//1317 - public final static int UserHomeRoomComposer = 1730;//40 - public final static int RoomUserDanceComposer = 3848;//2091 - public final static int RoomSettingsUpdatedComposer = 3128;//543 - public final static int AlertPurchaseFailedComposer = 1860;//2602 - public final static int RoomDataComposer = 3986;//3995 - public final static int TagsComposer = 3149;//3487 - public final static int InventoryRefreshComposer = 1276;//3243 - public final static int RemovePetComposer = 3118;//467 - public final static int RemoveWallItemComposer = -2466;//2466 - public final static int TradeCompleteComposer = 418;//3766 - public final static int NewsWidgetsComposer = 72;//1345 - public final static int WiredEffectDataComposer = 1532;//1279 - public final static int BubbleAlertComposer = 1950;//777 - public final static int ReloadRecyclerComposer = 3918;//1093 - public final static int MoodLightDataComposer = 1869;//2033 - public final static int WiredRewardAlertComposer = 1603;//723 - public final static int CatalogPageComposer = 2551;//3518 - public final static int CatalogModeComposer = 1942;//3442 - public final static int ChangeNameUpdatedComposer = 311;//542 - public final static int AddFloorItemComposer = 1880;//1590 - public final static int DebugConsoleComposer = 2718;//336 - public final static int HallOfFameComposer = 92;//670 - public final static int WiredSavedComposer = 2429;//39 - public final static int RoomPaintComposer = 2205;//2979 - public final static int MarketplaceConfigComposer = 2120;//2524 - public final static int AddBotComposer = 254;//3043 - public final static int FriendRequestErrorComposer = 3134;//2467 - public final static int GuildMembersComposer = 1648;//3986 - public final static int RoomOpenComposer = 2561;//925 //2561 1945?? - public final static int ModToolRoomChatlogComposer = 3893;//3869 - public final static int DiscountComposer = 1768;//1061 - public final static int MarketplaceCancelSaleComposer = 2239;//1959 - public final static int RoomPetRespectComposer = 3841;//778 - public final static int RoomSettingsComposer = 2461; - public final static int TalentTrackComposer = 2912;//2842 - public final static int CatalogPagesListComposer = 2353;//1684 - public final static int AlertLimitedSoldOutComposer = 604;//3290 - public final static int CatalogUpdatedComposer = 1311;//2028 - public final static int PurchaseOKComposer = 1636;//1189 - public final static int WallItemUpdateComposer = 3292;//2190 - public final static int TradeAcceptedComposer = 2316;//741 - public final static int AddWallItemComposer = 3887;//2156 - public final static int ModToolRoomEntryInfoComposer = 2561;//2644 - public final static int HotelViewDataComposer = 1579;//1374 - public final static int PresentItemOpenedComposer = 3424;//1540 - public final static int RoomUserRemoveRightsComposer = 3566;//1496 - public final static int UserBCLimitsComposer = 1942;//3442 - public final static int PetTrainingPanelComposer = 3760;//456 - public final static int RoomPaneComposer = 2561;//2644 - public final static int RedeemVoucherErrorComposer = 2571;//2630 - public final static int RoomCreatedComposer = 3648;//3373 - public final static int GenericAlertComposer = 3406;//1548 - public final static int GroupPartsComposer = 1817;//567 - public final static int ModToolIssueInfoComposer = 1848;//2473 - public final static int RoomUserWhisperComposer = 1428;//2323 - public final static int BotErrorComposer = 3932;//3420 - public final static int FreezeLivesComposer = 1128;//3526 - public final static int LoadFriendRequestsComposer = 1926;//2193 - public final static int MarketplaceSellItemComposer = 1165;//1932 - public final static int ClubDataComposer = 3753;//1919 - public final static int ProfileFriendsComposer = 168;//322 - public final static int MarketplaceOwnItemsComposer = 1181;//593 - public final static int RoomOwnerComposer = 2146;//1069 - public final static int WiredConditionDataComposer = 856;//1639 - public final static int ModToolUserInfoComposer = 1557;//2583 - public final static int UserWardrobeComposer = 773;//370 - public final static int UserUpdateCurrencyComposer = 1245;//1290 - public final static int RoomPetExperienceComposer = 2143;//717 - public final static int FriendChatMessageComposer = 625;//2094 - public final static int PetInformationComposer = 3752;//2286 - public final static int RoomThicknessComposer = 299;//2627 - public final static int AddPetComposer = 211;//3099 - public final static int UpdateStackHeightComposer = 1350;//1576 - public final static int RemoveBotComposer = 397;//2565 - public final static int RoomEnterErrorComposer = 1754;//1619 - public final static int PollQuestionsComposer = 1745;//3187 - public final static int GenericErrorMessages = 3478;//2839 - public final static int RoomWallItemsComposer = 3583;//395 - public final static int RoomUserEffectComposer = 3863;//3040 - public final static int PetBreedsComposer = 1433;//3302 - public final static int ModToolIssueChatlogComposer = 610;//1445 - public final static int RoomUserActionComposer = 2482;//12 - public final static int BotSettingsComposer = 772;//1522 - public final static int UserProfileComposer = 2023;//1503 - public final static int MinimailCountComposer = 1162;//2253 - public final static int UserAchievementScoreComposer = 2994; - public final static int PetLevelUpComposer = 2329; - public final static int UserPointsComposer = 1245; - public final static int ReportRoomFormComposer = 3216; - public final static int ModToolIssueHandledComposer = 2876; - public final static int FloodCounterComposer = 1774; - public final static int UpdateFailedComposer = 2612; - public final static int FloorPlanEditorDoorSettingsComposer = 1633; - public final static int FloorPlanEditorBlockedTilesComposer = 1874; - public final static int BuildersClubExpiredComposer = 108; - public final static int RoomSettingsSavedComposer = 0;*/ + public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated public final static int UserCurrencyComposer = 3574;//3454 //Updated @@ -834,9 +418,7 @@ public class Outgoing_1006 public final static int FriendFindingRoomComposer = 1037; //:test 1037 b:0 public final static int UnknownQuestComposer1 = 1010; - /** - * Music Disks / Trax / Jukebox - */ + public final static int JukeBoxMySongsComposer = 2224; public final static int JukeBoxNowPlayingMessageComposer = 2197; public final static int JukeBoxPlaylistFullComposer = 2732; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_Back.java b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_Back.java index f60be120..8776dfb5 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_Back.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing_Back.java @@ -3,449 +3,33 @@ package com.eu.habbo.messages.outgoing; public class Outgoing_Back { - /* - Talents - */ + //public static final int TalentTrackComposer = 2842; - /* - Wired - */ - /*public static final int WiredTriggerDataComposer = 861; - public static final int WiredEffectDataComposer = 1279; - public static final int WiredConditionDataComposer = 1639; - public static final int WiredSavedComposer = 39; - /* - Pets - */ - /*public static final int PetInformationComposer = 2286; - public static final int RoomPetRespectComposer = 778; - public static final int RoomPetExperienceComposer = 717; - public static final int PetTrainingPanelComposer = 456; - public static final int RoomPetHorseFigureComposer = 1644; - /* - Groups - */ - /*public static final int GuildBuyRoomsComposer = 3938; - public static final int GroupPartsComposer = 567; - public static final int GuildBoughtComposer = 389; - public static final int GuildInfoComposer = 2978; - public static final int GuildManageComposer = 601; - public static final int GuildMembersComposer = 3986; - public static final int GuildJoinErrorComposer = 1952; - public static final int GuildRefreshMembersListComposer = 2055; - public static final int GuildMemberUpdateComposer = 862; - public static final int GuildListComposer = 587; - public static final int GuildFurniWidgetComposer = 269; - /* - Trading - */ - /*public static final int TradeUpdateComposer = 1221; - public static final int TradeStartComposer = 3713; - public static final int TradeStartFailComposer = 2320; - public static final int TradeCompleteComposer = 3766; - public static final int TradeCloseWindowComposer = 2000; - public static final int TradeStoppedComposer = 2020; - public static final int TradeAcceptedComposer = 741; - /* - ModTool - */ - /*public static final int ModToolComposer = 1901; - public static final int ModToolRoomInfoComposer = 3722; - public static final int ModToolRoomChatlogComposer = 3869; - public static final int ModToolRoomEntryInfoComposer = 2644; - public static final int ModToolUserInfoComposer = 2583; - public static final int ModToolUserChatlogComposer = 3738; - public static final int ModToolUserRoomVisitsComposer = 2129; - public static final int ModToolIssueInfoComposer = 2473; - public static final int ModToolIssueChatlogComposer = 1445; - public static final int ModToolIssueUpdateComposer = 3019; - public static final int ModToolComposerOne = 2303; - public static final int ModToolComposerTwo = 1917; - /* - Catalog - */ - /*public static final int GiftConfigurationComposer = 1048; - public static final int DiscountComposer = 1061; - public static final int MarketplaceConfigComposer = 2524; - public static final int CatalogUpdatedComposer = 2028; - public static final int CatalogModeComposer = 3442; - public static final int CatalogPagesListComposer = 1684; - public static final int CatalogPageComposer = 3518; - public static final int PurchaseOKComposer = 1189; - public static final int RecyclerLogicComposer = 1317; - public static final int ReloadRecyclerComposer = 1093; - public static final int RecyclerCompleteComposer = 2125; - public static final int ClubDataComposer = 1919; - public static final int MarketplaceOwnItemsComposer = 593; - public static final int MarketplaceCancelSaleComposer = 1959; - public static final int MarketplaceOffersComposer = 3289; - public static final int MarketplaceItemInfoComposer = 1066; - public static final int MarketplaceBuyErrorComposer = 1823; - public static final int MarketplaceSellItemComposer = 1932; - public static final int PetBreedsComposer = 3302; - public static final int PetNameErrorComposer = 3575; - /* - Alerts (All of them) - */ - /*public static final int AlertLimitedSoldOutComposer = 3290; - public static final int AlertPurchaseFailedComposer = 2602; - public static final int RedeemVoucherOKComposer = 2719; - public static final int RedeemVoucherErrorComposer = 2630; - public static final int RoomEnterErrorComposer = 1619; - public static final int WiredRewardAlertComposer = 723; - public static final int PetErrorComposer = 779; - public static final int BotErrorComposer = 3420; - public static final int BubbleAlertComposer = 777; - public static final int GenericErrorMessages = 2839; - /* - Handshake - */ - /*public static final int BannerTokenComposer = 3033; - public static final int SecureLoginOKComposer = 2753; - public static final int SessionRightsComposer = 1313; - public static final int DebugConsoleComposer = 336; - /* - HotelView - */ - /* public static final int HotelViewComposer = 3152; - public static final int HallOfFameComposer = 670; - public static final int NewsWidgetsComposer = 1345; - public static final int BonusRareComposer = 3517; - public static final int HotelViewDataComposer = 1374; - /* - Generic - */ - /* public static final int GenericAlertComposer = 1548; - public static final int MinimailCountComposer = 2253; - public static final int FavoriteRoomsCountComposer = 3829; - - /* - Polls - */ //public static final int PollStartComposer = 749; //public static final int PollQuestionsComposer = 3187; - /* - Friends - */ - /*public static final int FriendsComposer = 2067; - public static final int UpdateFriendComposer = 170; - public static final int UserSearchResultComposer = 1573; - public static final int FriendRequestComposer = 2468; - public static final int RemoveFriendComposer = 1106; - public static final int FriendChatMessageComposer = 2094; - public static final int LoadFriendRequestsComposer = 2193; - public static final int FriendRequestErrorComposer = 2467; - public static final int StalkErrorComposer = 1135; - /* - Inventory - */ - /*public static final int InventoryItemsComposer = 3029; - public static final int InventoryPetsComposer = 435; - public static final int InventoryBotsComposer = 320; - public static final int InventoryBadgesComposer = 1629; - public static final int AddHabboItemComposer = 274; - public static final int AddBotComposer = 3043; - public static final int RemoveBotComposer = 2565; - public static final int RemoveHabboItemComposer = 3233; - public static final int InventoryRefreshComposer = 3243; - public static final int InventoryItemUpdateComposer = 1577; - public static final int AddPetComposer = 3099; - public static final int RemovePetComposer = 467; - public static final int InventoryAchievementsComposer = 3295; - /* - Navigator - */ - /*public static final int RoomCategoriesComposer = 3241; - public static final int PublicRoomsComposer = 2506; - public static final int PrivateRoomsComposer = 2653; - public static final int CanCreateRoomComposer = 2463; - public static final int RoomCreatedComposer = 3373; - public static final int TagsComposer = 3487; - /* - Rooms - */ - /*public static final int RoomPaintComposer = 2979; - public static final int RoomRightsComposer = 520; - public static final int RoomOwnerComposer = 1069; - public static final int RoomScoreComposer = 2805; - public static final int RoomDataComposer = 3995; - public static final int RoomHeightMapComposer = 1624; - public static final int RoomUsersComposer = 1073; - public static final int RoomThicknessComposer = 2627; - public static final int RoomOpenComposer = 925; - public static final int RoomModelComposer = 2297; - public static final int RoomRelativeMapComposer = 1975; - public static final int RoomPaneComposer = 2644; - public static final int RoomFloorItemsComposer = 2124; - public static final int RoomWallItemsComposer = 395; - public static final int RoomUserTalkComposer = 612; - public static final int RoomUserShoutComposer = 3271; - public static final int RoomUserWhisperComposer = 2323; - public static final int RoomUserActionComposer = 12; - public static final int RoomUserRespectComposer = 2143; - public static final int RoomUserDanceComposer = 2091; - public static final int RoomUserEffectComposer = 3040; - public static final int RoomUserStatusComposer = 3386; - public static final int RoomUserRemoveComposer = 2819; - public static final int AddWallItemComposer = 2156; - public static final int AddFloorItemComposer = 1590; - public static final int RemoveWallItemComposer = 2466; - public static final int RemoveFloorItemComposer = 36; - public static final int FloorItemUpdateComposer = 648; - public static final int UpdateStackHeightComposer = 1576; - public static final int RoomUserTypingComposer = 3624; - public static final int WallItemUpdateComposer = 2190; - public static final int RoomUserHandItemComposer = 3664; - public static final int RoomUserRemoveRightsComposer = 1496; - public static final int RoomRightsListComposer = 1891; - public static final int RoomAddRightsListComposer = 3611; - public static final int ChangeNameUpdatedComposer = 542; - public static final int BotSettingsComposer = 1522; - public static final int RoomSettingsUpdatedComposer = 543; - public static final int RoomChatSettingsComposer = 3710; - public static final int DoorbellAddUserComposer = 3198; - public static final int RoomAccessDeniedComposer = 3953; - public static final int MoodLightDataComposer = 2033; - public static final int ObjectOnRollerComposer = 1488; - public static final int PresentItemOpenedComposer = 1540; - public static final int FreezeLivesComposer = 3526; - /* - Users - */ - /*public static final int UserBCLimitsComposer = 3442; - public static final int UserCurrencyComposer = 3454; - public static final int UserDataComposer = 3491; - public static final int UserPerksComposer = 1218; - public static final int UserPermissionsComposer = 3872; - public static final int UserCreditsComposer = 2204; - public static final int UserClubComposer = 2869; - public static final int MeMenuSettingsComposer = 15; - public static final int UserCitizinShipComposer = 3439; - public static final int UserTagsComposer = 933; - public static final int UserHomeRoomComposer = 40; - public static final int UserProfileComposer = 1503; - public static final int ProfileFriendsComposer = 322; - public static final int UserUpdateCurrencyComposer = 1290; - public static final int UserWardrobeComposer = 370; - public static final int RoomUserDataComposer = 3944; - public static final int UserBadgesComposer = 3486; - public static final int AddUserBadgeComposer = 3197; - /* - Ones that are someway implemented but not correctly. - */ + public static final int PetStatusUpdateComposer = 3566; //Updated - /* - Not implemented but know what they are: - */ - /*public static final int UserAddEffectComposer = 2181; //int, int, int (type, ?? (effectId?), duration - public final static int FavoriteRoomsCountComposer = 2420;//3829 - public final static int UserCurrencyComposer = 584;//3454 - public final static int RedeemVoucherOKComposer = 2136;//2719 - public final static int RoomUserShoutComposer = 3274;//3271 - public final static int RoomUserStatusComposer = 2566;//3386 - public final static int RoomUserDataComposer = 2538;//3944 - public final static int RoomAddRightsListComposer = 1992;//3611 - public final static int RoomRemoveRightsListComposer = 2021; - public final static int RoomRightsListComposer = 2857;//1891 - public final static int RoomUserHandItemComposer = 2425;//3664 - public final static int RoomUsersComposer = 961;//1073 - public final static int FriendRequestComposer = 3550;//2468 - public final static int GuildBoughtComposer = 2087;//389 - public final static int AddUserBadgeComposer = 10;//3197 - public final static int RecyclerCompleteComposer = 1513;//2125 - public final static int GuildBuyRoomsComposer = 3938;//3938 - public final static int FriendsComposer = 1535;//2067 - public final static int StalkErrorComposer = 1739;//1135 - public final static int TradeCloseWindowComposer = 3545;//2000 - public final static int RemoveFloorItemComposer = 679;//36 - public final static int InventoryPetsComposer = 2799;//435 - public final static int UserCreditsComposer = 689;//2204 - public final static int WiredTriggerDataComposer = 3639;//861 - public final static int TradeStoppedComposer = 1941;//2020 - public final static int ModToolUserChatlogComposer = 912;//3738 - public final static int GuildInfoComposer = 3398;//2978 - public final static int UserPermissionsComposer = 3514;//3872 - public final static int PetNameErrorComposer = 2773;//3575 - public final static int TradeStartFailComposer = 796;//2320 - public final static int AddHabboItemComposer = 828;//274 - public final static int InventoryBotsComposer = 3908;//320 - public final static int CanCreateRoomComposer = 1458;//2463 - public final static int MarketplaceBuyErrorComposer = 3313;//1823 - public final static int BonusRareComposer = 2194;//3517 - public final static int HotelViewComposer = 2553;//3152 - public final static int UpdateFriendComposer = 2605;//170 //2605 - public final static int FloorItemUpdateComposer = 1334;//648 - public final static int RoomAccessDeniedComposer = 1504;//3953 - public final static int GuildFurniWidgetComposer = 2909;//269 - public final static int GiftConfigurationComposer = 1965;//1048 - public final static int UserClubComposer = 3926;//2869 - public final static int InventoryBadgesComposer = 79;//1629 - public final static int RoomUserTypingComposer = 3765;//3624 - public final static int GuildJoinErrorComposer = 1551;//1952 - public final static int RoomCategoriesComposer = 815;//3241 - public final static int InventoryAchievementsComposer = 894;//3295 - public final static int MarketplaceItemInfoComposer = 688;//1066 - public final static int UserTagsComposer = 1578;//933 - public final static int RoomRelativeMapComposer = 124;//1975 - public final static int ModToolComposerTwo = 1761;//1917 - public final static int ModToolComposerOne = 2621;//2303 - public final static int RoomRightsComposer = 3358;//520 - public final static int ObjectOnRollerComposer = 1294;//1488 - public final static int PollStartComposer = 3353;//749 - public final static int GuildRefreshMembersListComposer = 3650;//2055 - public final static int UserPerksComposer = 2284;//1218 - public final static int UserCitizinShipComposer = 2486;//3439 - public final static int PublicRoomsComposer = 2433;//2506 - public final static int MarketplaceOffersComposer = 3738;//3289 - public final static int ModToolComposer = 3064;//1901 - public final static int UserBadgesComposer = 820;//3486 - public final static int GuildManageComposer = 1797;//601 - public final static int RemoveFriendComposer = -1106;//1106 - public final static int BannerTokenComposer = -3033;//3033 - public final static int UserDataComposer = 2337;//3491 - public final static int UserSearchResultComposer = 1542;//1573 - public final static int ModToolUserRoomVisitsComposer = 2728;//2129 - public final static int RoomUserRespectComposer = 2019;//2143 - public final static int RoomChatSettingsComposer = 864;//3710 - public final static int RemoveHabboItemComposer = 2192;//3233 - public final static int RoomUserRemoveComposer = 2529;//2819 - public final static int RoomHeightMapComposer = 3157;//1624 - public final static int RoomPetHorseFigureComposer = 1312;//1644 - public final static int PetErrorComposer = 1940;//779 - public final static int TradeUpdateComposer = 77;//1221 - public final static int PrivateRoomsComposer = 1251;//2653 - public final static int RoomModelComposer = 617;//2297 - public final static int RoomScoreComposer = 2925;//2805 - public final static int DoorbellAddUserComposer = 3556;//3198 - public final static int SecureLoginOKComposer = 294;//2753 - public final static int SessionRightsComposer = 376;//1313 - public final static int GuildMemberUpdateComposer = 3609;//862 - public final static int RoomFloorItemsComposer = 2648;//2124 - public final static int InventoryItemsComposer = 1927;//3029 - public final static int RoomUserTalkComposer = 2735;//612 - public final static int TradeStartComposer = 181;//3713 - public final static int InventoryItemUpdateComposer = 369;//1577 - public final static int ModToolIssueUpdateComposer = 2951;//3019 - public final static int MeMenuSettingsComposer = 1362;//15 - public final static int ModToolRoomInfoComposer = 84;//3722 - public final static int GuildListComposer = 3445;//587 - public final static int RecyclerLogicComposer = 3486;//1317 - public final static int UserHomeRoomComposer = 1730;//40 - public final static int RoomUserDanceComposer = 3848;//2091 - public final static int RoomSettingsUpdatedComposer = 3128;//543 - public final static int AlertPurchaseFailedComposer = 1860;//2602 - public final static int RoomDataComposer = 3986;//3995 - public final static int TagsComposer = 3149;//3487 - public final static int InventoryRefreshComposer = 1276;//3243 - public final static int RemovePetComposer = 3118;//467 - public final static int RemoveWallItemComposer = -2466;//2466 - public final static int TradeCompleteComposer = 418;//3766 - public final static int NewsWidgetsComposer = 72;//1345 - public final static int WiredEffectDataComposer = 1532;//1279 - public final static int BubbleAlertComposer = 1950;//777 - public final static int ReloadRecyclerComposer = 3918;//1093 - public final static int MoodLightDataComposer = 1869;//2033 - public final static int WiredRewardAlertComposer = 1603;//723 - public final static int CatalogPageComposer = 2551;//3518 - public final static int CatalogModeComposer = 1942;//3442 - public final static int ChangeNameUpdatedComposer = 311;//542 - public final static int AddFloorItemComposer = 1880;//1590 - public final static int DebugConsoleComposer = 2718;//336 - public final static int HallOfFameComposer = 92;//670 - public final static int WiredSavedComposer = 2429;//39 - public final static int RoomPaintComposer = 2205;//2979 - public final static int MarketplaceConfigComposer = 2120;//2524 - public final static int AddBotComposer = 254;//3043 - public final static int FriendRequestErrorComposer = 3134;//2467 - public final static int GuildMembersComposer = 1648;//3986 - public final static int RoomOpenComposer = 2561;//925 //2561 1945?? - public final static int ModToolRoomChatlogComposer = 3893;//3869 - public final static int DiscountComposer = 1768;//1061 - public final static int MarketplaceCancelSaleComposer = 2239;//1959 - public final static int RoomPetRespectComposer = 3841;//778 - public final static int RoomSettingsComposer = 2461; - public final static int TalentTrackComposer = 2912;//2842 - public final static int CatalogPagesListComposer = 2353;//1684 - public final static int AlertLimitedSoldOutComposer = 604;//3290 - public final static int CatalogUpdatedComposer = 1311;//2028 - public final static int PurchaseOKComposer = 1636;//1189 - public final static int WallItemUpdateComposer = 3292;//2190 - public final static int TradeAcceptedComposer = 2316;//741 - public final static int AddWallItemComposer = 3887;//2156 - public final static int ModToolRoomEntryInfoComposer = 2561;//2644 - public final static int HotelViewDataComposer = 1579;//1374 - public final static int PresentItemOpenedComposer = 3424;//1540 - public final static int RoomUserRemoveRightsComposer = 3566;//1496 - public final static int UserBCLimitsComposer = 1942;//3442 - public final static int PetTrainingPanelComposer = 3760;//456 - public final static int RoomPaneComposer = 2561;//2644 - public final static int RedeemVoucherErrorComposer = 2571;//2630 - public final static int RoomCreatedComposer = 3648;//3373 - public final static int GenericAlertComposer = 3406;//1548 - public final static int GroupPartsComposer = 1817;//567 - public final static int ModToolIssueInfoComposer = 1848;//2473 - public final static int RoomUserWhisperComposer = 1428;//2323 - public final static int BotErrorComposer = 3932;//3420 - public final static int FreezeLivesComposer = 1128;//3526 - public final static int LoadFriendRequestsComposer = 1926;//2193 - public final static int MarketplaceSellItemComposer = 1165;//1932 - public final static int ClubDataComposer = 3753;//1919 - public final static int ProfileFriendsComposer = 168;//322 - public final static int MarketplaceOwnItemsComposer = 1181;//593 - public final static int RoomOwnerComposer = 2146;//1069 - public final static int WiredConditionDataComposer = 856;//1639 - public final static int ModToolUserInfoComposer = 1557;//2583 - public final static int UserWardrobeComposer = 773;//370 - public final static int UserUpdateCurrencyComposer = 1245;//1290 - public final static int RoomPetExperienceComposer = 2143;//717 - public final static int FriendChatMessageComposer = 625;//2094 - public final static int PetInformationComposer = 3752;//2286 - public final static int RoomThicknessComposer = 299;//2627 - public final static int AddPetComposer = 211;//3099 - public final static int UpdateStackHeightComposer = 1350;//1576 - public final static int RemoveBotComposer = 397;//2565 - public final static int RoomEnterErrorComposer = 1754;//1619 - public final static int PollQuestionsComposer = 1745;//3187 - public final static int GenericErrorMessages = 3478;//2839 - public final static int RoomWallItemsComposer = 3583;//395 - public final static int RoomUserEffectComposer = 3863;//3040 - public final static int PetBreedsComposer = 1433;//3302 - public final static int ModToolIssueChatlogComposer = 610;//1445 - public final static int RoomUserActionComposer = 2482;//12 - public final static int BotSettingsComposer = 772;//1522 - public final static int UserProfileComposer = 2023;//1503 - public final static int MinimailCountComposer = 1162;//2253 - public final static int UserAchievementScoreComposer = 2994; - public final static int PetLevelUpComposer = 2329; - public final static int UserPointsComposer = 1245; - public final static int ReportRoomFormComposer = 3216; - public final static int ModToolIssueHandledComposer = 2876; - public final static int FloodCounterComposer = 1774; - public final static int UpdateFailedComposer = 2612; - public final static int FloorPlanEditorDoorSettingsComposer = 1633; - public final static int FloorPlanEditorBlockedTilesComposer = 1874; - public final static int BuildersClubExpiredComposer = 108; - public final static int RoomSettingsSavedComposer = 0;*/ + public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated public final static int UserCurrencyComposer = 3574;//3454 //Updated @@ -743,7 +327,7 @@ public class Outgoing_Back public final static int OpenRoomCreationWindowComposer = 497; //:test 497 public final static int ItemsDataUpdateComposer = 466; public final static int WelcomeGiftComposer = 445; //:test 445 s:derp@derp.com b:0 b:1 i:230 b:1 - /* TODO: */ public final static int SimplePollStartComposer = 3047; //:test 3047 s:a i:10 i:20 i:10000 i:1 i:1 i:3 s:abcdefghijklmnopqrstuvwxyz12345678901234? i:1 s:a s:b + public final static int SimplePollStartComposer = 3047; //:test 3047 s:a i:10 i:20 i:10000 i:1 i:1 i:3 s:abcdefghijklmnopqrstuvwxyz12345678901234? i:1 s:a s:b public final static int RoomNoRightsComposer = 3929; //Removes also the 'use' button. :D public final static int GuildEditFailComposer = 3918; public final static int MinimailNewMessageComposer = 3903; @@ -837,9 +421,7 @@ public class Outgoing_Back public final static int UnknownQuestComposer1 = 1010; - /** - * Music Disks / Trax / Jukebox - */ + public final static int JukeBoxMySongsComposer = 2224; public final static int JukeBoxNowPlayingMessageComposer = 2197; public final static int JukeBoxPlaylistFullComposer = 2732; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/TestComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/TestComposer.java index 8c88cf38..e9b3f110 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/TestComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/TestComposer.java @@ -11,15 +11,7 @@ public class TestComposer extends MessageComposer this.response.init(3662); this.response.appendBoolean(true); this.response.appendString("LOL"); - /* - this.response.init(3269); - this.response.appendString("cannon.png"); - this.response.appendInt(2); - this.response.appendString("title"); - this.response.appendString("${notification.room.kick.cannonball.title}"); - this.response.appendString("message"); - this.response.appendString("${notification.room.kick.cannonball.message}"); - */ + return this.response; } diff --git a/src/main/java/com/eu/habbo/messages/outgoing/friends/UpdateFriendComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/friends/UpdateFriendComposer.java index a3235221..b0a67e1c 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/friends/UpdateFriendComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/friends/UpdateFriendComposer.java @@ -18,10 +18,7 @@ public class UpdateFriendComposer extends MessageComposer this.buddy = buddy; } - /** - * Updates the staff chat so the look matches the user. Does not do any other stuff. - * @param habbo - */ + public UpdateFriendComposer(Habbo habbo) { this.habbo = habbo; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/gamecenter/GameCenterGameListComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/gamecenter/GameCenterGameListComposer.java index 33801fb8..e6abf360 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/gamecenter/GameCenterGameListComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/gamecenter/GameCenterGameListComposer.java @@ -16,14 +16,14 @@ public class GameCenterGameListComposer extends MessageComposer this.response.appendString("snowwar"); this.response.appendString("93d4f3"); this.response.appendString(""); - this.response.appendString("http://localhost/game/c_images/gamecenter_snowwar/"); + this.response.appendString("c_images/gamecenter_snowwar/"); this.response.appendString(""); this.response.appendInt(3); this.response.appendString("basejump"); this.response.appendString("68bbd2"); //Background Color this.response.appendString(""); //Text color - this.response.appendString("http://localhost/game/c_images/gamecenter_basejump/"); + this.response.appendString("c_images/gamecenter_basejump/"); this.response.appendString(""); this.response.appendInt(4); diff --git a/src/main/java/com/eu/habbo/messages/outgoing/rooms/items/MoodLightDataComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/rooms/items/MoodLightDataComposer.java index 43215709..846456bf 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/rooms/items/MoodLightDataComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/rooms/items/MoodLightDataComposer.java @@ -56,13 +56,7 @@ public class MoodLightDataComposer extends MessageComposer this.response.appendInt(255); } - /*for(int i = moodLightData.valueCollection().size(); i < 3; i++) - { - this.response.appendInt(i); - this.response.appendInt(1); - this.response.appendString("#000000"); - this.response.appendInt(255); - }*/ + //:test 2780 i:1 i:1 i:1 i:2 s:#FF00FF i:255 return this.response; } diff --git a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java index d5b0670f..abb64c99 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java @@ -64,24 +64,7 @@ public class PetInformationComposer extends MessageComposer this.response.appendBoolean(this.pet instanceof MonsterplantPet && ((MonsterplantPet) this.pet).isPubliclyBreedable()); //Breedable checkbox - /* - public function get _SafeStr_6187():Boolean - { - return (this._SafeStr_10925); - } - public function get _SafeStr_6188():Boolean - { - return (this._SafeStr_10926); - } - public function get _SafeStr_6189():Boolean - { - return (this._SafeStr_10927); - } - public function get _SafeStr_6190():Boolean - { - return (this._SafeStr_10928); - } - */ + return this.response; } } diff --git a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/breeding/PetBreedingStartComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/breeding/PetBreedingStartComposer.java index ce8eb156..4669b9ae 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/breeding/PetBreedingStartComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/breeding/PetBreedingStartComposer.java @@ -10,12 +10,7 @@ public class PetBreedingStartComposer extends MessageComposer public final int anInt1; public final int anInt2; - /** - * For plants - * @param state - * @param anInt1 - * @param anInt2 - */ + public PetBreedingStartComposer(int state, int anInt1, int anInt2) { this.state = state; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestionInfoComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestionInfoComposer.java index 74669ad6..09e92dcf 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestionInfoComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestionInfoComposer.java @@ -10,33 +10,7 @@ public class QuestionInfoComposer extends MessageComposer public ServerMessage compose() { this.response.init(Outgoing.QuestionInfoComposer); - /* - this._SafeStr_17817 = k.readString(); - this._SafeStr_16321 = k._SafeStr_5331(); - this._SafeStr_7446 = k._SafeStr_5331(); - this._SafeStr_5614 = k._SafeStr_5331(); - this._SafeStr_16322 = new Dictionary(); - this._SafeStr_16322["id"] = k._SafeStr_5331(); - this._SafeStr_16322["number"] = k._SafeStr_5331(); - this._SafeStr_16322["type"] = k._SafeStr_5331(); - this._SafeStr_16322["content"] = k.readString(); - if ((((this._SafeStr_16322["type"] == 1)) || ((this._SafeStr_16322["type"] == 2)))){ - this._SafeStr_16322["selection_min"] = k._SafeStr_5331(); - _local_2 = k._SafeStr_5331(); - _local_3 = new Array(); - _local_4 = new Array(); - this._SafeStr_16322["selections"] = _local_3; - this._SafeStr_16322["selection_values"] = _local_4; - this._SafeStr_16322["selection_count"] = _local_2; - this._SafeStr_16322["selection_max"] = _local_2; - _local_5 = 0; - while (_local_5 < _local_2) { - _local_4.push(k.readString()); - _local_3.push(k.readString()); - _local_5++; - }; - }; - */ + return this.response; } } \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsAddUserComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsAddUserComposer.java index d83e3c9f..e17cebd4 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsAddUserComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsAddUserComposer.java @@ -5,10 +5,7 @@ import com.eu.habbo.messages.outgoing.MessageComposer; public class SnowWarsAddUserComposer extends MessageComposer { - /* - Adds the user to the "Waiting for more players" screen. - //Works - */ + @Override public ServerMessage compose() { diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsRemoveUserComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsRemoveUserComposer.java index 9078b3aa..93c85a81 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsRemoveUserComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/SnowWarsRemoveUserComposer.java @@ -5,10 +5,7 @@ import com.eu.habbo.messages.outgoing.MessageComposer; public class SnowWarsRemoveUserComposer extends MessageComposer { - /* - Removes a user from the "Waiting for users" window. - //Works - */ + @Override public ServerMessage compose() { diff --git a/src/main/java/com/eu/habbo/messages/outgoing/users/UserClubComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/users/UserClubComposer.java index 75bf7fd3..3d90396f 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/users/UserClubComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/users/UserClubComposer.java @@ -27,17 +27,7 @@ public class UserClubComposer extends MessageComposer if(endTimestamp >= now) { - /*Date endDate = new Date(endTimestamp * 1000); - Date startDate = new Date(Emulator.getIntUnixTimestamp() * 1000); - long duration = endDate.getTime() - startDate.getTime(); - - long theDays = TimeUnit.MILLISECONDS.toDays(duration); - int years = (int) Math.floor(theDays / 365); - theDays = theDays - (years * 365); - - int months = (int) Math.floor(theDays / 31); - theDays = theDays - (months * 31);*/ int days = ((endTimestamp - Emulator.getIntUnixTimestamp()) / 86400); int years = (int) Math.floor(days / 365); diff --git a/src/main/java/com/eu/habbo/messages/rcon/AlertUser.java b/src/main/java/com/eu/habbo/messages/rcon/AlertUser.java index 6db2c17a..5b0871dd 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/AlertUser.java +++ b/src/main/java/com/eu/habbo/messages/rcon/AlertUser.java @@ -7,9 +7,7 @@ import com.google.gson.Gson; public class AlertUser extends RCONMessage { - /** - * Sends an alert to an online user. - */ + public AlertUser() { super(JSONAlertUser.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java b/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java index fa0162ab..81062225 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java +++ b/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java @@ -6,9 +6,7 @@ import com.google.gson.Gson; public class DisconnectUser extends RCONMessage { - /** - * Disconnects an user. - */ + public DisconnectUser() { super(DisconnectUserJSON.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/ExecuteCommand.java b/src/main/java/com/eu/habbo/messages/rcon/ExecuteCommand.java index 59903d40..634446b8 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/ExecuteCommand.java +++ b/src/main/java/com/eu/habbo/messages/rcon/ExecuteCommand.java @@ -7,9 +7,7 @@ import com.google.gson.Gson; public class ExecuteCommand extends RCONMessage { - /** - * Executes a command as an user. Still requires the user to have the proper permissions set. - */ + public ExecuteCommand() { super(JSONExecuteCommand.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/ForwardUser.java b/src/main/java/com/eu/habbo/messages/rcon/ForwardUser.java index 7df87502..8b5a0cd3 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/ForwardUser.java +++ b/src/main/java/com/eu/habbo/messages/rcon/ForwardUser.java @@ -9,9 +9,7 @@ import com.google.gson.Gson; public class ForwardUser extends RCONMessage { - /** - * Forwards an user to a room. - */ + public ForwardUser() { super(ForwardUserJSON.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/GiveBadge.java b/src/main/java/com/eu/habbo/messages/rcon/GiveBadge.java index 796f67c2..bc897be9 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/GiveBadge.java +++ b/src/main/java/com/eu/habbo/messages/rcon/GiveBadge.java @@ -13,10 +13,7 @@ import java.sql.*; public class GiveBadge extends RCONMessage { - /** - * Sends a badge to an user. - * Insers it if the user is not found. - */ + public GiveBadge() { super(GiveBadgeJSON.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/GiveCredits.java b/src/main/java/com/eu/habbo/messages/rcon/GiveCredits.java index 08e3f82d..9cd48531 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/GiveCredits.java +++ b/src/main/java/com/eu/habbo/messages/rcon/GiveCredits.java @@ -10,10 +10,7 @@ import java.sql.SQLException; public class GiveCredits extends RCONMessage { - /** - * Gives credits an user. - * Updates the database if the user is not online. - */ + public GiveCredits() { super(JSONGiveCredits.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/GivePixels.java b/src/main/java/com/eu/habbo/messages/rcon/GivePixels.java index 7bd52b13..d45b0ba0 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/GivePixels.java +++ b/src/main/java/com/eu/habbo/messages/rcon/GivePixels.java @@ -10,10 +10,7 @@ import java.sql.SQLException; public class GivePixels extends RCONMessage { - /** - * Sends pixels to an user. - * Updates the database if the user is not online. - */ + public GivePixels() { super(JSONGivePixels.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/GivePoints.java b/src/main/java/com/eu/habbo/messages/rcon/GivePoints.java index c94b5ff9..83dce06c 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/GivePoints.java +++ b/src/main/java/com/eu/habbo/messages/rcon/GivePoints.java @@ -10,10 +10,7 @@ import java.sql.SQLException; public class GivePoints extends RCONMessage { - /** - * Sends points of any type (including pixels) to an user. - * Updates the database if the user is not online. - */ + public GivePoints() { super(JSONGivePoints.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/HotelAlert.java b/src/main/java/com/eu/habbo/messages/rcon/HotelAlert.java index 6bd91ab3..d055a508 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/HotelAlert.java +++ b/src/main/java/com/eu/habbo/messages/rcon/HotelAlert.java @@ -6,9 +6,7 @@ import com.google.gson.Gson; public class HotelAlert extends RCONMessage { - /** - * Sends an hotel alert. - */ + public HotelAlert() { super(JSONHotelAlert.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/ProgressAchievement.java b/src/main/java/com/eu/habbo/messages/rcon/ProgressAchievement.java index bfac6c69..fdc587ea 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/ProgressAchievement.java +++ b/src/main/java/com/eu/habbo/messages/rcon/ProgressAchievement.java @@ -8,10 +8,7 @@ import com.google.gson.Gson; public class ProgressAchievement extends RCONMessage { - /** - * Progresses an achievement for an ONLINE user. - * Achievements for offline users are not managed by the emulator. - */ + public ProgressAchievement() { super(ProgressAchievementJSON.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java b/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java index 61a7e0bf..891e034a 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java +++ b/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java @@ -6,34 +6,22 @@ import com.google.gson.*; public abstract class RCONMessage { - /** - * The RCON Message has been handled succesfully. - */ + public final static int STATUS_OK = 0; - /** - * The RCON Message could not be handled succesfully. - */ + public final static int STATUS_ERROR = 1; - /** - * The given user could not be found. - */ + public final static int HABBO_NOT_FOUND = 2; - /** - * The given room could not be found. - */ + public final static int ROOM_NOT_FOUND = 3; - /** - * An unknown error occurred. - */ + public final static int SYSTEM_ERROR = 4; - /** - * The class the JSON gets mapped to. - */ + public final Class type; public RCONMessage(Class type) @@ -41,12 +29,7 @@ public abstract class RCONMessage this.type = type; } - /** - * - * @param gson - * @param json The mapped JSON object. - * @return A string that gets send to the RCON Client. Can be anything (JSON / XML) whatever you want. - */ + public abstract void handle(Gson gson, T json); public int status = STATUS_OK; diff --git a/src/main/java/com/eu/habbo/messages/rcon/SendGift.java b/src/main/java/com/eu/habbo/messages/rcon/SendGift.java index 2eb9b656..c0ccde84 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/SendGift.java +++ b/src/main/java/com/eu/habbo/messages/rcon/SendGift.java @@ -14,9 +14,7 @@ import java.sql.SQLException; public class SendGift extends RCONMessage { - /** - * Sends a gift to an user. - */ + public SendGift() { super(SendGiftJSON.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/SetRank.java b/src/main/java/com/eu/habbo/messages/rcon/SetRank.java index 30c01150..72aa4402 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/SetRank.java +++ b/src/main/java/com/eu/habbo/messages/rcon/SetRank.java @@ -11,10 +11,7 @@ import java.sql.PreparedStatement; public class SetRank extends RCONMessage { - /** - * Sets the rank for an user. - * Updates the database if the user is not online. - */ + public SetRank() { super(JSONSetRank.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/UpdateCatalog.java b/src/main/java/com/eu/habbo/messages/rcon/UpdateCatalog.java index d1b97b4b..82f268fa 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/UpdateCatalog.java +++ b/src/main/java/com/eu/habbo/messages/rcon/UpdateCatalog.java @@ -7,9 +7,7 @@ import com.google.gson.Gson; public class UpdateCatalog extends RCONMessage { - /** - * Updates the catalog. - */ + public UpdateCatalog() { super(JSONUpdateCatalog.class); diff --git a/src/main/java/com/eu/habbo/messages/rcon/UpdateWordfilter.java b/src/main/java/com/eu/habbo/messages/rcon/UpdateWordfilter.java index 358e51fc..dffebce5 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/UpdateWordfilter.java +++ b/src/main/java/com/eu/habbo/messages/rcon/UpdateWordfilter.java @@ -5,9 +5,7 @@ import com.google.gson.Gson; public class UpdateWordfilter extends RCONMessage { - /** - * Updates the wordfilter. - */ + public UpdateWordfilter() { super(WordFilterJSON.class); diff --git a/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java b/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java index b20629dd..50038301 100644 --- a/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java +++ b/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java @@ -106,11 +106,7 @@ public class RCONServer {} } - /** - * Adds a new RCON Message to be used. - * @param key The key that triggers this RCONMessage. - * @param clazz The class that will be instantiated and handles the logic. - */ + public void addRCONMessage(String key, Class clazz) { this.messages.put(key, clazz); diff --git a/src/main/java/com/eu/habbo/plugin/EventHandler.java b/src/main/java/com/eu/habbo/plugin/EventHandler.java index 42d516d3..218811ad 100644 --- a/src/main/java/com/eu/habbo/plugin/EventHandler.java +++ b/src/main/java/com/eu/habbo/plugin/EventHandler.java @@ -5,37 +5,14 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -/** - * An annotation to mark methods as being event handler methods - */ + @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface EventHandler { - /** - * Define the priority of the event. - *

    - * First priority to the last priority executed: - *

      - *
    1. LOWEST - *
    2. LOW - *
    3. NORMAL - *
    4. HIGH - *
    5. HIGHEST - *
    6. MONITOR - *
    - * - * @return the priority - */ + EventPriority priority() default EventPriority.NORMAL; - /** - * Define if the handler ignores a cancelled event. - *

    - * If ignoreCancelled is true and the event is cancelled, the method is - * not called. Otherwise, the method is always called. - * - * @return whether cancelled events should be ignored - */ + boolean ignoreCancelled() default false; } diff --git a/src/main/java/com/eu/habbo/plugin/EventPriority.java b/src/main/java/com/eu/habbo/plugin/EventPriority.java index eaf6327f..480092e9 100644 --- a/src/main/java/com/eu/habbo/plugin/EventPriority.java +++ b/src/main/java/com/eu/habbo/plugin/EventPriority.java @@ -2,34 +2,17 @@ package com.eu.habbo.plugin; public enum EventPriority { - /** - * Event call is of very low importance and should be ran first, to allow - * other plugins to further customise the outcome - */ + LOWEST(0), - /** - * Event call is of low importance - */ + LOW(1), - /** - * Event call is neither important nor unimportant, and may be ran - * normally - */ + NORMAL(2), - /** - * Event call is of high importance - */ + HIGH(3), - /** - * Event call is critical and must have the final say in what happens - * to the event - */ + HIGHEST(4), - /** - * Event is listened to purely for monitoring the outcome of an event. - *

    - * No modifications to the event should be made under this priority - */ + MONITOR(5); private final int slot; diff --git a/src/main/java/com/eu/habbo/plugin/HabboPlugin.java b/src/main/java/com/eu/habbo/plugin/HabboPlugin.java index b51d0077..33b3d2d2 100644 --- a/src/main/java/com/eu/habbo/plugin/HabboPlugin.java +++ b/src/main/java/com/eu/habbo/plugin/HabboPlugin.java @@ -23,12 +23,7 @@ public abstract class HabboPlugin return this.registeredEvents.containsKey(clazz); } - /** - * Add in here your own permission checks. - * @param habbo They Habbo to check for the permission. - * @param key The permission key. - * @return Return true if the given Habbo has the permission key. - */ + public abstract boolean hasPermission(Habbo habbo, String key); public URLClassLoader classLoader; diff --git a/src/main/java/com/eu/habbo/plugin/PluginManager.java b/src/main/java/com/eu/habbo/plugin/PluginManager.java index f0168279..2c1c6d92 100644 --- a/src/main/java/com/eu/habbo/plugin/PluginManager.java +++ b/src/main/java/com/eu/habbo/plugin/PluginManager.java @@ -106,11 +106,7 @@ public class PluginManager } } - /** - * Register a new event listener for the given HabboPlugin - * @param plugin The HabboPlugin to register this event for. - * @param listener The EventListener this plugin should handle. - */ + public void registerEvents(HabboPlugin plugin, EventListener listener) { synchronized (plugin.registeredEvents) @@ -140,10 +136,7 @@ public class PluginManager } } - /** - * Fires an event and passes it down to all plugins handling it. - * @param event The event to be passed down. - */ + public Event fireEvent(Event event) { for (Method method : this.methods) @@ -200,12 +193,7 @@ public class PluginManager return event; } - /** - * Checks wether an event has been registered. - * @param clazz The event class that has to be checked. - * @param pluginsOnly Wether this should only be checked in plugin events and thus ignoring emulator events. - * @return Wether the event is registered. - */ + public boolean isRegistered(Class clazz, boolean pluginsOnly) { TObjectHashIterator iterator = this.plugins.iterator(); @@ -237,9 +225,7 @@ public class PluginManager return false; } - /** - * Disposes the plugin manager. - */ + public void dispose() { this.disposePlugins(); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotChatEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotChatEvent.java index 327803bf..690fae90 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotChatEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotChatEvent.java @@ -4,15 +4,10 @@ import com.eu.habbo.habbohotel.bots.Bot; public abstract class BotChatEvent extends BotEvent { - /** - * The message the bot will say. - */ + public String message; - /** - * @param bot The Bot this event applies to. - * @param message The message the bot will say. - */ + public BotChatEvent(Bot bot, String message) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotEvent.java index 082e9007..9b3d9410 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class BotEvent extends Event { - /** - * The Bot this event applies to. - */ + public final Bot bot; - /** - * @param bot The Bot this event applies to. - */ + public BotEvent(Bot bot) { this.bot = bot; diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotPickUpEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotPickUpEvent.java index f5932220..3eff18f7 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotPickUpEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotPickUpEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class BotPickUpEvent extends BotEvent { - /** - * The Habbo who picked the bot up. - */ + public final Habbo picker; - /** - * @param bot The Bot this event applies to. - */ + public BotPickUpEvent(Bot bot, Habbo picker) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotPlacedEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotPlacedEvent.java index 77d5c6f9..e13be07b 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotPlacedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotPlacedEvent.java @@ -6,20 +6,12 @@ import com.eu.habbo.habbohotel.users.Habbo; public class BotPlacedEvent extends BotEvent { - /** - * The location of the bot. - */ + public final RoomTile location; - /** - * The placer of this bot. - */ + public final Habbo placer; - /** - * @param bot The Bot this event applies to. - * @param location The location of the bot. - * @param placer The placer of this bot. - */ + public BotPlacedEvent(Bot bot, RoomTile location, Habbo placer) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedChatEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedChatEvent.java index da37f26d..84d9d66d 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedChatEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedChatEvent.java @@ -6,35 +6,19 @@ import java.util.ArrayList; public class BotSavedChatEvent extends BotEvent { - /** - * Automatic Chatter. - */ + public boolean autoChat; - /** - * Random Lines Selected. - */ + public boolean randomChat; - /** - * Delay between chatter. - */ + public int chatDelay; - /** - * Chatter. - */ + public ArrayList chat; - /** - * This event is triggered whenever the chat settings get modified. - * Values can be altered to override behaviour. - * @param bot The Bot this event applies to. - * @param autoChat Automatic Chatter. - * @param randomChat Random Lines Selected. - * @param chatDelay Delay between chatter. - * @param chat Chatter. - */ + public BotSavedChatEvent(Bot bot, boolean autoChat, boolean randomChat, int chatDelay, ArrayList chat) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedLookEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedLookEvent.java index 03d5e1da..34788a6a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedLookEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedLookEvent.java @@ -5,27 +5,16 @@ import com.eu.habbo.habbohotel.users.HabboGender; public class BotSavedLookEvent extends BotEvent { - /** - * The new gender of this bot. Can be altered. - */ + public HabboGender gender; - /** - * The new look of this bot. Can be altered. - */ + public String newLook; - /** - * The new effect of this bot. Can be altered. - */ + public int effect; - /** - * @param bot The Bot this event applies to. - * @param gender The new gender of this bot. Can be altered. - * @param newLook The new look of this bot. Can be altered. - * @param effect The new effect of this bot. Can be altered. - */ + public BotSavedLookEvent(Bot bot, HabboGender gender, String newLook, int effect) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedNameEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedNameEvent.java index f7e5f7e2..d391ce35 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedNameEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotSavedNameEvent.java @@ -4,16 +4,10 @@ import com.eu.habbo.habbohotel.bots.Bot; public class BotSavedNameEvent extends BotEvent { - /** - * Thew new name of the bot. - */ + public String name; - /** - * This event is triggered whenever the name of a bot gets altered. - * @param bot The Bot this event applies to. - * @param name The new name of the bot. - */ + public BotSavedNameEvent(Bot bot, String name) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotServerItemEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotServerItemEvent.java index 3127e4f4..74922b43 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotServerItemEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotServerItemEvent.java @@ -5,22 +5,12 @@ import com.eu.habbo.habbohotel.users.Habbo; public class BotServerItemEvent extends BotEvent { - /** - * The Habbo that will be served. - */ + public Habbo habbo; - /** - * The handitem that will be served. - */ + public int itemId; - /** - * This event is triggered when a bot serves a handitem to a Habbo. - * The itemId and Habbo can be changed. - * @param bot The Bot this event applies to. - * @param itemId The habditem that will be served. - * @param habbo The Habbo that will be served. - */ + public BotServerItemEvent(Bot bot, Habbo habbo, int itemId) { super(bot); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotShoutEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotShoutEvent.java index a4f05741..54b6973c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotShoutEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotShoutEvent.java @@ -4,10 +4,7 @@ import com.eu.habbo.habbohotel.bots.Bot; public class BotShoutEvent extends BotChatEvent { - /** - * @param bot The Bot this event applies to. - * @param message The message the bot will say. - */ + public BotShoutEvent(Bot bot, String message) { super(bot, message); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotTalkEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotTalkEvent.java index c32fc8db..4b0d4094 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotTalkEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotTalkEvent.java @@ -4,10 +4,7 @@ import com.eu.habbo.habbohotel.bots.Bot; public class BotTalkEvent extends BotChatEvent { - /** - * @param bot The Bot this event applies to. - * @param message The message the bot will say. - */ + public BotTalkEvent(Bot bot, String message) { super(bot, message); diff --git a/src/main/java/com/eu/habbo/plugin/events/bots/BotWhisperEvent.java b/src/main/java/com/eu/habbo/plugin/events/bots/BotWhisperEvent.java index 970393dc..e4788ea7 100644 --- a/src/main/java/com/eu/habbo/plugin/events/bots/BotWhisperEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/bots/BotWhisperEvent.java @@ -5,16 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class BotWhisperEvent extends BotChatEvent { - /** - * The target Habbo this message will be whispered to. - */ + public Habbo target; - /** - * @param bot The Bot this event applies to. - * @param message The message the bot will say. - * @param target The target Habbo this message will be whispered to. - */ + public BotWhisperEvent(Bot bot, String message, Habbo target) { super(bot, message); diff --git a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadCatalogManagerEvent.java b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadCatalogManagerEvent.java index 92c7fd44..60bf595a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadCatalogManagerEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadCatalogManagerEvent.java @@ -2,9 +2,7 @@ package com.eu.habbo.plugin.events.emulator; public class EmulatorLoadCatalogManagerEvent extends EmulatorEvent { - /** - * This event is triggered when Arcturus loads the catalog. - */ + public EmulatorLoadCatalogManagerEvent() { } diff --git a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadItemsManagerEvent.java b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadItemsManagerEvent.java index fc2dbcfc..09d581b5 100644 --- a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadItemsManagerEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadItemsManagerEvent.java @@ -2,12 +2,7 @@ package com.eu.habbo.plugin.events.emulator; public class EmulatorLoadItemsManagerEvent extends EmulatorEvent { - /** - * This event is triggered when Arcturus loads all items. - * - * It is suggested to listen to this event if you want to add your own - * furniture implementations. - */ + public EmulatorLoadItemsManagerEvent() { } diff --git a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadedEvent.java b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadedEvent.java index 02a1c6a8..a6b46462 100644 --- a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorLoadedEvent.java @@ -4,9 +4,7 @@ import com.eu.habbo.plugin.Event; public class EmulatorLoadedEvent extends Event { - /** - * Triggered when the emulator has been succesfully loaded! - */ + public EmulatorLoadedEvent() { } diff --git a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStartShutdownEvent.java b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStartShutdownEvent.java index 3c1ca47d..c14aae78 100644 --- a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStartShutdownEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStartShutdownEvent.java @@ -2,9 +2,7 @@ package com.eu.habbo.plugin.events.emulator; public class EmulatorStartShutdownEvent extends EmulatorEvent { - /** - * This event is triggered when Arcturus starts shutting down. - */ + public EmulatorStartShutdownEvent() { } diff --git a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStoppedEvent.java b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStoppedEvent.java index fb53feac..0dcd3c41 100644 --- a/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStoppedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/emulator/EmulatorStoppedEvent.java @@ -2,9 +2,7 @@ package com.eu.habbo.plugin.events.emulator; public class EmulatorStoppedEvent extends EmulatorEvent { - /** - * This event is triggered when Arcturus has finished shutting down. - */ + public EmulatorStoppedEvent() { } diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureDiceRolledEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureDiceRolledEvent.java index 63eb337d..d696664a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureDiceRolledEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureDiceRolledEvent.java @@ -5,17 +5,10 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurnitureDiceRolledEvent extends FurnitureUserEvent { - /** - * The result that will be displayed. - */ + public int result; - /** - * This event is triggered when a dice is rolled. - * @param furniture The furniture this event applies to. - * @param habbo The Habbo who rolled the dice. - * @param result The result that will be displayed. - */ + public FurnitureDiceRolledEvent(HabboItem furniture, Habbo habbo, int result) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureEvent.java index 8367c049..9ec1c436 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class FurnitureEvent extends Event { - /** - * The furniture this event applies to. - */ + public final HabboItem furniture; - /** - * This event is triggered whenever something happens to a furniture in a room. - * @param furniture The furniture this event applies to. - */ + public FurnitureEvent(HabboItem furniture) { this.furniture = furniture; diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureMovedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureMovedEvent.java index d9e2b73f..b138461f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureMovedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureMovedEvent.java @@ -6,23 +6,13 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurnitureMovedEvent extends FurnitureUserEvent { - /** - * The old location of the furniture being moved. - */ + public final RoomTile oldPosition; - /** - * The new location of the furniture being moved. - */ + public final RoomTile newPosition; - /** - * This event is triggered whenever an furniture is being moved. - * @param furniture The furniture that is being moved. - * @param oldPosition The old location of the furniture being moved. - * @param newPosition The new location of the furniture being moved. - * @param habbo The Habbo who moved the furniture. - */ + public FurnitureMovedEvent(HabboItem furniture, Habbo habbo, RoomTile oldPosition, RoomTile newPosition) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePickedUpEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePickedUpEvent.java index 348c503e..f2c8e24c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePickedUpEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePickedUpEvent.java @@ -5,11 +5,7 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurniturePickedUpEvent extends FurnitureUserEvent { - /** - * This even is trigged whenever a furniture is being picked up. - * @param furniture The furniture that is being picked up. - * @param habbo The Habbo that picked it up. - */ + public FurniturePickedUpEvent(HabboItem furniture, Habbo habbo) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePlacedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePlacedEvent.java index c32863db..0de2e88d 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePlacedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurniturePlacedEvent.java @@ -6,18 +6,10 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurniturePlacedEvent extends FurnitureUserEvent { - /** - * The location the furniture was placed. - * Is NULL when wallitem. - */ + public final RoomTile location; - /** - * This event is triggered whenever a furniture is being placed down into an room. - * @param furniture The furniture that is placed down. - * @param habbo The Habbo who put the furniture to the room. - * @param location The location the furniture was placed. - */ + public FurniturePlacedEvent(HabboItem furniture, Habbo habbo, RoomTile location) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRedeemedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRedeemedEvent.java index e91dfdfb..83224bb4 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRedeemedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRedeemedEvent.java @@ -9,24 +9,13 @@ public class FurnitureRedeemedEvent extends FurnitureUserEvent public static final int PIXELS = 1; public static final int DIAMONDS = 5; - /** - * The amount of the currency has been redeemed. - */ + public final int amount; - /** - * The currencyID that was redeemed. - */ + public final int currencyID; - /** - * This event is triggered whenever something happens to a furniture in a room. - * - * @param furniture The furniture this event applies to. - * @param habbo The Habbo that redeemed this furniture. - * @param amount The amount of the currency has been redeemed. - * @param currencyID The currencyID that was redeemed. - */ + public FurnitureRedeemedEvent(HabboItem furniture, Habbo habbo, int amount, int currencyID) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRolledEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRolledEvent.java index d5829c2f..046fca84 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRolledEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRolledEvent.java @@ -5,22 +5,13 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurnitureRolledEvent extends FurnitureEvent { - /** - * The roller that moved the furniture. - */ + public final HabboItem roller; - /** - * The new location of the furniture. - */ + public final RoomTile newLocation; - /** - * This event is triggered when an furniture is being rolled by a roller. - * @param furniture The furniture that is being rolled. - * @param roller The roller who moved the furniture. - * @param newLocation The new location of the furniture. - */ + public FurnitureRolledEvent(HabboItem furniture, HabboItem roller, RoomTile newLocation) { super(furniture); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRoomTonerEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRoomTonerEvent.java index c6d6c398..95a64220 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRoomTonerEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRoomTonerEvent.java @@ -9,13 +9,7 @@ public class FurnitureRoomTonerEvent extends FurnitureUserEvent public int saturation; public int brightness; - /** - * This event is triggered when the data for the room background toner is saved. - * @param furniture The furniture this event applies to. - * @param hue The hue. - * @param saturation The saturation. - * @param brightness The brightness. - */ + public FurnitureRoomTonerEvent(HabboItem furniture, Habbo habbo, int hue, int saturation, int brightness) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRotatedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRotatedEvent.java index 8767f3dd..6772e945 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRotatedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureRotatedEvent.java @@ -5,17 +5,10 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class FurnitureRotatedEvent extends FurnitureUserEvent { - /** - * The previous rotation of this furniture. - */ + public final int oldRotation; - /** - * This event is triggered whenever a furniture is being rotated. - * @param furniture The furniture that is being rotated. - * @param habbo The Habbo who rotated the furniture. - * @param oldRotation The previous rotation of this furniture. - */ + public FurnitureRotatedEvent(HabboItem furniture, Habbo habbo, int oldRotation) { super(furniture, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureUserEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureUserEvent.java index e29f2fea..9f2867c2 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureUserEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/FurnitureUserEvent.java @@ -5,17 +5,10 @@ import com.eu.habbo.habbohotel.users.HabboItem; public abstract class FurnitureUserEvent extends FurnitureEvent { - /** - * The Habbo this event applies to. - */ + public final Habbo habbo; - /** - * This event is triggered whenever something happens to a furniture in a room. - * - * @param furniture The furniture this event applies to. - * @param habbo The Habbo this event applies to. - */ + public FurnitureUserEvent(HabboItem furniture, Habbo habbo) { super(furniture); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredConditionFailedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredConditionFailedEvent.java index f4511aab..b20ca507 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredConditionFailedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredConditionFailedEvent.java @@ -8,23 +8,13 @@ import com.eu.habbo.plugin.events.roomunit.RoomUnitEvent; public class WiredConditionFailedEvent extends RoomUnitEvent { - /** - * The wired trigger item. - */ + public final InteractionWiredTrigger trigger; - /** - * The condition that failed to be met. - */ + public final InteractionWiredCondition condition; - /** - * Cancelling this event equals the condition being met and therefor allows further execution. - * @param room The Room this event applies to. - * @param roomUnit The RoomUnit this event applies to. - * @param trigger The wired trigger item. - * @param condition The condition that failed to be met. - */ + public WiredConditionFailedEvent(Room room, RoomUnit roomUnit, InteractionWiredTrigger trigger, InteractionWiredCondition condition) { super(room, roomUnit); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackExecutedEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackExecutedEvent.java index 0a1d00d1..a844208f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackExecutedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackExecutedEvent.java @@ -10,29 +10,16 @@ import gnu.trove.set.hash.THashSet; public class WiredStackExecutedEvent extends RoomUnitEvent { - /** - * The wired trigger for the stack. - */ + public final InteractionWiredTrigger trigger; - /** - * The wired effects in this stack. - */ + public final THashSet effects; - /** - * The conditions that were met. - */ + public final THashSet conditions; - /** - * Triggered when a wired stack has succesfully been executed and all conditions are met. - * @param room The Room this event applies to. - * @param roomUnit The roomUnit that triggered this event. - * @param trigger The wired trigger for the stack. - * @param effects The wired effects in this stack. - * @param conditions The conditions that were met. - */ + public WiredStackExecutedEvent(Room room, RoomUnit roomUnit, InteractionWiredTrigger trigger, THashSet effects, THashSet conditions) { super(room, roomUnit); diff --git a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackTriggeredEvent.java b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackTriggeredEvent.java index e9ebb315..5051b7b3 100644 --- a/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackTriggeredEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/furniture/wired/WiredStackTriggeredEvent.java @@ -10,29 +10,16 @@ import gnu.trove.set.hash.THashSet; public class WiredStackTriggeredEvent extends RoomUnitEvent { - /** - * The item that triggered this stack. - */ + public final InteractionWiredTrigger trigger; - /** - * The effects in this stack. - */ + public final THashSet effects; - /** - * The conditions in this stack. - */ + public final THashSet conditions; - /** - * This event triggers when a WiredStack is about to be executed. - * @param room The Room this event applies to. - * @param roomUnit The RoomUnit that triggered this stack. - * @param trigger The item that triggered this stack. - * @param effects The effects in this stack. - * @param conditions The conditions in this stack. - */ + public WiredStackTriggeredEvent(Room room, RoomUnit roomUnit, InteractionWiredTrigger trigger, THashSet effects, THashSet conditions) { super(room, roomUnit); diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameEvent.java index 2414b409..600fbfdc 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class GameEvent extends Event { - /** - * The Game instance that this event applies to. - */ + public final Game game; - /** - * @param game The Game instance that this event applies to. - */ + public GameEvent(Game game) { this.game = game; diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameHabboJoinEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameHabboJoinEvent.java index 283107b5..c8cb9839 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameHabboJoinEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameHabboJoinEvent.java @@ -5,10 +5,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GameHabboJoinEvent extends GameUserEvent { - /** - * @param game The Game instance that this event applies to. - * @param habbo The Habbo that joined the game. - */ + public GameHabboJoinEvent(Game game, Habbo habbo) { super(game, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameHabboLeaveEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameHabboLeaveEvent.java index c537af42..46e0535a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameHabboLeaveEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameHabboLeaveEvent.java @@ -5,10 +5,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GameHabboLeaveEvent extends GameUserEvent { - /** - * @param game The Game instance that this event applies to. - * @param habbo The Habbo that left the game. - */ + public GameHabboLeaveEvent(Game game, Habbo habbo) { super(game, habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameStartedEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameStartedEvent.java index 3dd7275a..fab72bf4 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameStartedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameStartedEvent.java @@ -4,10 +4,7 @@ import com.eu.habbo.habbohotel.games.Game; public class GameStartedEvent extends GameEvent { - /** - * This event occurs when a Game starts. - * @param game The Game this event applies to. - */ + public GameStartedEvent(Game game) { super(game); diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameStoppedEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameStoppedEvent.java index 7687b514..50f9d6dc 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameStoppedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameStoppedEvent.java @@ -4,10 +4,7 @@ import com.eu.habbo.habbohotel.games.Game; public class GameStoppedEvent extends GameEvent { - /** - * This event occurs when a Game stops. - * @param game The Game instance that this event applies to. - */ + public GameStoppedEvent(Game game) { super(game); diff --git a/src/main/java/com/eu/habbo/plugin/events/games/GameUserEvent.java b/src/main/java/com/eu/habbo/plugin/events/games/GameUserEvent.java index 32b294e3..eaa0b8f8 100644 --- a/src/main/java/com/eu/habbo/plugin/events/games/GameUserEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/games/GameUserEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public abstract class GameUserEvent extends GameEvent { - /** - * The Habbo that this event applies to. - */ + public final Habbo habbo; - /** - * @param game The Game instance that this event applies to. - * @param habbo The Habbo that this event applies to. - */ + public GameUserEvent(Game game, Habbo habbo) { super(game); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildAcceptedMembershipEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildAcceptedMembershipEvent.java index bb71009e..9056044f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildAcceptedMembershipEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildAcceptedMembershipEvent.java @@ -5,23 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildAcceptedMembershipEvent extends GuildEvent { - /** - * The userID that gets accepted. - */ + public final int userId; - /** - * The Habbo that gets accepted. Can be NULL when user is offline. - */ + public final Habbo user; - /** - * Triggered whenever an membership requests gets accepted. - * This event cannot be cancelled. - * @param guild The guild this applies to. - * @param userId The userID that gets accepted. - * @param user The Habbo that gets accepted. Can be NULL when user is offline. - */ + public GuildAcceptedMembershipEvent(Guild guild, int userId, Habbo user) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedBadgeEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedBadgeEvent.java index 369da0a7..63099027 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedBadgeEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedBadgeEvent.java @@ -4,16 +4,10 @@ import com.eu.habbo.habbohotel.guilds.Guild; public class GuildChangedBadgeEvent extends GuildEvent { - /** - * The new badge of the guild. - */ + public String badge; - /** - * Triggered whenever the badge of a guild gets updated. - * @param guild The guild this applies to. - * @param badge The new badge of the guild. - */ + public GuildChangedBadgeEvent(Guild guild, String badge) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedColorsEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedColorsEvent.java index 259bd90e..a850512a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedColorsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedColorsEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.guilds.Guild; public class GuildChangedColorsEvent extends GuildEvent { - /** - * First color. - */ + public int colorOne; - /** - * Second color. - */ + public int colorTwo; - /** - * Triggered whenever the guild colors get updated. - * @param guild The guild this applies to. - * @param colorOne First color. - * @param colorTwo Second color. - */ + public GuildChangedColorsEvent(Guild guild, int colorOne, int colorTwo) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedNameEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedNameEvent.java index 17d5197a..7113b768 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedNameEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedNameEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.guilds.Guild; public class GuildChangedNameEvent extends GuildEvent { - /** - * The new name of the guild. - */ + public String name; - /** - * The new description of the guild. - */ + public String description; - /** - * Triggered whenever the name / description of a guild gets updated. - * @param guild The guild this applies to. - * @param name The new name of the guild. - * @param description The new description of the guild. - */ + public GuildChangedNameEvent(Guild guild, String name, String description) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedSettingsEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedSettingsEvent.java index 2eab7076..36654696 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedSettingsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildChangedSettingsEvent.java @@ -4,21 +4,12 @@ import com.eu.habbo.habbohotel.guilds.Guild; public class GuildChangedSettingsEvent extends GuildEvent { - /** - * The new state of the guild. - */ + public int state; - /** - * The new rights of the guild. - */ + public int rights; - /** - * Triggered whenever the settings of a guild gets updated. - * @param guild The guild this applies to. - * @param state The new state of the guild. - * @param rights The new rights of the guild. - */ + public GuildChangedSettingsEvent(Guild guild, int state, int rights) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeclinedMembershipEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeclinedMembershipEvent.java index 43b84a79..7bcc0d62 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeclinedMembershipEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeclinedMembershipEvent.java @@ -5,28 +5,16 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildDeclinedMembershipEvent extends GuildEvent { - /** - * The userID that gets declined. - */ + public final int userId; - /** - * The Habbo that gets declined. Can be NULL when user is offline. - */ + public final Habbo user; - /** - * The Habbo that declined the user from joining. - */ + public final Habbo admin; - /** - * Triggered whenever an membership requests gets declined. - * This event cannot be cancelled. - * @param guild The guild this applies to. - * @param userId The userID that gets declined. - * @param user The Habbo that gets declined. Can be NULL when user is offline. - */ + public GuildDeclinedMembershipEvent(Guild guild, int userId, Habbo user, Habbo admin) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeletedEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeletedEvent.java index ffc5e2bc..9a85b142 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeletedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildDeletedEvent.java @@ -5,16 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildDeletedEvent extends GuildEvent { - /** - * The Habbo that deleted the guild. - */ + public final Habbo deleter; - /** - * Triggered whenever a guild gets deleted. - * @param guild The guild this applies to. - * @param deleter The Habbo that deleted the guild. - */ + public GuildDeletedEvent(Guild guild, Habbo deleter) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildEvent.java index 9f203711..8c2ccc30 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class GuildEvent extends Event { - /** - * The guild this applies to. - */ + public final Guild guild; - /** - * @param guild The guild this applies to. - */ + public GuildEvent(Guild guild) { this.guild = guild; diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildFavoriteSetEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildFavoriteSetEvent.java index 09b437f4..5d26070c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildFavoriteSetEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildFavoriteSetEvent.java @@ -5,16 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildFavoriteSetEvent extends GuildEvent { - /** - * The Habbo that sets the favorite guild. - */ + public final Habbo habbo; - /** - * Triggered whenever a Habbo sets his favorite guild. - * @param guild The guild this applies to. - * @param habbo The Habbo that sets the favorite guild. - */ + public GuildFavoriteSetEvent(Guild guild, Habbo habbo) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildGivenAdminEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildGivenAdminEvent.java index 09426e6e..7e5b1cdc 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildGivenAdminEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildGivenAdminEvent.java @@ -5,28 +5,16 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildGivenAdminEvent extends GuildEvent { - /** - * The userId of the Habbo given Admin rights. - */ + public final int userId; - /** - * The Habbo that is given Admin rights. - */ + public final Habbo habbo; - /** - * The person that give the Habbo admin rights. - */ + public final Habbo admin; - /** - * Triggered whenever an Habbo gets given the Admin rights. - * @param guild The guild this applies to. - * @param userId The userId of the Habbo given Admin rights. - * @param habbo The Habbo that is given Admin rights. - * @param admin The person that give the Habbo admin rights. - */ + public GuildGivenAdminEvent(Guild guild, int userId, Habbo habbo, Habbo admin) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildPurchasedEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildPurchasedEvent.java index d0f42617..fd04d4fe 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildPurchasedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildPurchasedEvent.java @@ -5,16 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildPurchasedEvent extends GuildEvent { - /** - * The Habbo that bought this guild. - */ + public final Habbo habbo; - /** - * Triggered whenever someone buys a guild. - * @param guild The guild this applies to. - * @param habbo - */ + public GuildPurchasedEvent(Guild guild, Habbo habbo) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedAdminEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedAdminEvent.java index c13a258f..c2f3baed 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedAdminEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedAdminEvent.java @@ -5,21 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildRemovedAdminEvent extends GuildEvent { - /** - * The userID of the Admin that gets removed. - */ + public final int userId; - /** - * The Habbo that gets removed. Is null when the Habbo is offnot in the guild room. - */ + public final Habbo admin; - /** - * @param guild The guild this applies to. - * @param userId The userID of the Admin that gets removed. - * @param admin The Habbo that gets removed. Is null when the Habbo is not in the guild room. - */ + public GuildRemovedAdminEvent(Guild guild, int userId, Habbo admin) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedFavoriteEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedFavoriteEvent.java index a5e6e1b5..b3ae0b31 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedFavoriteEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedFavoriteEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildRemovedFavoriteEvent extends GuildEvent { - /** - * The Habbo that removed the guild as favorite. - */ + public final Habbo habbo; - /** - * @param guild The guild this applies to. - * @param habbo The Habbo that removed the guild as favorite. - */ + public GuildRemovedFavoriteEvent(Guild guild, Habbo habbo) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedMemberEvent.java b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedMemberEvent.java index e82ea99e..e17605bf 100644 --- a/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedMemberEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/guilds/GuildRemovedMemberEvent.java @@ -5,21 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class GuildRemovedMemberEvent extends GuildEvent { - /** - * The userID of the Habbo being removed. - */ + public final int userId; - /** - * The guildmember that has been removed. - */ + public final Habbo guildMember; - /** - * @param guild The guild this applies to. - * @param userId The userID of the Habbo being removed. - * @param guildMember The guildmember that has been removed. - */ + public GuildRemovedMemberEvent(Guild guild, int userId, Habbo guildMember) { super(guild); diff --git a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorPopularRoomsEvent.java b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorPopularRoomsEvent.java index 84ae8a1a..17ace2ec 100644 --- a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorPopularRoomsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorPopularRoomsEvent.java @@ -7,15 +7,10 @@ import java.util.ArrayList; public class NavigatorPopularRoomsEvent extends NavigatorRoomsEvent { - /** - * The rooms displayed. - */ + public final ArrayList rooms; - /** - * @param habbo The Habbo this event applies to. - * @param rooms The rooms displayed. - */ + public NavigatorPopularRoomsEvent(Habbo habbo, ArrayList rooms) { super(habbo, rooms); diff --git a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomCreatedEvent.java b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomCreatedEvent.java index d3cacc37..8b8f35a4 100644 --- a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomCreatedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomCreatedEvent.java @@ -6,17 +6,10 @@ import com.eu.habbo.plugin.events.users.UserEvent; public class NavigatorRoomCreatedEvent extends UserEvent { - /** - * The room created. - */ + public final Room room; - /** - * Triggered whenever a user creates a room. - * This event cannot be cancelled. - * @param habbo The Habbo this event applies to. - * @param room The room created. - */ + public NavigatorRoomCreatedEvent(Habbo habbo, Room room) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomDeletedEvent.java b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomDeletedEvent.java index 61b25581..ccdf8c3c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomDeletedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomDeletedEvent.java @@ -7,10 +7,7 @@ import com.eu.habbo.plugin.events.users.UserEvent; public class NavigatorRoomDeletedEvent extends UserEvent { public final Room room; - /** - * @param habbo The Habbo this event applies to. - * @param room The room that is deleted. Note: Data is not deleted yet. - */ + public NavigatorRoomDeletedEvent(Habbo habbo, Room room) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomsEvent.java b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomsEvent.java index 74ca24bc..83cf7d5f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorRoomsEvent.java @@ -8,15 +8,10 @@ import java.util.ArrayList; public abstract class NavigatorRoomsEvent extends UserEvent { - /** - * The rooms displayed. - */ + public final ArrayList rooms; - /** - * @param habbo The Habbo this event applies to. - * @param rooms The rooms displayed. - */ + public NavigatorRoomsEvent(Habbo habbo, ArrayList rooms) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorSearchResultEvent.java b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorSearchResultEvent.java index 4f5f6406..2f71a750 100644 --- a/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorSearchResultEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/navigator/NavigatorSearchResultEvent.java @@ -7,22 +7,13 @@ import java.util.ArrayList; public class NavigatorSearchResultEvent extends NavigatorRoomsEvent { - /** - * Prefix used to search. e.g. owner: - */ + public final String prefix; - /** - * The query that has been used to search for rooms. - */ + public final String query; - /** - * Triggered whenever a user searches for rooms in the navigator. - * @param habbo The Habbo this event applies to. - * @param prefix Prefix used to search. e.g. owner: - * @param query The query that has been used to search for rooms. - */ + public NavigatorSearchResultEvent(Habbo habbo, String prefix, String query, ArrayList rooms) { super(habbo, rooms); diff --git a/src/main/java/com/eu/habbo/plugin/events/pets/PetEvent.java b/src/main/java/com/eu/habbo/plugin/events/pets/PetEvent.java index 0617c629..696740ca 100644 --- a/src/main/java/com/eu/habbo/plugin/events/pets/PetEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/pets/PetEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class PetEvent extends Event { - /** - * The pet this event applies to. - */ + public final AbstractPet pet; - /** - * Abstract class for events related to pets. - * @param pet The pet this event applies to. - */ + public PetEvent(AbstractPet pet) { this.pet = pet; diff --git a/src/main/java/com/eu/habbo/plugin/events/pets/PetTalkEvent.java b/src/main/java/com/eu/habbo/plugin/events/pets/PetTalkEvent.java index f8c00a1e..dbecbd79 100644 --- a/src/main/java/com/eu/habbo/plugin/events/pets/PetTalkEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/pets/PetTalkEvent.java @@ -5,9 +5,7 @@ import com.eu.habbo.habbohotel.rooms.RoomChatMessage; public class PetTalkEvent extends PetEvent { - /** - * The message to be displayed - */ + public RoomChatMessage message; public PetTalkEvent(AbstractPet pet, RoomChatMessage message) diff --git a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomEvent.java b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomEvent.java index b958664e..76f32669 100644 --- a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class RoomEvent extends Event { - /** - * The Room this event applies to. - */ + public final Room room; - /** - * This is an event that applies to a certain room. - * @param room The room this event applies to. - */ + public RoomEvent(Room room) { this.room = room; diff --git a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomLoadedEvent.java b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomLoadedEvent.java index d5361435..210ec58d 100644 --- a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomLoadedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomLoadedEvent.java @@ -4,11 +4,7 @@ import com.eu.habbo.habbohotel.rooms.Room; public class RoomLoadedEvent extends RoomEvent { - /** - * Triggered whenever a room is fully loaded. - * - * @param room The room that has been loaded. - */ + public RoomLoadedEvent(Room room) { super(room); diff --git a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUncachedEvent.java b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUncachedEvent.java index 462b04f0..fb51498a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUncachedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUncachedEvent.java @@ -4,11 +4,7 @@ import com.eu.habbo.habbohotel.rooms.Room; public class RoomUncachedEvent extends RoomEvent { - /** - * Triggered when the room will be uncached. - * - * @param room The room this event applies to. - */ + public RoomUncachedEvent(Room room) { super(room); diff --git a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadedEvent.java b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadedEvent.java index a4fcde8b..e8151d12 100644 --- a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadedEvent.java @@ -4,11 +4,7 @@ import com.eu.habbo.habbohotel.rooms.Room; public class RoomUnloadedEvent extends RoomEvent { - /** - * Triggered whenever a room has been unloaded. - * - * @param room The room that has been unloaded. - */ + public RoomUnloadedEvent(Room room) { super(room); diff --git a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadingEvent.java b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadingEvent.java index 1eb2494e..cde143f5 100644 --- a/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadingEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/rooms/RoomUnloadingEvent.java @@ -4,11 +4,7 @@ import com.eu.habbo.habbohotel.rooms.Room; public class RoomUnloadingEvent extends RoomEvent { - /** - * Triggered when a room is about to be unloaded. - * - * @param room The room this event applies to. - */ + public RoomUnloadingEvent(Room room) { super(room); diff --git a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitEvent.java b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitEvent.java index c673cf5c..61de0b19 100644 --- a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitEvent.java @@ -6,19 +6,13 @@ import com.eu.habbo.plugin.Event; public abstract class RoomUnitEvent extends Event { - /** - * The Room this event applies to. - */ + public final Room room; - /** - * The RoomUnit this event applies to. - */ + public final RoomUnit roomUnit; - /** - * @param roomUnit The RoomUnit this event applies to. - */ + public RoomUnitEvent(Room room, RoomUnit roomUnit) { this.room = room; diff --git a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitLookAtPointEvent.java b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitLookAtPointEvent.java index 3fbc0e26..ab94e45d 100644 --- a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitLookAtPointEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitLookAtPointEvent.java @@ -6,16 +6,10 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit; public class RoomUnitLookAtPointEvent extends RoomUnitEvent { - /** - * The tile to look at. - */ + public final RoomTile location; - /** - * @param room The Room this event applies to. - * @param roomUnit The RoomUnit this event applies to. - * @param location The tile to look at. - */ + public RoomUnitLookAtPointEvent(Room room, RoomUnit roomUnit, RoomTile location) { super(room, roomUnit); diff --git a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitSetGoalEvent.java b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitSetGoalEvent.java index 80a5354f..b7096bd3 100644 --- a/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitSetGoalEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/roomunit/RoomUnitSetGoalEvent.java @@ -6,9 +6,7 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit; public class RoomUnitSetGoalEvent extends RoomUnitEvent { - /** - * Target goal that the Habbo has set. - */ + public final RoomTile goal; public RoomUnitSetGoalEvent(Room room, RoomUnit roomUnit, RoomTile goal) @@ -18,11 +16,7 @@ public class RoomUnitSetGoalEvent extends RoomUnitEvent this.goal = goal; } - /** - * Sets a new walk goal location for the Habbo. - * This will trigger an new event instance of this class. - * @param t an location. - */ + public void setGoal(RoomTile t) { super.roomUnit.setGoalLocation(t); diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportEvent.java index d496a414..8910d420 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class SupportEvent extends Event { - /** - * The moderator for this event. - */ + public Habbo moderator; - /** - * @param moderator The moderator for this event. - */ + public SupportEvent(Habbo moderator) { this.moderator = moderator; diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportRoomActionEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportRoomActionEvent.java index a7c884fc..4c79da3f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportRoomActionEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportRoomActionEvent.java @@ -5,34 +5,19 @@ import com.eu.habbo.habbohotel.users.Habbo; public class SupportRoomActionEvent extends SupportEvent { - /** - * The room to handle. - */ + public final Room room; - /** - * Whether to kick all users. - */ + public boolean kickUsers; - /** - * Whether to lock the door. - */ + public boolean lockDoor; - /** - * Whether to change the title. - */ + public boolean changeTitle; - /** - * This event is triggered when the room settings are changed via the mod tool. - * @param moderator The moderator for this event. - * @param room The room to handle. - * @param kickUsers Whether to kick all users. - * @param lockDoor Whether to lock the door. - * @param changeTitle Whether to change the title. - */ + public SupportRoomActionEvent(Habbo moderator, Room room, boolean kickUsers, boolean lockDoor, boolean changeTitle) { super(moderator); diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportTicketEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportTicketEvent.java index 99d21e83..a6290c40 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportTicketEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportTicketEvent.java @@ -7,10 +7,7 @@ public class SupportTicketEvent extends SupportEvent { public final ModToolIssue ticket; - /** - * @param moderator There is no moderator for this event. - * @param ticket The ticket creatd. - */ + public SupportTicketEvent(Habbo moderator, ModToolIssue ticket) { super(moderator); diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserAlertedEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserAlertedEvent.java index 1fc84491..62b83c72 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserAlertedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserAlertedEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class SupportUserAlertedEvent extends SupportEvent { - /** - * The Habbo this event applies to. - */ + public Habbo target; - /** - * The message send to the habbo. - */ + public String message; - /** - * This event is triggered when a modeerator alerts an user. - * @param moderator The moderator for this event. - * @param target The Habbo this event applies to. - * @param message The message send to the habbo. - */ + public SupportUserAlertedEvent(Habbo moderator, Habbo target, String message) { super(moderator); diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserBannedEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserBannedEvent.java index b547e057..8e8acf12 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserBannedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserBannedEvent.java @@ -5,21 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class SupportUserBannedEvent extends SupportEvent { - /** - * The Habbo that has been banned. - */ + public final Habbo target; - /** - * The ModToolBan created. - */ + public final ModToolBan ban; - /** - * This event is triggered when a Habbo gets banned. Changes to the ModToolBan will be saved. - * @param target The Habbo that has been banned. - * @param ban The ModToolBan created. - */ + public SupportUserBannedEvent(Habbo moderator, Habbo target, ModToolBan ban) { super(moderator); diff --git a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserKickEvent.java b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserKickEvent.java index 953e16e0..4871d87c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/support/SupportUserKickEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/support/SupportUserKickEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class SupportUserKickEvent extends SupportEvent { - /** - * The target to kick. - */ + public Habbo target; - /** - * The message to send upon kick. - */ + public String message; - /** - * This event is triggered when a Habbo gets kicked via the mod tools. - * @param moderator The moderator for this event. - * @param target The target to kick. - * @param message The message to send upon kick. - */ + public SupportUserKickEvent(Habbo moderator, Habbo target, String message) { super(moderator); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserCommandEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserCommandEvent.java index 79698e9a..a939b8bd 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserCommandEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserCommandEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserCommandEvent extends UserEvent { - /** - * Arguments the user typed for this command. - */ + public final String[] args; - /** - * Wether the command has succesfully been executed. - */ + public final boolean succes; - /** - * This event is triggered whenever a user executes a command. - * @param habbo The Habbo this event applies to. - * @param args Arguments the user typed for this command. - * @param succes Wether the command has succesfully been executed. - */ + public UserCommandEvent(Habbo habbo, String[] args, boolean succes) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserCreditsEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserCreditsEvent.java index 86678258..92dc008b 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserCreditsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserCreditsEvent.java @@ -4,16 +4,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserCreditsEvent extends UserEvent { - /** - * The amount of credits that will be added or removed. - */ + public int credits; - /** - * This Event is triggered when credits are added or removed. - * @param habbo The Habbo this event applies to. - * @param credits The amount of credits that will be added or removed. - */ + public UserCreditsEvent(Habbo habbo, int credits) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserDisconnectEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserDisconnectEvent.java index 3426fb4d..a771d732 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserDisconnectEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserDisconnectEvent.java @@ -4,9 +4,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserDisconnectEvent extends UserEvent { - /** - * @param habbo The Habbo this event applies to. - */ + public UserDisconnectEvent(Habbo habbo) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserEnterRoomEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserEnterRoomEvent.java index 9e0e325f..3e9d242d 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserEnterRoomEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserEnterRoomEvent.java @@ -5,18 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserEnterRoomEvent extends UserEvent { - /** - * The room being entered. - */ + public final Room room; - /** - * Triggered when a Habbo enters a room. - * Cancel the event to prevent the Habbo from entering. - * - * @param habbo The Habbo this event applies to. - * @param room The room being entered. - */ + public UserEnterRoomEvent(Habbo habbo, Room room) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserEvent.java index 26091d9c..0d49b89a 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserEvent.java @@ -5,14 +5,10 @@ import com.eu.habbo.plugin.Event; public abstract class UserEvent extends Event { - /** - * The Habbo this event applies to. - */ + public final Habbo habbo; - /** - * @param habbo The Habbo this event applies to. - */ + public UserEvent(Habbo habbo) { this.habbo = habbo; diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserExecuteCommandEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserExecuteCommandEvent.java index 59ae8c7c..e3b5c07f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserExecuteCommandEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserExecuteCommandEvent.java @@ -5,23 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserExecuteCommandEvent extends UserEvent { - /** - * The command that has been executed. - */ + public final Command command; - /** - * The parameters which has been used to execute the command. - * This is the whole chat string the Habbo typed split on spaces. - */ + public final String[] params; - /** - * This event is triggered whenever a Habbo executes an command. - * @param habbo The Habbo this event applies to. - * @param command The command the Habbo executed. - * @param params The parameters which has been used to execute the command. - */ + public UserExecuteCommandEvent(Habbo habbo, Command command, String[] params) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserExitRoomEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserExitRoomEvent.java index a1ce9405..4e3e0d9c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserExitRoomEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserExitRoomEvent.java @@ -20,10 +20,7 @@ public class UserExitRoomEvent extends UserEvent public final UserExitRoomReason reason; - /** - * @param habbo The Habbo this event applies to. - * @param reason The reason the Habbo has left the room. - */ + public UserExitRoomEvent(Habbo habbo, UserExitRoomReason reason) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserIdleEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserIdleEvent.java index 994c6632..25669eb1 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserIdleEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserIdleEvent.java @@ -16,12 +16,7 @@ public class UserIdleEvent extends UserEvent public final IdleReason reason; public boolean idle; - /** - * Triggered whenever the state of idle for a given Habbo changes. - * @param habbo The Habbo this event applies to. - * @param reason The cause of this event. - * @param idle The new idle state. - */ + public UserIdleEvent(Habbo habbo, IdleReason reason, boolean idle) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserKickEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserKickEvent.java index 69c3a084..11216529 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserKickEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserKickEvent.java @@ -4,14 +4,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserKickEvent extends UserEvent { - /** - * The Habbo being kicked. - */ + public final Habbo target; - /** - * @param habbo The Habbo this event applies to. - */ + public UserKickEvent(Habbo habbo, Habbo target) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserLoginEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserLoginEvent.java index 53660141..907f3b52 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserLoginEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserLoginEvent.java @@ -6,17 +6,10 @@ import java.net.SocketAddress; public class UserLoginEvent extends UserEvent { - /** - * Remote IP Adress of the Habbo who logged in. - * @see java.net.SocketAddress - */ + public final SocketAddress ip; - /** - * This event is triggered whenever a Habbo logs into the client. - * @param habbo The Habbo this event applies to. - * @param ip The SocketAddress of the Habbo connecting. - */ + public UserLoginEvent(Habbo habbo, SocketAddress ip) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserPickGiftEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserPickGiftEvent.java index 146a2fbb..bd46ceda 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserPickGiftEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserPickGiftEvent.java @@ -8,12 +8,7 @@ public class UserPickGiftEvent extends UserEvent public final int keyB; public final int index; - /** - * @param habbo The Habbo this event applies to. - * @param keyA - * @param keyB - * @param index - */ + public UserPickGiftEvent(Habbo habbo, int keyA, int keyB, int index) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserPointsEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserPointsEvent.java index 52cb95f1..31b36952 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserPointsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserPointsEvent.java @@ -4,22 +4,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserPointsEvent extends UserEvent { - /** - * Amount of points that will be added or removed. - */ + public int points; - /** - * Points type. - */ + public int type; - /** - * This event is triggered when points are added or removed from a user. - * @param habbo The Habbo this event applies to. - * @param amount Amount of points that will be added or removed. - * @param type Points type. - */ + public UserPointsEvent(Habbo habbo, int points, int type) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserPublishPictureEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserPublishPictureEvent.java index 1b3e865f..0015fe1c 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserPublishPictureEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserPublishPictureEvent.java @@ -4,27 +4,16 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserPublishPictureEvent extends UserEvent { - /** - * The URL the picture gets saved to. - */ + public String URL; - /** - * The timestamp that the picture was taken. - */ + public int timestamp; - /** - * The room id this picture was taken. - */ + public int roomId; - /** - * @param habbo The Habbo this event applies to. - * @param url The URL the picture gets saved to. - * @param timestamp The timestamp that the picture was taken. - * @param roomId The room id this picture was taken. - */ + public UserPublishPictureEvent(Habbo habbo, String url, int timestamp, int roomId) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserPurchasePictureEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserPurchasePictureEvent.java index eeaefad1..8905d966 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserPurchasePictureEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserPurchasePictureEvent.java @@ -4,27 +4,16 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserPurchasePictureEvent extends UserEvent { - /** - * The url of the picture. - */ + public String url; - /** - * The room the picture was taken. - */ + public int roomId; - /** - * The timestamp the picture was taken. - */ + public int timestamp; - /** - * @param habbo The Habbo this event applies to. - * @param url The url of the picture. - * @param roomId The room the picture was taken. - * @param timestamp The timestamp the picture was taken. - */ + public UserPurchasePictureEvent(Habbo habbo, String url, int roomId, int timestamp) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserRegisteredEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserRegisteredEvent.java index 32bd4dc6..bf7a7d6f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserRegisteredEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserRegisteredEvent.java @@ -4,10 +4,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserRegisteredEvent extends UserEvent { - /** - * This event is called whenever a user logs in for the first time to the hotel. - * @param habbo The Habbo this event applies to. - */ + public UserRegisteredEvent(Habbo habbo) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserRightsGivenEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserRightsGivenEvent.java index 5e8a1a46..09af0ea3 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserRightsGivenEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserRightsGivenEvent.java @@ -5,10 +5,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserRightsGivenEvent extends UserEvent { public final Habbo receiver; - /** - * @param habbo The Habbo this event applies to. - * @param receiver The Habbo that received rights. - */ + public UserRightsGivenEvent(Habbo habbo, Habbo receiver) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserRightsTakenEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserRightsTakenEvent.java index bada4255..366c5cb5 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserRightsTakenEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserRightsTakenEvent.java @@ -7,11 +7,7 @@ public class UserRightsTakenEvent extends UserEvent public final int victimId; public final Habbo victim; - /** - * @param habbo The Habbo this event applies to. - * @param victimId The userid. - * @param victim The Habbo whose rights got taken. Not null when the victim is in the room. - */ + public UserRightsTakenEvent(Habbo habbo, int victimId, Habbo victim) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserRolledEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserRolledEvent.java index f727341c..3f76d293 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserRolledEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserRolledEvent.java @@ -6,22 +6,13 @@ import com.eu.habbo.habbohotel.users.HabboItem; public class UserRolledEvent extends UserEvent { - /** - * The roller the RoomUnit has been rolled by. - */ + public final HabboItem roller; - /** - * The new location of the RoomUnit. - */ + public final RoomTile location; - /** - * Called upon any roomunit being rolled on a roller. - * @param habbo The Habbo this event applies to. - * @param roller The roller the Habbo has been rolled by. - * @param location The new location of the Habbo. - */ + public UserRolledEvent(Habbo habbo, HabboItem roller, RoomTile location) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedLookEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedLookEvent.java index 059468cd..06df3b68 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedLookEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedLookEvent.java @@ -8,13 +8,7 @@ public class UserSavedLookEvent extends UserEvent public HabboGender gender; public String newLook; - /** - * Triggered whenever a Habbo saved its look. - * newLook can be altered to override the look it saves to. - * @param habbo The Habbo this event applies to. - * @param gender The gender of this look. - * @param newLook The new look. - */ + public UserSavedLookEvent(Habbo habbo, HabboGender gender, String newLook) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedMottoEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedMottoEvent.java index 92a272b4..4523f573 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedMottoEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedMottoEvent.java @@ -7,11 +7,7 @@ public class UserSavedMottoEvent extends UserEvent public final String oldMotto; public String newMotto; - /** - * @param habbo The Habbo this event applies to. - * @param oldMotto The oldmotto. - * @param newMotto The new motto. - */ + public UserSavedMottoEvent(Habbo habbo, String oldMotto, String newMotto) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedSettingsEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedSettingsEvent.java index 724cb74f..f5532335 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedSettingsEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedSettingsEvent.java @@ -4,14 +4,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserSavedSettingsEvent extends UserEvent { - /** - * Fired when a user changes it settings regarding: - * - Volumes - * - Camera following - * - Ignoring room invites - * - Chat mode. - * @param habbo The Habbo this event applies to. - */ + public UserSavedSettingsEvent(Habbo habbo) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedWardrobeEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedWardrobeEvent.java index 623310f8..5411f929 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserSavedWardrobeEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserSavedWardrobeEvent.java @@ -7,10 +7,7 @@ public class UserSavedWardrobeEvent extends UserEvent { public final WardrobeComponent.WardrobeItem wardrobeItem; - /** - * @param habbo The Habbo this event applies to. - * @param wardrobeItem The wardrobe item this look is saved to. - */ + public UserSavedWardrobeEvent(Habbo habbo, WardrobeComponent.WardrobeItem wardrobeItem) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserTakeStepEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserTakeStepEvent.java index 417ed22b..d2a261c1 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserTakeStepEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserTakeStepEvent.java @@ -5,22 +5,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserTakeStepEvent extends UserEvent { - /** - * The old location of the Habbo. - */ + public final RoomTile fromLocation; - /** - * The new location of the Habbo. - */ + public final RoomTile toLocation; - /** - * This event is triggered each time an Habbo walks to the next square. - * @param habbo The Habbo this event applies to. - * @param fromLocation The old location of the Habbo. - * @param toLocation The new location of the Habbo. - */ + public UserTakeStepEvent(Habbo habbo, RoomTile fromLocation, RoomTile toLocation) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserTalkEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserTalkEvent.java index 6d707f58..335f44fc 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserTalkEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserTalkEvent.java @@ -8,11 +8,7 @@ public class UserTalkEvent extends UserEvent { public final RoomChatMessage chatMessage; public final RoomChatType chatType; - /** - * @param habbo The Habbo this event applies to. - * @param chatMessage - * @param chatType - */ + public UserTalkEvent(Habbo habbo, RoomChatMessage chatMessage, RoomChatType chatType) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserTriggerWordFilterEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/UserTriggerWordFilterEvent.java index fe332619..e767d0a1 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserTriggerWordFilterEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserTriggerWordFilterEvent.java @@ -5,15 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserTriggerWordFilterEvent extends UserEvent { - /** - * The word that triggered the filter. - */ + public final WordFilterWord word; - /** - * @param habbo The Habbo this event applies to. - * @param word The word that triggered the filter. - */ + public UserTriggerWordFilterEvent(Habbo habbo, WordFilterWord word) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/UserWiredRewardReceived.java b/src/main/java/com/eu/habbo/plugin/events/users/UserWiredRewardReceived.java index 458a93c0..6987d874 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/UserWiredRewardReceived.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/UserWiredRewardReceived.java @@ -5,30 +5,16 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserWiredRewardReceived extends UserEvent { - /** - * The wired effect that gave the reward. - */ + public final WiredEffectGiveReward wiredEffectGiveReward; - /** - * Type of reward being given. - */ + public final String type; - /** - * Reward being given. - */ + public String value; - /** - * Triggered whenever a Habbo succesfully receives a reward. - * Change value to set the new reward. - * Cancel the event to prevent the reward from being given. - * @param habbo The Habbo this event applies to. - * @param wiredEffectGiveReward The wired effect that gave the reward. - * @param type Type of reward being given. - * @param value Reward being given. - */ + public UserWiredRewardReceived(Habbo habbo, WiredEffectGiveReward wiredEffectGiveReward, String type, String value) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementEvent.java index 6af7faaa..6c1ea72f 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementEvent.java @@ -6,15 +6,10 @@ import com.eu.habbo.plugin.events.users.UserEvent; public abstract class UserAchievementEvent extends UserEvent { - /** - * The Achievement this event applies to. - */ + public final Achievement achievement; - /** - * @param habbo The Habbo this event applies to. - * @param achievement The Achievement this event applies to. - */ + public UserAchievementEvent(Habbo habbo, Achievement achievement) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementLeveledEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementLeveledEvent.java index cda9d261..739133f3 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementLeveledEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementLeveledEvent.java @@ -6,22 +6,13 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserAchievementLeveledEvent extends UserAchievementEvent { - /** - * The previous level of the Achievement. - */ + public final AchievementLevel oldLevel; - /** - * The new level of the Achievement. - */ + public final AchievementLevel newLevel; - /** - * @param habbo The Habbo this event applies to. - * @param achievement The Achievement this event applies to. - * @param oldLevel The previous level of the Achievement. - * @param newLevel The new level of the Achievement. - */ + public UserAchievementLeveledEvent(Habbo habbo, Achievement achievement, AchievementLevel oldLevel, AchievementLevel newLevel) { super(habbo, achievement); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementProgressEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementProgressEvent.java index 1827f9c3..071a92f3 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementProgressEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/achievements/UserAchievementProgressEvent.java @@ -5,16 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserAchievementProgressEvent extends UserAchievementEvent { - /** - * The amount of progress that has been gained. - */ + public final int progressed; - /** - * @param habbo The Habbo this event applies to. - * @param achievement The Achievement this event applies to. - * @param progressed The amount of progress that has been gained. - */ + public UserAchievementProgressEvent(Habbo habbo, Achievement achievement, int progressed) { super(habbo, achievement); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogEvent.java index 3c2c4855..b5c5dc8e 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogEvent.java @@ -6,15 +6,10 @@ import com.eu.habbo.plugin.events.users.UserEvent; public class UserCatalogEvent extends UserEvent { - /** - * The CatalogItem this event applies to. - */ + public CatalogItem catalogItem; - /** - * @param habbo The Habbo this event applies to. - * @param catalogItem The CatalogItem this event applies to. - */ + public UserCatalogEvent(Habbo habbo, CatalogItem catalogItem) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogFurnitureBoughtEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogFurnitureBoughtEvent.java index 8d5428ed..8d97130e 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogFurnitureBoughtEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogFurnitureBoughtEvent.java @@ -8,18 +8,10 @@ import gnu.trove.set.hash.THashSet; public class UserCatalogFurnitureBoughtEvent extends UserCatalogEvent { - /** - * List of items bought. - */ + public final THashSet furniture; - /** - * This event is triggered whenever someone buys a furniture. - * Cancelling this event will not prevent the furniture from being bought. - * @param habbo The Habbo this event applies to. - * @param catalogItem The CatalogItem this event applies to. - * @param furniture The furniture this event applies to. - */ + public UserCatalogFurnitureBoughtEvent( Habbo habbo, CatalogItem catalogItem ,THashSet furniture) { super(habbo, catalogItem); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogItemPurchasedEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogItemPurchasedEvent.java index ab49d508..dc004078 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogItemPurchasedEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/catalog/UserCatalogItemPurchasedEvent.java @@ -9,34 +9,19 @@ import java.util.List; public class UserCatalogItemPurchasedEvent extends UserCatalogEvent { - /** - * The items that will be purchased. - * Modify the list to add more furniture. - */ + public final THashSet itemsList; - /** - * Total amount of credits. - */ + public int totalCredits; - /** - * Total amount of points. - */ + public int totalPoints; - /** - * Badges - */ + public List badges; - /** - * @param habbo The Habbo this event applies to. - * @param catalogItem The CatalogItem this event applies to. - * @param itemsList The items that will be purchased. Modify the list to add more furniture. - * @param totalCredits Total amount of credits. - * @param totalPoints Total amount of points. - */ + public UserCatalogItemPurchasedEvent(Habbo habbo, CatalogItem catalogItem, THashSet itemsList, int totalCredits, int totalPoints, List badges) { super(habbo, catalogItem); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserAcceptFriendRequestEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserAcceptFriendRequestEvent.java index 241fda14..893aad9e 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserAcceptFriendRequestEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserAcceptFriendRequestEvent.java @@ -5,11 +5,7 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserAcceptFriendRequestEvent extends UserFriendEvent { - /** - * Triggered when a Habbo accepts a new friend. - * @param habbo The Habbo this event applies to. - * @param friend The friend this event applies to. - */ + public UserAcceptFriendRequestEvent(Habbo habbo, MessengerBuddy friend) { super(habbo, friend); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendChatEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendChatEvent.java index 4db0f75c..168586eb 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendChatEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendChatEvent.java @@ -5,17 +5,10 @@ import com.eu.habbo.habbohotel.users.Habbo; public class UserFriendChatEvent extends UserFriendEvent { - /** - * The message send. - */ + public String message; - /** - * Triggered whenever a Habbo sends an IM message. - * @param habbo The Habbo this event applies to. - * @param friend The friend this event applies to. - * @param message The message being send. - */ + public UserFriendChatEvent(Habbo habbo, MessengerBuddy friend, String message) { super(habbo, friend); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendEvent.java index 3f539667..ab5b2138 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserFriendEvent.java @@ -8,10 +8,7 @@ public abstract class UserFriendEvent extends UserEvent { public final MessengerBuddy friend; - /** - * @param habbo The Habbo this event applies to. - * @param friend The friend this event applies to. - */ + public UserFriendEvent(Habbo habbo, MessengerBuddy friend) { super(habbo); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRelationShipEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRelationShipEvent.java index a34bc41f..8cec4d97 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRelationShipEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRelationShipEvent.java @@ -7,10 +7,7 @@ public class UserRelationShipEvent extends UserFriendEvent { public int relationShip; - /** - * @param habbo The Habbo this event applies to. - * @param friend The friend this event applies to. - */ + public UserRelationShipEvent(Habbo habbo, MessengerBuddy friend, int relationShip) { super(habbo, friend); diff --git a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRequestFriendshipEvent.java b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRequestFriendshipEvent.java index e1425e96..17dcfb91 100644 --- a/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRequestFriendshipEvent.java +++ b/src/main/java/com/eu/habbo/plugin/events/users/friends/UserRequestFriendshipEvent.java @@ -5,22 +5,13 @@ import com.eu.habbo.plugin.events.users.UserEvent; public class UserRequestFriendshipEvent extends UserEvent { - /** - * The Habbo name invited. - */ + public final String name; - /** - * The Habbo invited. - */ + public final Habbo friend; - /** - * Triggered when a Habbo requests friendship with another user. - * @param habbo The Habbo this event applies to. - * @param name The Habbo name invited. - * @param friend The Habbo invited. NULL when user is offline. - */ + public UserRequestFriendshipEvent(Habbo habbo, String name, Habbo friend) { super(habbo);