Prevent deletion of homeroom

This commit is contained in:
Alejandro 2020-06-07 15:25:40 +03:00
parent 21c87145ea
commit 828d5110b0

View File

@ -24,6 +24,10 @@ public class RequestDeleteRoomEvent extends MessageHandler {
if (room != null) { if (room != null) {
if (room.isOwner(this.client.getHabbo())) { if (room.isOwner(this.client.getHabbo())) {
if (room.getId() == this.client.getHabbo().getHabboInfo().getHomeRoom()) {
return;
}
if (Emulator.getPluginManager().fireEvent(new NavigatorRoomDeletedEvent(this.client.getHabbo(), room)).isCancelled()) { if (Emulator.getPluginManager().fireEvent(new NavigatorRoomDeletedEvent(this.client.getHabbo(), room)).isCancelled()) {
return; return;
} }