mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 15:36:27 +01:00
Modify HabboAddedToRoomEvent
This commit is contained in:
parent
ef5e3a7c32
commit
47e9d1a64b
@ -713,21 +713,23 @@ public class RoomManager {
|
||||
if (!room.getCurrentHabbos().isEmpty()) {
|
||||
|
||||
Collection<Habbo> habbosToSendEnter = room.getCurrentHabbos().values();
|
||||
Collection<Habbo> visibleHabbos = room.getHabbos();
|
||||
|
||||
if (Emulator.getPluginManager().isRegistered(HabboAddedToRoomEvent.class, false)) {
|
||||
HabboAddedToRoomEvent event = Emulator.getPluginManager().fireEvent(new HabboAddedToRoomEvent(habbo, room, habbosToSendEnter));
|
||||
HabboAddedToRoomEvent event = Emulator.getPluginManager().fireEvent(new HabboAddedToRoomEvent(habbo, room, habbosToSendEnter, visibleHabbos));
|
||||
habbosToSendEnter = event.habbosToSendEnter;
|
||||
visibleHabbos = event.visibleHabbos;
|
||||
}
|
||||
|
||||
for (Habbo habboToSendEnter : habbosToSendEnter) {
|
||||
GameClient client = habboToSendEnter.getClient();
|
||||
if (client != null) {
|
||||
client.sendResponse(new RoomUsersComposer(habbo).compose());
|
||||
habboToSendEnter.getClient().sendResponse(new RoomUserStatusComposer(habbo.getRoomUnit()).compose());
|
||||
client.sendResponse(new RoomUserStatusComposer(habbo.getRoomUnit()).compose());
|
||||
}
|
||||
}
|
||||
|
||||
for (Habbo h : room.getHabbos()) {
|
||||
for (Habbo h : visibleHabbos) {
|
||||
if (!h.getRoomUnit().isInvisible()) {
|
||||
habbos.add(h);
|
||||
}
|
||||
|
@ -9,12 +9,13 @@ public class HabboAddedToRoomEvent extends UserEvent {
|
||||
|
||||
public final Room room;
|
||||
public Collection<Habbo> habbosToSendEnter;
|
||||
public Collection<Habbo> visibleHabbos;
|
||||
|
||||
|
||||
public HabboAddedToRoomEvent(Habbo habbo, Room room, Collection<Habbo> habbosToSendEnter) {
|
||||
public HabboAddedToRoomEvent(Habbo habbo, Room room, Collection<Habbo> habbosToSendEnter, Collection<Habbo> visibleHabbos) {
|
||||
super(habbo);
|
||||
|
||||
this.room = room;
|
||||
this.habbosToSendEnter = habbosToSendEnter;
|
||||
this.visibleHabbos = visibleHabbos;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user