Search in sources :

Example 56 with Permission

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

the class ScoreboardCommand method list.

@Permission(Group.STAFF)
@Path("list")
void list() {
    String collect = OnlinePlayers.getAll().stream().map(player -> new ScoreboardService().get(player)).filter(ScoreboardUser::isActive).map(Nickname::of).collect(Collectors.joining("&3, &e"));
    send(PREFIX + "Active scoreboards: ");
    send("&e" + collect);
}
Also used : JsonBuilder(gg.projecteden.nexus.utils.JsonBuilder) TabCompleteIgnore(gg.projecteden.nexus.framework.commands.models.annotations.TabCompleteIgnore) Group(gg.projecteden.nexus.framework.commands.models.annotations.Permission.Group) MinigamerQuitEvent(gg.projecteden.nexus.features.minigames.models.events.matches.MinigamerQuitEvent) WrittenBookMenu(gg.projecteden.nexus.features.menus.BookBuilder.WrittenBookMenu) MatchJoinEvent(gg.projecteden.nexus.features.minigames.models.events.matches.MatchJoinEvent) EventHandler(org.bukkit.event.EventHandler) McMMOScoreboardRevertEvent(com.gmail.nossr50.events.scoreboard.McMMOScoreboardRevertEvent) MatchEndEvent(gg.projecteden.nexus.features.minigames.models.events.matches.MatchEndEvent) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission) Nickname(gg.projecteden.nexus.models.nickname.Nickname) Listener(org.bukkit.event.Listener) PlayerJoinEvent(org.bukkit.event.player.PlayerJoinEvent) Description(gg.projecteden.nexus.framework.commands.models.annotations.Description) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) NonNull(lombok.NonNull) CustomCommand(gg.projecteden.nexus.framework.commands.models.CustomCommand) HideFromHelp(gg.projecteden.nexus.framework.commands.models.annotations.HideFromHelp) ScoreboardService(gg.projecteden.nexus.models.scoreboard.ScoreboardService) Collectors(java.util.stream.Collectors) ScoreboardUser(gg.projecteden.nexus.models.scoreboard.ScoreboardUser) OfflinePlayer(org.bukkit.OfflinePlayer) Aliases(gg.projecteden.nexus.framework.commands.models.annotations.Aliases) CommandEvent(gg.projecteden.nexus.framework.commands.models.events.CommandEvent) PlayerQuitEvent(org.bukkit.event.player.PlayerQuitEvent) OnlinePlayers(gg.projecteden.nexus.utils.PlayerUtils.OnlinePlayers) PlayerChangedWorldEvent(org.bukkit.event.player.PlayerChangedWorldEvent) NoArgsConstructor(lombok.NoArgsConstructor) ScoreboardUser(gg.projecteden.nexus.models.scoreboard.ScoreboardUser) ScoreboardService(gg.projecteden.nexus.models.scoreboard.ScoreboardService) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 57 with Permission

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

the class SafeCrackerCommand method reset.

@Path("admin reset [player]")
@Permission(Group.STAFF)
void reset(@Arg("self") OfflinePlayer player) {
    SafeCrackerPlayer safeCrackerPlayer = playerService.get(player);
    safeCrackerPlayer.setGames(new HashMap<>());
    playerService.save(safeCrackerPlayer);
    send(PREFIX + "Successfully reset &e" + player.getName());
}
Also used : SafeCrackerPlayer(gg.projecteden.nexus.models.safecracker.SafeCrackerPlayer) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 58 with Permission

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

the class StoreCommand method gallery_debug_displays.

@Path("gallery debug displays")
@Permission(Group.ADMIN)
void gallery_debug_displays() {
    for (DisplaySet display : StoreGalleryNPCs.getDisplays()) {
        send(display.getId() + ":");
        send(" 1: " + display.getDisplay1().getId());
        send(" 2: " + display.getDisplay2().getId());
        send(" 3: " + display.getDisplay3().getId());
    }
}
Also used : DisplaySet(gg.projecteden.nexus.features.store.gallery.StoreGalleryNPCs.DisplaySet) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 59 with Permission

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

the class Pugmas21Command method balloon_move.

@Path("balloon move [--seconds]")
@Permission(Group.ADMIN)
void balloon_move(@Arg("20") @Switch int seconds) {
    final MultiModelStructure structure = getBalloonStructure().spawn();
    player().setGravity(false);
    int taskId = Tasks.repeat(0, 1, () -> {
        final Vector west = BlockFace.WEST.getDirection().multiply(.1);
        player().setVelocity(west);
        for (Model model : structure.getModels()) {
            EntityUtils.forcePacket(model.getArmorStand());
            model.getArmorStand().teleport(model.getArmorStand().getLocation().add(west));
        }
    });
    Tasks.wait(TickTime.SECOND.x(seconds), () -> {
        Tasks.cancel(taskId);
        player().setGravity(true);
    });
}
Also used : Model(gg.projecteden.nexus.features.events.y2021.pugmas21.models.MultiModelStructure.Model) Vector(org.bukkit.util.Vector) MultiModelStructure(gg.projecteden.nexus.features.events.y2021.pugmas21.models.MultiModelStructure) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Example 60 with Permission

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

the class HubCommand method parkour_create.

@Path("parkour create <course>")
@Permission(Group.ADMIN)
void parkour_create(String course) {
    courseService.save(new HubParkourCourse(UUID.nameUUIDFromBytes(course.getBytes()), course));
    send(PREFIX + "Parkour course created");
}
Also used : HubParkourCourse(gg.projecteden.nexus.models.hub.HubParkourCourse) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Permission(gg.projecteden.nexus.framework.commands.models.annotations.Permission)

Aggregations

Permission (gg.projecteden.nexus.framework.commands.models.annotations.Permission)94 Path (gg.projecteden.nexus.framework.commands.models.annotations.Path)93 Async (gg.projecteden.annotations.Async)15 JsonBuilder (gg.projecteden.nexus.utils.JsonBuilder)13 ItemStack (org.bukkit.inventory.ItemStack)13 List (java.util.List)10 CustomCommand (gg.projecteden.nexus.framework.commands.models.CustomCommand)9 Group (gg.projecteden.nexus.framework.commands.models.annotations.Permission.Group)9 CommandEvent (gg.projecteden.nexus.framework.commands.models.events.CommandEvent)9 Arg (gg.projecteden.nexus.framework.commands.models.annotations.Arg)8 Description (gg.projecteden.nexus.framework.commands.models.annotations.Description)8 ArrayList (java.util.ArrayList)8 Nerd (gg.projecteden.nexus.models.nerd.Nerd)7 NerdService (gg.projecteden.nexus.models.nerd.NerdService)7 Utils (gg.projecteden.nexus.utils.Utils)7 HashMap (java.util.HashMap)7 BiFunction (java.util.function.BiFunction)7 Map (java.util.Map)6 Location (org.bukkit.Location)6 Aliases (gg.projecteden.nexus.framework.commands.models.annotations.Aliases)5