use of gg.projecteden.nexus.framework.commands.models.annotations.Path 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.Path in project Nexus by ProjectEdenGG.
the class StripLogsCommand method convert.
@Path
void convert() {
Inventory inv = Bukkit.createInventory(null, 54, TITLE);
player().openInventory(inv);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class TreeCommand method run.
@Path("[type]")
void run(@Arg("tree") TreeType treeType) {
Block target = getTargetBlockRequired();
Location location = target.getLocation().add(0, 1, 0);
if (location.getBlock().getType().isSolid())
error("Could not generate tree on " + camelCase(target.getType()));
if (world().generateTree(target.getLocation(), treeType))
send(PREFIX + "Generated " + camelCase(treeType));
else
send(PREFIX + "Tree generation failed");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class UUIDSearchCommand method search.
@Path("<uuid> [amount]")
void search(String search, @Arg("25") int limit) {
if (search.length() < 4)
error("Please be more specific!");
// List<Nerd> nerds = service.find(search, "uuid").stream().limit(limit).collect(Collectors.toList());
List<Nerd> nerds = new ArrayList<>();
if (nerds.size() == 0)
error("No matches found for &e" + search);
send("&3Matches for '&e" + search + "&3' (&e" + nerds.size() + "&3):");
for (Nerd nerd : nerds) send(json("&e" + nerd.getUuid() + " (" + nerd.getName() + ")").insert(nerd.getUuid().toString()));
send("&3Shift+Click on a name to insert it into your chat");
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.
the class Pride20Command method leaveParade.
@Path("parade leave [player]")
void leaveParade(@Arg(value = "self", permission = Group.STAFF) OfflinePlayer player) {
boolean isSelf = isSelf(player);
String playerText = isSelf ? "You have" : Nickname.of(player) + " has";
Setting setting = service.get(player, "pride20Parade");
if (!setting.getBoolean())
error(playerText + " not joined the parade");
WorldGuardUtils worldguard = new WorldGuardUtils(Bukkit.getWorld("safepvp"));
for (Entity entity : worldguard.getEntitiesInRegion("pride20_parade")) {
if (!entity.hasMetadata("NPC"))
continue;
if (entity.getName().equalsIgnoreCase(player.getName()))
CitizensAPI.getNPCRegistry().getNPC(entity).destroy();
}
setting.setBoolean(false);
service.save(setting);
send(PREFIX + playerText + " left the pride parade");
}
Aggregations