use of gg.projecteden.nexus.framework.commands.models.annotations.Path 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.Path in project Nexus by ProjectEdenGG.
the class BuildContestCommand method buildcontest.
@Path
void buildcontest() {
if (!buildContest.isActive())
error("There are no active build contests running");
Warp warp = WarpType.NORMAL.get("buildcontest" + buildContest.getId());
if (warp == null)
error("That warp is not set.");
warp.teleportAsync(player());
send(PREFIX + "Warping to build contest &e" + buildContest.getTheme());
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class InviteRewardsCommand method send.
@Path("<username>")
void send(Player invited) {
Player inviter = player();
if (inviter.equals(invited))
error(colorize("You cannot invite yourself!"));
if (Nerd.of(inviter).getFirstJoin().isAfter(Nerd.of(invited).getFirstJoin()))
error("You joined after &e" + invited.getName() + "&c, so you can't have invited them!");
if (hasBeenInvitedBefore(invited))
error("&e" + invited.getName() + "&c has already confirmed being invited by someone else");
if (!invited.hasPermission("invite.rewards.confirm"))
error("The person you are inviting must be a &fMember &cor above.");
if (getMinutesPlayed(invited) < 60)
error("&e" + invited.getName() + "&c has to play for an hour before you can do that.");
sendInviteConfirmation(inviter, invited);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class InviteRewardsCommand method confirm.
@HideFromHelp
@TabCompleteIgnore
@Path("confirm <inviter>")
void confirm(Player inviter) {
Player invited = player();
if (Nerd.of(inviter).getFirstJoin().isAfter(Nerd.of(invited).getFirstJoin()))
error("&e" + inviter.getName() + " &cjoined after you, so you can't have been invited by them!");
if (hasBeenInvitedBefore(invited))
error("&cYou have already confirmed being invited by someone else");
if (getMinutesPlayed(invited) < 60)
error("You have to play for an hour before you can do that.");
send(inviter, PREFIX + "&e" + invited.getName() + "&3 has confirmed your invite; thank you for " + "helping Project Eden grow! You earned &e15 vote points");
send(invited, PREFIX + "You have confirmed &e" + inviter.getName() + "'s &3invite. Thank you " + "for flying Project Eden!");
reward(inviter);
saveInvitation(inviter, invited);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class MailCommand method cancel.
@TabCompleteIgnore
@HideFromHelp
@Path("cancel")
void cancel() {
Mail mail = from.getPending();
mail.cancel();
save(from);
send(PREFIX + "Mail to " + mail.getNickname() + " cancelled");
}
Aggregations