mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Ability to change guild settings while not in a room
This commit is contained in:
parent
7cbc8cc162
commit
3ffee0aa4c
@ -17,11 +17,6 @@ public class GuildChangeSettingsEvent extends MessageHandler {
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||
|
||||
if (room == null)
|
||||
return;
|
||||
|
||||
GuildChangedSettingsEvent settingsEvent = new GuildChangedSettingsEvent(guild, this.packet.readInt(), this.packet.readInt() == 0);
|
||||
Emulator.getPluginManager().fireEvent(settingsEvent);
|
||||
|
||||
@ -31,7 +26,10 @@ public class GuildChangeSettingsEvent extends MessageHandler {
|
||||
guild.setState(GuildState.valueOf(settingsEvent.state));
|
||||
guild.setRights(settingsEvent.rights);
|
||||
|
||||
room.refreshGuild(guild);
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||
if(room != null) {
|
||||
room.refreshGuild(guild);
|
||||
}
|
||||
|
||||
guild.needsUpdate = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user