use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class Easter20Command method set.
@Permission(Group.STAFF)
@Path("set <player>")
void set(OfflinePlayer player) {
Sign sign = getTargetSignRequired();
sign.setLine(0, header);
sign.setLine(1, player.getName());
sign.update();
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class Halloween20Command method reset.
@Path("reset [player]")
@Permission(Group.ADMIN)
void reset(@Arg("self") OfflinePlayer player) {
Halloween20Service service = new Halloween20Service();
Halloween20User user = service.get(player);
user.setLostPumpkinsStage(QuestStage.LostPumpkins.NOT_STARTED);
user.setFoundPumpkins(new ArrayList<>());
user.setCombinationStage(QuestStage.Combination.NOT_STARTED);
user.setFoundComboLockNumbers(new ArrayList<>());
service.save(user);
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class ParticlesCommand method dot.
@Path("dot")
@Permission(Group.ADMIN)
void dot() {
Location loc = getCenteredLocation(location()).add(0, 1, 0);
DotEffect.builder().player(player()).location(loc).ticks(10 * 20).rainbow(true).start();
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class BannerCommand method all.
@Permission("nexus.banners")
@Path("<baseColor> <patternColor> [input...]")
void all(DyeColor baseColor, DyeColor patternColor, @Arg("*") String input) {
ItemBuilder baseBanner = new ItemBuilder(ColorType.of(baseColor).getBanner());
if (input.equalsIgnoreCase("*")) {
// All Banners
for (SymbolBanner.Symbol symbol : SymbolBanner.Symbol.values()) {
ItemBuilder banner = symbol.get(baseBanner.clone(), baseColor, patternColor);
if (banner != null)
PlayerUtils.giveItem(player(), banner.build());
}
} else {
// Input Banners
char[] chars = input.toUpperCase().replaceAll(" ", "").toCharArray();
for (int i = 0; i < chars.length; i++) {
char character = input.charAt(i);
Symbol symbol = Symbol.of(character);
if (symbol == null)
continue;
ItemBuilder banner = symbol.get(baseBanner.clone(), baseColor, patternColor);
if (banner != null)
PlayerUtils.giveItem(player(), banner.build());
}
}
}
use of gg.projecteden.nexus.framework.commands.models.annotations.Permission in project Nexus by ProjectEdenGG.
the class BoostsCommand method start.
@Confirm
@Permission(Group.SENIOR_STAFF)
@Path("start <type> <multiplier> <duration>")
void start(Boostable type, double multiplier, int duration) {
if (config.hasBoost(type))
cancel(type, true);
Booster booster = service.get(Dev.KODA.getUuid());
Boost boost = booster.add(type, multiplier, duration);
boost.activate();
service.save(booster);
send(PREFIX + "Started a server " + boost.getMultiplierFormatted() + " " + camelCase(type) + " boost for " + Timespan.ofSeconds(boost.getDuration()).format(FormatType.LONG));
}
Aggregations