Search in sources :

Example 1 with AdventMenu

use of gg.projecteden.nexus.features.events.y2021.pugmas21.advent.AdventMenu in project Nexus by ProjectEdenGG.

the class Pugmas21Command method advent.

@Path("advent")
@Description("Open the advent calender")
void advent(@Arg(value = "0", permission = Group.ADMIN) @Switch int day, @Arg(value = "30", permission = Group.ADMIN) @Switch int frameTicks) {
    verifyDate();
    LocalDate date = Pugmas21.TODAY;
    if (date.isBefore(Pugmas21.EPOCH) || day > 0)
        date = Pugmas21.EPOCH.plusDays(day - 1);
    new AdventMenu(user, date, frameTicks).open(player());
}
Also used : AdventMenu(gg.projecteden.nexus.features.events.y2021.pugmas21.advent.AdventMenu) LocalDate(java.time.LocalDate) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Description(gg.projecteden.nexus.framework.commands.models.annotations.Description)

Aggregations

AdventMenu (gg.projecteden.nexus.features.events.y2021.pugmas21.advent.AdventMenu)1 Description (gg.projecteden.nexus.framework.commands.models.annotations.Description)1 Path (gg.projecteden.nexus.framework.commands.models.annotations.Path)1 LocalDate (java.time.LocalDate)1