mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix NPE "member" is nullable here.
This commit is contained in:
parent
9fbcebeaad
commit
8e9cea8f83
@ -17,17 +17,17 @@ public class GetMemberGuildItemCountEvent extends MessageHandler {
|
|||||||
|
|
||||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||||
|
|
||||||
if (guild != null) {
|
if (guild == null) return;
|
||||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo());
|
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo());
|
||||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || (member != null && member.getRank().equals(GuildRank.OWNER) || member.getRank().equals(GuildRank.ADMIN)) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || (member != null && (member.getRank().equals(GuildRank.OWNER) || member.getRank().equals(GuildRank.ADMIN))) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||||
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(guild.getRoomId());
|
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(guild.getRoomId());
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
count = room.getUserFurniCount(userId);
|
count = room.getUserFurniCount(userId);
|
||||||
}
|
|
||||||
this.client.sendResponse(new GuildMemberFurniCountInHQMessageComposer(userId, count));
|
|
||||||
}
|
}
|
||||||
|
this.client.sendResponse(new GuildMemberFurniCountInHQMessageComposer(userId, count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user