mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Check if the offline user exists
This commit is contained in:
parent
9dad818fda
commit
2a6e81ef05
@ -46,9 +46,21 @@ public class TakeBadgeCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int userId = 0;
|
||||||
|
|
||||||
|
if (habbo != null)
|
||||||
|
userId = habbo.getHabboInfo().getId();
|
||||||
|
else {
|
||||||
|
HabboInfo habboInfo = HabboManager.getOfflineHabboInfo(username);
|
||||||
|
if (habboInfo != null)
|
||||||
|
userId = habboInfo.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userId > 0) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_take_badge"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_take_badge"), RoomChatMessageBubbles.ALERT);
|
||||||
|
|
||||||
BadgesComponent.deleteBadge(habbo != null ? habbo.getHabboInfo().getId() : HabboManager.getOfflineHabboInfo(username).getId(), badge);
|
BadgesComponent.deleteBadge(userId, badge);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user