use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class EndermanFarmCommand method create.
@Path("create [player]")
@Permission(Group.SENIOR_STAFF)
void create(OfflinePlayer player) {
if (world().getEnvironment() != Environment.THE_END)
error("You must be in the end to run this command");
final Region selection = worldedit.getPlayerSelection(player());
if (selection == null)
error("You have not selected the farm");
final String regionId = getRegionId(player.getUniqueId());
runMultiCommand("rg define " + regionId, "rg flag " + regionId + " passthrough allow");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class FirstLoginCommand method stats.
@Async
@Path("stats")
@Permission(Group.ADMIN)
void stats() {
StringBuilder data = new StringBuilder();
for (Nerd nerd : new NerdService().getAll()) if (nerd.getFirstJoin() != null)
data.append(nerd.getNickname()).append(",").append(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(nerd.getFirstJoin())).append(System.lineSeparator());
IOUtils.fileAppend("joindates.csv", data.toString());
send(PREFIX + "Generated joindates.csv");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class ArmorStandEditorCommand method set_arms_left.
@Path("set arms left <x> <y> <z>")
@Permission(Group.ADMIN)
void set_arms_left(float x, float y, float z) {
position_arms();
ArmorStand armorStand = (ArmorStand) getTargetEntityRequired(EntityType.ARMOR_STAND);
if (!isPerkAllowedAt(player(), armorStand.getLocation()))
error("You cannot edit armor stands here");
EulerAngle ea = new EulerAngle(Math.toRadians(x), Math.toRadians(y), Math.toRadians(z));
armorStand.setLeftArmPose(ea);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class AssetCompetitionCommand method list.
@Path("list")
@Permission(Group.STAFF)
void list() {
List<AssetCompetition> all = service.getAll();
if (all.size() == 0)
error("There are no available submissions");
JsonBuilder builder = new JsonBuilder();
for (AssetCompetition assetCompetition : all) {
if (!builder.isInitialized())
builder.initialize();
else
builder.next("&e, ").group();
builder.next("&3" + assetCompetition.getName()).command(getAliasUsed() + " tp " + assetCompetition.getName()).group();
}
line();
send(PREFIX + "&3List of submissions &e(Click to teleport)");
send(builder);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class BadgeCommand method convert.
@Async
@Permission(Group.ADMIN)
@Path("convert")
void convert() {
int i = 0;
int owned = 0;
int active = 0;
final List<Nerd> nerds = new NerdService().getAll();
send(PREFIX + "Converting checkmarks");
for (Nerd nerd : nerds) {
if (!LuckPermsUtils.hasPermission(nerd, "donated"))
continue;
final BadgeUser user = service.get(nerd);
user.give(Badge.SUPPORTER);
++owned;
if (nerd.isCheckmark()) {
user.setActive(Badge.SUPPORTER);
++active;
}
if (++i % 25 == 0)
send(PREFIX + "Converted &e" + i + "&3/&e" + nerds.size());
}
service.saveCache();
send(PREFIX + "Completed; &e" + owned + " &3owned, &e" + active + " &3active");
}
Aggregations