use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class Pugmas20Command method treeGet.
@Permission(Group.ADMIN)
@Path("tree get")
void treeGet() {
Material logs = getTargetBlockRequired().getType();
PugmasTreeType treeType = PugmasTreeType.of(logs);
if (treeType == null)
error("Pugmas Tree with logs " + camelCase(logs) + " not found");
send(PREFIX + "You are looking at a " + camelCase(treeType) + " tree");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class Pugmas20Command method treeCounts.
@Permission(Group.ADMIN)
@Path("tree counts")
void treeCounts() {
int total = 0;
JsonBuilder json = json(PREFIX + "Pugmas tree counts:");
for (PugmasTreeType treeType : PugmasTreeType.values()) {
Set<Integer> ids = treeType.getPasters().keySet();
if (ids.size() == 0)
continue;
String collect = ids.stream().map(String::valueOf).collect(Collectors.joining(", "));
json.newline().next("&e " + camelCase(treeType) + " &7- " + ids.size() + " &3[" + collect + "]");
total += ids.size();
}
if (total == 0)
error("No pugmas trees found");
send(json.newline().next("&3Total: &e" + total));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class Pugmas20Command method pugmas.
@Path
void pugmas() {
LocalDate now = LocalDate.now();
if (isBeforePugmas(now) && !isStaff())
error("Soon™ (" + timeLeft + ")");
if (pugmasUser.isWarped()) {
player().teleportAsync(Pugmas20.getSubsequentSpawn(), TeleportCause.COMMAND);
} else {
player().teleportAsync(Pugmas20.getInitialSpawn(), TeleportCause.COMMAND);
pugmasUser.setWarped(true);
pugmasService.save(pugmasUser);
}
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class Pugmas20Command method district.
@Path("district")
@Description("View which district you are currently in")
void district() {
District district = District.of(location());
send(PREFIX + "You are " + (district == District.UNKNOWN ? "not in a district" : "in the &e" + district.getName() + " District"));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class BearFair21StatsCommand method stats.
@Path
void stats() {
List<BearFair21User> users = userService.getAll();
EventUserService eventUserService = new EventUserService();
List<EventUser> eventUsers = eventUserService.getAll();
// Total time played
// % of time spent at bf vs other worlds
// % of people who logged in that visited bf
// % of playtime per world during bf
send("&6&lUnique visitors: &e" + users.stream().filter(bearFair21User -> !bearFair21User.isFirstVisit()).count());
line();
send("&6&lQuest Stages");
send(json("- Main").hover(getQuestStages(users, BearFair21UserQuestStageHelper.MAIN)));
send(json(" - LumberJack").hover(getQuestStages(users, BearFair21UserQuestStageHelper.LUMBERJACK)));
send(json(" - BeeKeeper").hover(getQuestStages(users, BearFair21UserQuestStageHelper.BEEKEEPER)));
send(json(" - Recycler").hover(getQuestStages(users, BearFair21UserQuestStageHelper.RECYCLER)));
send(json("- Minigame Night").hover(getQuestStages(users, BearFair21UserQuestStageHelper.MINIGAME_NIGHT)));
send(json("- Pugmas").hover(getQuestStages(users, BearFair21UserQuestStageHelper.PUGMAS)));
send(json("- Halloween").hover(getQuestStages(users, BearFair21UserQuestStageHelper.HALLOWEEN)));
send(json("- Summer Down Under").hover(getQuestStages(users, BearFair21UserQuestStageHelper.SUMMER_DOWN_UNDER)));
line();
send("&6&lEvent Participation");
for (String event : eventParticipation.keySet()) send(" - " + event + ": " + eventParticipation.get(event).size());
line();
send("&6&lDaily Points");
for (Day day : Day.values()) send(json(" - Day " + (day.ordinal() + 1)).hover(getCompletedSources(eventUsers, day)));
line();
send("&6&lTreasure Chests");
Map<Integer, Integer> data = getTreasureChestData(users);
send(json("- Found all: " + data.get(20)));
send(json("- Found some: " + getFoundSomeTreasureChests(data)).hover(getTreasureChestStats(data)));
send(json("- Found none: " + data.get(0)));
}
Aggregations