mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30: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 != null) {
|
||||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
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);
|
GuildChangedSettingsEvent settingsEvent = new GuildChangedSettingsEvent(guild, this.packet.readInt(), this.packet.readInt() == 0);
|
||||||
Emulator.getPluginManager().fireEvent(settingsEvent);
|
Emulator.getPluginManager().fireEvent(settingsEvent);
|
||||||
|
|
||||||
@ -31,7 +26,10 @@ public class GuildChangeSettingsEvent extends MessageHandler {
|
|||||||
guild.setState(GuildState.valueOf(settingsEvent.state));
|
guild.setState(GuildState.valueOf(settingsEvent.state));
|
||||||
guild.setRights(settingsEvent.rights);
|
guild.setRights(settingsEvent.rights);
|
||||||
|
|
||||||
room.refreshGuild(guild);
|
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||||
|
if(room != null) {
|
||||||
|
room.refreshGuild(guild);
|
||||||
|
}
|
||||||
|
|
||||||
guild.needsUpdate = true;
|
guild.needsUpdate = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user