diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/BanCommand.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/BanCommand.java index 52eb12e..c95a5b9 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/BanCommand.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/BanCommand.java @@ -39,7 +39,7 @@ public class BanCommand extends Command { return true; } - if (params[1].toLowerCase().equals(gameClient.getHabbo().getHabboInfo().getUsername().toLowerCase())) { + if (params[1].equalsIgnoreCase(gameClient.getHabbo().getHabboInfo().getUsername())) { gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_ban.ban_self"), RoomChatMessageBubbles.ALERT); return true; } diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java index 42e32d5..2f9cbde 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java @@ -39,7 +39,7 @@ public class CommandHandler { public CommandHandler() { long millis = System.currentTimeMillis(); this.reloadCommands(); - LOGGER.info("Command Handler -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)"); + LOGGER.info("Command Handler -> Loaded! ({} MS)", System.currentTimeMillis() - millis); } public static void addCommand(Command command) { @@ -71,7 +71,7 @@ public class CommandHandler { if (parts.length >= 1) { for (Command command : commands.values()) { for (String s : command.keys) { - if (s.toLowerCase().equals(parts[0].toLowerCase())) { + if (s.equalsIgnoreCase(parts[0])) { boolean succes = false; if (command.permission == null || gameClient.getHabbo().hasPermission(command.permission, gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) || gameClient.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) || (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboInfo().getCurrentRoom().getGuildId() > 0 && gameClient.getHabbo().getHabboInfo().getCurrentRoom().getGuildRightLevel(gameClient.getHabbo()).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS)))) { try { diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CoordsCommand.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CoordsCommand.java index 405dbfd..4ff4b29 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CoordsCommand.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CoordsCommand.java @@ -30,7 +30,7 @@ public class CoordsCommand extends Command { "Tile stack height: " + gameClient.getHabbo().getHabboInfo().getCurrentRoom().getLayout().getTile(gameClient.getHabbo().getRoomUnit().getX(), gameClient.getHabbo().getRoomUnit().getY()).getStackHeight()); } else { - RoomTile tile = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getLayout().getTile(Short.valueOf(params[1]), Short.valueOf(params[2])); + RoomTile tile = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getLayout().getTile(Short.parseShort(params[1]), Short.parseShort(params[2])); if (tile != null) { gameClient.getHabbo().alert(Emulator.getTexts().getValue("commands.generic.cmd_coords.title") + "\r\n" + diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DisconnectCommand.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DisconnectCommand.java index 867e7a9..82dd200 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DisconnectCommand.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DisconnectCommand.java @@ -17,7 +17,7 @@ public class DisconnectCommand extends Command { return true; } - if (params[1].toLowerCase().equals(gameClient.getHabbo().getHabboInfo().getUsername().toLowerCase())) { + if (params[1].equalsIgnoreCase(gameClient.getHabbo().getHabboInfo().getUsername())) { gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_disconnect.disconnect_self"), RoomChatMessageBubbles.ALERT); return true; } diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java index 2965e14..60312ff 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/items/ItemManager.java @@ -770,7 +770,7 @@ public class ItemManager { for (int i = this.items.size(); i-- > 0; ) { try { item.advance(); - if (item.value().getName().toLowerCase().equals(itemName.toLowerCase())) { + if (item.value().getName().equalsIgnoreCase(itemName)) { return item.value(); } } catch (NoSuchElementException e) { @@ -781,6 +781,7 @@ public class ItemManager { return null; } + public YoutubeManager getYoutubeManager() { return this.youtubeManager; } diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java index d6ee08f..2ddc181 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java @@ -1126,7 +1126,7 @@ public class RoomManager { for (Room room : this.activeRooms.values()) { for (String s : room.getTags().split(";")) { - if (s.toLowerCase().equals(tag.toLowerCase())) { + if (s.equalsIgnoreCase(tag)) { rooms.add(room); break; } @@ -1138,6 +1138,7 @@ public class RoomManager { return rooms; } + public ArrayList getGroupRoomsWithName(String name) { ArrayList rooms = new ArrayList<>(); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java index 31f98ca..afa8c1e 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java @@ -107,7 +107,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers { serverMessage.appendInt(this.getRotation()); serverMessage.appendString(Double.toString(this.z)); - serverMessage.appendString((this.getBaseItem().getInteractionType().getType() == InteractionTrophy.class || this.getBaseItem().getInteractionType().getType() == InteractionCrackable.class || this.getBaseItem().getName().toLowerCase().equals("gnome_box")) ? "1.0" : ((this.getBaseItem().allowWalk() || this.getBaseItem().allowSit() && this.roomId != 0) ? Item.getCurrentHeight(this) + "" : "")); + serverMessage.appendString((this.getBaseItem().getInteractionType().getType() == InteractionTrophy.class || this.getBaseItem().getInteractionType().getType() == InteractionCrackable.class || this.getBaseItem().getName().equalsIgnoreCase("gnome_box")) ? "1.0" : ((this.getBaseItem().allowWalk() || this.getBaseItem().allowSit() && this.roomId != 0) ? Item.getCurrentHeight(this) + "" : "")); //serverMessage.appendString( ? "1.0" : ((this.getBaseItem().allowWalk() || this.getBaseItem().allowSit() && this.roomId != 0) ? Item.getCurrentHeight(this) : "")); } catch (Exception e) { diff --git a/Emulator/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildChangeBadgeEvent.java b/Emulator/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildChangeBadgeEvent.java index 965202d..06e9d1b 100644 --- a/Emulator/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildChangeBadgeEvent.java +++ b/Emulator/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildChangeBadgeEvent.java @@ -42,7 +42,7 @@ public class GuildChangeBadgeEvent extends MessageHandler { base += 3; } - if (guild.getBadge().toLowerCase().equals(badge.toLowerCase())) + if (guild.getBadge().equalsIgnoreCase(badge)) return; GuildChangedBadgeEvent badgeEvent = new GuildChangedBadgeEvent(guild, badge);