use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class MinigamesCommand method copy.
@Path("copy <from> <to>")
@Permission(PERMISSION_MANAGE)
void copy(Arena arena, String name) {
if (ArenaManager.exists(name))
error("&e" + name + " already exists");
Arena copy = ArenaManager.convert(arena, arena.getClass());
copy.setId(ArenaManager.getNextId());
copy.setName(name);
copy.setDisplayName(name);
copy.write();
send(PREFIX + "Creating arena &e" + name + "&3");
send(PREFIX + "&cRecommended: &3Edit .yml file to remove locations");
Minigames.getMenus().openArenaMenu(player(), ArenaManager.get(name));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class MinigamesCommand method create.
@Path("create <name>")
@Permission(PERMISSION_MANAGE)
void create(String name) {
if (ArenaManager.exists(name))
send(PREFIX + "Editing arena &e" + name + "&3");
else {
Arena arena = new Arena(name);
arena.write();
send(PREFIX + "Creating arena &e" + name + "&3");
}
Minigames.getMenus().openArenaMenu(player(), ArenaManager.get(name));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class MinigamesCommand method addTokens.
@Path("tokens add <amount> [user]")
@Permission(Group.SENIOR_STAFF)
void addTokens(int amount, @Arg("self") Nerd nerd) {
PerkOwnerService service = new PerkOwnerService();
PerkOwner perkOwner = service.get(nerd);
perkOwner.setTokens(amount + perkOwner.getTokens());
service.save(perkOwner);
String username = nerd.getUuid().equals(player().getUniqueId()) ? "You now have" : (perkOwner.getNickname() + " now has");
send(PREFIX + username + " " + perkOwner.getTokens() + plural(" token", perkOwner.getTokens()));
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class MinigamesCommand method setTokens.
@Path("tokens set <amount> [user]")
@Permission(Group.SENIOR_STAFF)
void setTokens(int amount, @Arg("self") Nerd nerd) {
PerkOwnerService service = new PerkOwnerService();
PerkOwner perkOwner = service.get(nerd);
perkOwner.setTokens(amount);
service.save(perkOwner);
String username = nerd.getUuid().equals(player().getUniqueId()) ? "Your" : (perkOwner.getNickname() + "'s");
send(PREFIX + username + " tokens were set to " + amount);
}
Aggregations