use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class ModReviewCommand method add.
@Permission(Group.ADMIN)
@Path("add <name> <verdict> [notes...]")
void add(String name, ModVerdict verdict, String notes) {
Mod mod = new Mod(name, verdict, notes);
modReview.add(mod);
save();
send(PREFIX + "Added mod &e" + mod.getName());
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class BuildContestCommand method item.
@Path("setup item <theme...>")
@Permission(Group.ADMIN)
void item(String theme) {
ItemStack item = getToolRequired();
item.setAmount(1);
ItemBuilder.setName(item, "&6&lBuild Contest");
ItemBuilder.addLore(item, "&e&lJoin our latest build contest!");
ItemBuilder.addLore(item, "&e&lTheme: &6&l" + theme);
buildContest.setItemStack(item);
buildContest.setTheme(theme);
save();
send(PREFIX + "Saved the item to the item in your hand");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class TeleportCommand method disable.
@Path("toggle")
@Permission("ladder.builder")
void disable() {
SettingService settingService = new SettingService();
Setting setting = settingService.get(player(), "tpDisable");
boolean enable = setting.getBoolean();
setting.setBoolean(!enable);
settingService.save(setting);
send(PREFIX + "Teleports to you have been " + (enable ? "&aenabled" : "&cdisabled"));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission 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.Permission 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));
}
Aggregations