From 717c7f313b93f6b07c17457ef51b6d9c7ad2ca04 Mon Sep 17 00:00:00 2001 From: Harmonic Date: Thu, 21 Apr 2022 15:13:51 -0700 Subject: [PATCH] Fixed issues with merging remaining 3.5 features into 4.0 branch --- .../habbohotel/achievements/AchievementManager.java | 2 +- src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 4 ++-- .../incoming/guilds/GuildAcceptMembershipEvent.java | 10 +++++----- .../incoming/guilds/GuildDeclineMembershipEvent.java | 4 ++-- .../incoming/guilds/GuildRemoveAdminEvent.java | 4 ++-- .../incoming/guilds/GuildRemoveMemberEvent.java | 4 ++-- .../messages/incoming/guilds/RequestGuildBuyEvent.java | 4 ++-- .../incoming/guilds/RequestGuildInfoEvent.java | 4 ++-- .../incoming/guilds/RequestGuildJoinEvent.java | 4 ++-- .../guilds/forums/GuildForumThreadsMessagesEvent.java | 5 +++-- .../incoming/inventory/RequestInventoryItemsEvent.java | 2 +- ...oser.java => HabboGroupDetailsMessageComposer.java} | 6 +++--- .../outgoing/unknown/IgnoredUsersMessageComposer.java | 1 - .../com/eu/habbo/messages/rcon/ChangeUsername.java | 6 ++---- .../habbo/threading/runnables/RemoveFloorItemTask.java | 2 +- 15 files changed, 30 insertions(+), 32 deletions(-) rename src/main/java/com/eu/habbo/messages/outgoing/guilds/{GuildInfoComposer.java => HabboGroupDetailsMessageComposer.java} (91%) 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 693c7bd0..96a2f806 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java @@ -367,7 +367,7 @@ public class AchievementManager { HabboBadge b = new HabboBadge(0, badge, 0, habbo); Emulator.getThreading().run(b); habbo.getInventory().getBadgesComponent().addBadge(b); - habbo.getClient().sendResponse(new AddUserBadgeComposer(b)); + habbo.getClient().sendResponse(new BadgeReceivedComposer(b)); } } } 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 5c1517be..88e54a76 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -38,7 +38,7 @@ import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.outgoing.MessageComposer; import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer; import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer; import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer; @@ -4285,7 +4285,7 @@ public class Room implements Comparable, ISerialize, Runnable { if (!member.isPresent()) continue; - habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, member.get())); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, member.get())); } } diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildAcceptMembershipEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildAcceptMembershipEvent.java index 385b2a65..9efaa3e1 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildAcceptMembershipEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildAcceptMembershipEvent.java @@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.outgoing.guilds.GuildMemberMgmtFailedMessageComposer; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer; import com.eu.habbo.plugin.events.guilds.GuildAcceptedMembershipEvent; @@ -27,13 +27,13 @@ public class GuildAcceptMembershipEvent extends MessageHandler { if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || groupMember.getRank().equals(GuildRank.ADMIN) || groupMember.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) { if (habbo.getHabboStats().hasGuild(guild.getId())) { if (habbo != null) { - this.client.sendResponse(new GuildAcceptMemberErrorComposer(guild.getId(), GuildAcceptMemberErrorComposer.ALREADY_ACCEPTED)); + this.client.sendResponse(new GuildMemberMgmtFailedMessageComposer(guild.getId(), GuildMemberMgmtFailedMessageComposer.ALREADY_ACCEPTED)); return; } else { //Check the user has requested GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, habbo); if (member == null || member.getRank().type != GuildRank.REQUESTED.type) { - this.client.sendResponse(new GuildAcceptMemberErrorComposer(guild.getId(), GuildAcceptMemberErrorComposer.NO_LONGER_MEMBER)); + this.client.sendResponse(new GuildMemberMgmtFailedMessageComposer(guild.getId(), GuildMemberMgmtFailedMessageComposer.NO_LONGER_MEMBER)); return; } else { GuildAcceptedMembershipEvent event = new GuildAcceptedMembershipEvent(guild, userId, habbo); @@ -43,11 +43,11 @@ public class GuildAcceptMembershipEvent extends MessageHandler { Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, habbo.getHabboInfo().getId(), true); guild.decreaseRequestCount(); guild.increaseMemberCount(); - this.client.sendResponse(new GuildRefreshMembersListComposer(guild)); + this.client.sendResponse(new GuildMembershipRejectedMessageComposer(guild)); Room room = habbo.getHabboInfo().getCurrentRoom(); if (room != null) { if (room.getGuildId() == guildId) { - habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId))); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId))); room.refreshRightsForHabbo(habbo); } } diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildDeclineMembershipEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildDeclineMembershipEvent.java index a61bd67c..17e40c0c 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildDeclineMembershipEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildDeclineMembershipEvent.java @@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.permissions.Permission; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.messages.incoming.MessageHandler; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildMembersComposer; import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer; import com.eu.habbo.plugin.events.guilds.GuildDeclinedMembershipEvent; @@ -36,7 +36,7 @@ public class GuildDeclineMembershipEvent extends MessageHandler { Room room = habbo.getHabboInfo().getCurrentRoom(); if (room != null) { if (room.getGuildId() == guildId) { - habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null)); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null)); } } } diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveAdminEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveAdminEvent.java index 5231df12..43b8bbb0 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveAdminEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveAdminEvent.java @@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.permissions.Permission; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.messages.incoming.MessageHandler; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildMembershipUpdatedMessageComposer; import com.eu.habbo.plugin.events.guilds.GuildRemovedAdminEvent; @@ -34,7 +34,7 @@ public class GuildRemoveAdminEvent extends MessageHandler { Emulator.getGameEnvironment().getGuildManager().removeAdmin(guild, userId); if (habbo != null) { - habbo.getClient().sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId))); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId))); if (room != null && habbo.getHabboInfo().getCurrentRoom() != null && habbo.getHabboInfo().getCurrentRoom() == room) room.refreshRightsForHabbo(habbo); } diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveMemberEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveMemberEvent.java index 1153ef26..6978bea6 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveMemberEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveMemberEvent.java @@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.outgoing.guilds.FavoriteMembershipUpdateMessageComposer; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer; import com.eu.habbo.plugin.events.guilds.GuildRemovedMemberEvent; @@ -52,7 +52,7 @@ public class GuildRemoveMemberEvent extends MessageHandler { room.refreshRightsForHabbo(habbo); } - habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null)); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null)); } if (room != null) { diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildBuyEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildBuyEvent.java index f79a6b9f..055f15ef 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildBuyEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildBuyEvent.java @@ -11,7 +11,7 @@ import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer; import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildCreatedMessageComposer; import com.eu.habbo.messages.outgoing.guilds.GuildEditFailedMessageComposer; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.plugin.events.guilds.GuildPurchasedEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -99,7 +99,7 @@ public class RequestGuildBuyEvent extends MessageHandler { this.client.sendResponse(new PurchaseOKMessageComposer()); this.client.sendResponse(new GuildCreatedMessageComposer(guild)); for (Habbo habbo : r.getHabbos()) { - habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null)); + habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null)); } r.refreshGuild(guild); diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildInfoEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildInfoEvent.java index d3a06928..f680227f 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildInfoEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildInfoEvent.java @@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.guilds; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.guilds.Guild; import com.eu.habbo.messages.incoming.MessageHandler; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; public class RequestGuildInfoEvent extends MessageHandler { @Override @@ -14,7 +14,7 @@ public class RequestGuildInfoEvent extends MessageHandler { Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId); if (guild != null) { - this.client.sendResponse(new GuildInfoComposer(guild, this.client, newWindow, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo()))); + this.client.sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, newWindow, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo()))); } } } diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildJoinEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildJoinEvent.java index 532be037..a2a6f1b8 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildJoinEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/RequestGuildJoinEvent.java @@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.guilds.Guild; import com.eu.habbo.habbohotel.guilds.GuildState; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.messages.incoming.MessageHandler; -import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer; +import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer; import com.eu.habbo.messages.outgoing.guilds.HabboGroupJoinFailedMessageComposer; public class RequestGuildJoinEvent extends MessageHandler { @@ -27,7 +27,7 @@ public class RequestGuildJoinEvent extends MessageHandler { } Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, 0, false); - this.client.sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo()))); + this.client.sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo()))); Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/forums/GuildForumThreadsMessagesEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/forums/GuildForumThreadsMessagesEvent.java index 3da3ff79..dc5369b2 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/forums/GuildForumThreadsMessagesEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/forums/GuildForumThreadsMessagesEvent.java @@ -9,6 +9,7 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThread; import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState; import com.eu.habbo.habbohotel.permissions.Permission; import com.eu.habbo.messages.incoming.MessageHandler; +import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys; import com.eu.habbo.messages.outgoing.guilds.forums.ThreadMessagesMessageComposer; import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer; import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer; @@ -37,8 +38,8 @@ public class GuildForumThreadsMessagesEvent extends MessageHandler { if (thread.getState() != ForumThreadState.HIDDEN_BY_GUILD_ADMIN || hasStaffPermissions || isGuildAdministrator) { - this.client.sendResponse(new GuildForumCommentsComposer(guildId, threadId, index, thread.getComments(limit, index))); - this.client.sendResponse(new ThreadMessagesMessageComposer(guild, this.client.getHabbo())); + this.client.sendResponse(new ThreadMessagesMessageComposer(guildId, threadId, index, thread.getComments(limit, index))); + this.client.sendResponse(new ForumDataMessageComposer(guild, this.client.getHabbo())); } else { this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_ACCESS_DENIED.key).compose()); diff --git a/src/main/java/com/eu/habbo/messages/incoming/inventory/RequestInventoryItemsEvent.java b/src/main/java/com/eu/habbo/messages/incoming/inventory/RequestInventoryItemsEvent.java index 507c668d..632374bd 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/inventory/RequestInventoryItemsEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/inventory/RequestInventoryItemsEvent.java @@ -19,7 +19,7 @@ public class RequestInventoryItemsEvent extends MessageHandler { int totalItems = this.client.getHabbo().getInventory().getItemsComponent().getItems().size(); if (totalItems == 0) { - this.client.sendResponse(new InventoryItemsComposer(0, 1, new TIntObjectHashMap<>())); + this.client.sendResponse(new FurniListComposer(0, 1, new TIntObjectHashMap<>())); return; } diff --git a/src/main/java/com/eu/habbo/messages/outgoing/guilds/GuildInfoComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/guilds/HabboGroupDetailsMessageComposer.java similarity index 91% rename from src/main/java/com/eu/habbo/messages/outgoing/guilds/GuildInfoComposer.java rename to src/main/java/com/eu/habbo/messages/outgoing/guilds/HabboGroupDetailsMessageComposer.java index dab0c0e7..45cf9cb4 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/guilds/GuildInfoComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/guilds/HabboGroupDetailsMessageComposer.java @@ -14,13 +14,13 @@ import com.eu.habbo.messages.outgoing.Outgoing; import java.text.SimpleDateFormat; import java.util.Date; -public class GuildInfoComposer extends MessageComposer { +public class HabboGroupDetailsMessageComposer extends MessageComposer { private final Guild guild; private final GameClient client; private final boolean newWindow; private final GuildMember member; - public GuildInfoComposer(Guild guild, GameClient client, boolean newWindow, GuildMember member) { + public HabboGroupDetailsMessageComposer(Guild guild, GameClient client, boolean newWindow, GuildMember member) { this.guild = guild; this.client = client; this.newWindow = newWindow; @@ -30,7 +30,7 @@ public class GuildInfoComposer extends MessageComposer { @Override protected ServerMessage composeInternal() { boolean adminPermissions = this.client.getHabbo().getHabboStats().hasGuild(this.guild.getId()) && this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN) || Emulator.getGameEnvironment().getGuildManager().getOnlyAdmins(guild).get(this.client.getHabbo().getHabboInfo().getId()) != null; - this.response.init(Outgoing.GuildInfoComposer); + this.response.init(Outgoing.HabboGroupDetailsMessageComposer); this.response.appendInt(this.guild.getId()); this.response.appendBoolean(true); this.response.appendInt(this.guild.getState().state); diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersMessageComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersMessageComposer.java index 97668992..9b4f4c53 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersMessageComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersMessageComposer.java @@ -16,7 +16,6 @@ public class IgnoredUsersMessageComposer extends MessageComposer { @Override protected ServerMessage composeInternal() { - } this.response.init(Outgoing.IgnoredUsersMessageComposer); this.response.appendInt(0); return this.response; diff --git a/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java b/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java index e7cb6c69..848d6d25 100644 --- a/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java +++ b/src/main/java/com/eu/habbo/messages/rcon/ChangeUsername.java @@ -2,9 +2,7 @@ package com.eu.habbo.messages.rcon; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.users.Habbo; -import com.eu.habbo.habbohotel.users.HabboInfo; -import com.eu.habbo.habbohotel.users.subscriptions.Subscription; -import com.eu.habbo.messages.outgoing.users.UserDataComposer; +import com.eu.habbo.messages.outgoing.users.UserObjectComposer; import com.google.gson.Gson; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,7 +35,7 @@ public class ChangeUsername extends RCONMessage { habbo.alert(Emulator.getTexts().getValue("rcon.alert.user.change_username")); habbo.getHabboStats().allowNameChange = json.canChange; - habbo.getClient().sendResponse(new UserDataComposer(habbo)); + habbo.getClient().sendResponse(new UserObjectComposer(habbo)); } else { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) { try (PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET allow_name_change = ? WHERE user_id = ? LIMIT 1")) { diff --git a/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java b/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java index 4c21fb64..15d72f9e 100644 --- a/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java +++ b/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java @@ -24,6 +24,6 @@ class RemoveFloorItemTask implements Runnable { this.room.removeHabboItem(this.item); this.room.updateTile(tile); this.room.sendComposer(new RemoveFloorItemComposer(this.item, true).compose()); - this.room.sendComposer(new HeightMapUpdateMessageComposer(this.item.getX(), this.item.getY(), tile.relativeHeight()).compose()); + this.room.sendComposer(new HeightMapUpdateMessageComposer(this.item.getX(), this.item.getY(), tile.z, tile.relativeHeight()).compose()); } }