Class CommandUtil

java.lang.Object
de.z0rdak.yawp.commands.CommandUtil

public class CommandUtil extends Object
  • Constructor Details

    • CommandUtil

      public CommandUtil()
  • Method Details

    • buildClearSubCommand

      public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> buildClearSubCommand(Function<com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack>,IProtectedRegion> regionSupplier)
    • buildRemoveSubCommand

      public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> buildRemoveSubCommand(Function<com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack>,IProtectedRegion> regionSupplier)
    • buildAddSubCommand

      public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> buildAddSubCommand(Function<com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack>,IProtectedRegion> regionSupplier)
    • buildListSubCommand

      public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> buildListSubCommand(Function<com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack>,IProtectedRegion> regionSupplier)
    • buildCopySubCommand

      public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> buildCopySubCommand(Function<com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack>,IProtectedRegion> srcSupplier)
    • promptRegionInfo

      public static int promptRegionInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • promptRegionState

      public static int promptRegionState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • promptGroupLinks

      public static int promptGroupLinks(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, String group)
      == Group '%s' for '%s'== Players: [n player(s)][+] Teams: [m team(s)][+]
    • promptFlagList

      public static int promptFlagList(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, int pageNo)
      List of flags of the provided region and its parents
    • promptRegionFlagList

      public static int promptRegionFlagList(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, int pageNo)
      List of flags only of the provided region
    • promptRegionChildren

      public static int promptRegionChildren(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, int pageNo)
    • promptGroupList

      public static int promptGroupList(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, String group, GroupType groupType, int pageNo)
    • setActiveState

      public static int setActiveState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, boolean activate)
    • setAlertState

      public static int setAlertState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, boolean showAlert)
    • removeTeam

      public static int removeTeam(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.world.scores.Team team, IProtectedRegion region, String group)
    • removePlayer

      public static int removePlayer(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, UUID playerUuid, String playerName, IProtectedRegion region, String group)
    • addPlayersByName

      public static int addPlayersByName(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, List<String> playerNames, IProtectedRegion region, String group)
    • addPlayers

      public static int addPlayers(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, Collection<net.minecraft.server.level.ServerPlayer> players, IProtectedRegion region, String group)
    • addPlayer

      public static int addPlayer(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.world.entity.player.Player player, IProtectedRegion region, String group)
    • addTeam

      public static int addTeam(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.world.scores.Team team, IProtectedRegion region, String group)
    • removeFlags

      public static int removeFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, Set<RegionFlag> flags)
    • removeRegionFlag

      public static int removeRegionFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, RegionFlag flag)
    • copyRegionFlags

      public static int copyRegionFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion srcRegion, IProtectedRegion targetRegion)
    • copyRegionState

      public static int copyRegionState(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion srcRegion, IProtectedRegion targetRegion)
    • copyRegionPlayers

      public static int copyRegionPlayers(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion srcRegion, IProtectedRegion targetRegion, String group)
    • copyRegionPlayers

      public static int copyRegionPlayers(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, IProtectedRegion srcRegion)
    • clearFlags

      public static int clearFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • clearPlayers

      public static int clearPlayers(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • clearPlayers

      public static int clearPlayers(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, String groupName)
    • clearTeams

      public static int clearTeams(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • clearTeams

      public static int clearTeams(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, String groupName)
    • clearGroups

      public static int clearGroups(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, String groupName)
    • addAllFlags

      public static int addAllFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region)
    • addFlag

      public static int addFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, RegionFlag flag)
    • addFlag

      public static int addFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, RegionFlag flag, FlagState state)
    • addFlags

      public static int addFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, Set<RegionFlag> flags)
    • addRegionFlag

      public static int addRegionFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, RegionFlag flag, FlagState state)
    • addRegionFlag

      public static int addRegionFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, IProtectedRegion region, RegionFlag flag)