mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fix guild admin removing
This commit is contained in:
parent
1c387eff51
commit
79b02b80a6
@ -22,19 +22,20 @@ public class GuildRemoveAdminEvent extends MessageHandler {
|
|||||||
int userId = this.packet.readInt();
|
int userId = this.packet.readInt();
|
||||||
|
|
||||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||||
Emulator.getGameEnvironment().getGuildManager().removeAdmin(guild, userId);
|
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
|
||||||
|
|
||||||
Habbo habbo = room.getHabbo(userId);
|
|
||||||
GuildRemovedAdminEvent removedAdminEvent = new GuildRemovedAdminEvent(guild, userId, habbo);
|
GuildRemovedAdminEvent removedAdminEvent = new GuildRemovedAdminEvent(guild, userId, habbo);
|
||||||
Emulator.getPluginManager().fireEvent(removedAdminEvent);
|
Emulator.getPluginManager().fireEvent(removedAdminEvent);
|
||||||
|
|
||||||
if (removedAdminEvent.isCancelled())
|
if (removedAdminEvent.isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Emulator.getGameEnvironment().getGuildManager().removeAdmin(guild, userId);
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId)));
|
habbo.getClient().sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId)));
|
||||||
|
|
||||||
room.refreshRightsForHabbo(habbo);
|
if (room != null && habbo.getHabboInfo().getCurrentRoom() != null && habbo.getHabboInfo().getCurrentRoom() == room) room.refreshRightsForHabbo(habbo);
|
||||||
}
|
}
|
||||||
GuildMember guildMember = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId);
|
GuildMember guildMember = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user