Search in sources :

Example 1 with PugmasTreeType

use of gg.projecteden.nexus.features.events.y2020.pugmas20.quests.OrnamentVendor.PugmasTreeType 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");
}
Also used : PugmasTreeType(gg.projecteden.nexus.features.events.y2020.pugmas20.quests.OrnamentVendor.PugmasTreeType) Material(org.bukkit.Material) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 2 with PugmasTreeType

use of gg.projecteden.nexus.features.events.y2020.pugmas20.quests.OrnamentVendor.PugmasTreeType 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));
}
Also used : JsonBuilder(gg.projecteden.nexus.utils.JsonBuilder) PugmasTreeType(gg.projecteden.nexus.features.events.y2020.pugmas20.quests.OrnamentVendor.PugmasTreeType) Pugmas20.showWaypoint(gg.projecteden.nexus.features.events.y2020.pugmas20.Pugmas20.showWaypoint) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Aggregations

PugmasTreeType (gg.projecteden.nexus.features.events.y2020.pugmas20.quests.OrnamentVendor.PugmasTreeType)2 Path (gg.projecteden.nexus.framework.commands.models.annotations.Path)2 Permission (gg.projecteden.nexus.framework.commands.models.annotations.Permission)2 Pugmas20.showWaypoint (gg.projecteden.nexus.features.events.y2020.pugmas20.Pugmas20.showWaypoint)1 JsonBuilder (gg.projecteden.nexus.utils.JsonBuilder)1 Material (org.bukkit.Material)1