mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-10-25 03:53:06 +02:00
27 lines
1.1 KiB
Java
27 lines
1.1 KiB
Java
package com.eu.habbo.habbohotel.commands;
|
|
|
|
import com.eu.habbo.Emulator;
|
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
|
import com.eu.habbo.messages.outgoing.events.calendar.AdventCalendarDataComposer;
|
|
import com.eu.habbo.messages.outgoing.unknown.NuxAlertComposer;
|
|
|
|
public class CalendarCommand extends Command
|
|
{
|
|
public CalendarCommand()
|
|
{
|
|
super("cmd_calendar", Emulator.getTexts().getValue("commands.keys.cmd_calendar").split(";"));
|
|
}
|
|
|
|
@Override
|
|
public boolean handle(GameClient gameClient, String[] params) throws Exception
|
|
{
|
|
if (Emulator.getConfig().getBoolean("hotel.calendar.enabled"))
|
|
{
|
|
gameClient.sendResponse(new AdventCalendarDataComposer("xmas11", Emulator.getGameEnvironment().getCatalogManager().calendarRewards.size(), (int)Math.floor((Emulator.getIntUnixTimestamp() - Emulator.getConfig().getInt("hotel.calendar.starttimestamp")) / 86400) , gameClient.getHabbo().getHabboStats().calendarRewardsClaimed, true));
|
|
gameClient.sendResponse(new NuxAlertComposer("openView/calendar"));
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|