Search in sources :

Example 21 with Path

use of gg.projecteden.nexus.framework.commands.models.annotations.Path 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();
}
Also used : Sign(org.bukkit.block.Sign) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 22 with Path

use of gg.projecteden.nexus.framework.commands.models.annotations.Path 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);
}
Also used : Halloween20User(gg.projecteden.nexus.models.halloween20.Halloween20User) Halloween20Service(gg.projecteden.nexus.models.halloween20.Halloween20Service) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 23 with Path

use of gg.projecteden.nexus.framework.commands.models.annotations.Path 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();
}
Also used : LocationUtils.getCenteredLocation(gg.projecteden.nexus.utils.LocationUtils.getCenteredLocation) Location(org.bukkit.Location) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 24 with Path

use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.

the class WingsCommand method stop.

@Path("stop")
void stop() {
    ParticleOwner owner = service.get(player());
    owner.cancel(ParticleType.WINGS);
}
Also used : ParticleOwner(gg.projecteden.nexus.models.particle.ParticleOwner) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path)

Example 25 with Path

use of gg.projecteden.nexus.framework.commands.models.annotations.Path in project Nexus by ProjectEdenGG.

the class TrustCommand method home.

@Description("Allow specified player(s) to a specific home")
@Path("home <home> <players>")
void home(Home home, @Arg(type = OfflinePlayer.class) List<OfflinePlayer> players) {
    players.forEach(home::allow);
    new HomeService().save(home.getOwner());
    send(PREFIX + "Trusted &e" + nicknames(players, "&3, &e") + " &3to home &e" + home.getName());
}
Also used : HomeService(gg.projecteden.nexus.models.home.HomeService) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Description(gg.projecteden.nexus.framework.commands.models.annotations.Description)

Aggregations

Path (gg.projecteden.nexus.framework.commands.models.annotations.Path)333 Permission (gg.projecteden.nexus.framework.commands.models.annotations.Permission)110 JsonBuilder (gg.projecteden.nexus.utils.JsonBuilder)51 Async (gg.projecteden.annotations.Async)48 ItemStack (org.bukkit.inventory.ItemStack)38 CommandEvent (gg.projecteden.nexus.framework.commands.models.events.CommandEvent)31 ArrayList (java.util.ArrayList)31 CustomCommand (gg.projecteden.nexus.framework.commands.models.CustomCommand)30 Description (gg.projecteden.nexus.framework.commands.models.annotations.Description)29 List (java.util.List)28 Location (org.bukkit.Location)28 Group (gg.projecteden.nexus.framework.commands.models.annotations.Permission.Group)27 UUID (java.util.UUID)26 Arg (gg.projecteden.nexus.framework.commands.models.annotations.Arg)25 Nerd (gg.projecteden.nexus.models.nerd.Nerd)24 HashMap (java.util.HashMap)24 BiFunction (java.util.function.BiFunction)21 Map (java.util.Map)20 Player (org.bukkit.entity.Player)20 NonNull (lombok.NonNull)18