use of gg.projecteden.nexus.framework.commands.models.annotations.Description in project Nexus by ProjectEdenGG.
the class ItemTagsCommand method getTags.
@Path("get")
@Description("Get item tags on held item")
@Permission(Group.ADMIN)
void getTags() {
ItemStack tool = getToolRequired();
send("");
send("Item Tags: ");
Condition condition = Condition.of(tool);
if (condition != null)
send(condition.getTag());
Rarity rarity = Rarity.of(tool, condition);
if (rarity != null)
send(rarity.getTag());
send("");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Description in project Nexus by ProjectEdenGG.
the class ItemTagsCommand method update.
@Path("update [debug]")
@Permission(Group.ADMIN)
@Description("Update item tags on held item")
void update(@Arg("false") Boolean bool) {
ItemStack tool = getToolRequired();
Player debugger = bool ? player() : null;
ItemTagsUtils.updateItem(tool, debugger);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Description in project Nexus by ProjectEdenGG.
the class RadioCommand method leaveRadio.
@Path("leave")
@Description("Leave the listened radio")
void leaveRadio() {
Radio radio = getListenedRadio(player(), true);
if (radio == null)
return;
removePlayer(player(), radio);
if (radio.getType().equals(RadioType.RADIUS))
user.getLeftRadiusRadios().add(radio.getId());
else
user.setLastServerRadioId(null);
if (user.getLastServerRadio() != null)
addPlayer(player(), user.getLastServerRadio());
userService.save(user);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Description in project Nexus by ProjectEdenGG.
the class ScoreboardCommand method book.
@Description("Control which lines you want to see")
@Path("edit")
void book() {
WrittenBookMenu builder = new WrittenBookMenu();
int index = 0;
JsonBuilder json = new JsonBuilder();
for (ScoreboardLine line : ScoreboardLine.values()) {
if (!line.isOptional())
continue;
if (!line.hasPermission(player()) && !user.getLines().containsKey(line))
continue;
json.next((user.getLines().containsKey(line) && user.getLines().get(line)) ? "&a✔" : "&c✗").command("/scoreboard edit toggle " + line.name().toLowerCase()).hover("&eClick to toggle").next(" ").group();
json.next("&3" + camelCase(line)).hover(line.render(player()));
json.newline().group();
if (++index % 14 == 0) {
builder.addPage(json);
json = new JsonBuilder();
}
}
builder.addPage(json).open(player());
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Description in project Nexus by ProjectEdenGG.
the class ItemTagsCommand method updateInv.
@Path("updateInv")
@Permission(Group.ADMIN)
@Description("Update item tags on all items in inventory")
void updateInv() {
ItemStack[] contents = inventory().getContents();
int count = 0;
for (ItemStack item : contents) {
if (isNullOrAir(item))
continue;
ItemTagsUtils.updateItem(item);
++count;
}
send(PREFIX + count + " items itemtags updated!");
}
Aggregations