Class ContainingOwnedRegionArgumentType

java.lang.Object
de.z0rdak.yawp.commands.arguments.region.ContainingOwnedRegionArgumentType
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<String>

public class ContainingOwnedRegionArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<String>
  • Field Details

    • VALID_NAME_PATTERN

      public static final Pattern VALID_NAME_PATTERN
  • Constructor Details

    • ContainingOwnedRegionArgumentType

      public ContainingOwnedRegionArgumentType()
  • Method Details

    • owningRegions

      public static ContainingOwnedRegionArgumentType owningRegions()
      Using this as an actual argument does not work on a server-side only mod, because it needs to be registered in the corresponding registry.
    • getRegion

      public static IMarkableRegion getRegion(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getRegionWithMarker

      public static IMarkableRegion getRegionWithMarker(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parse

      public String parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<String>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestionsWithMarker

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestionsWithMarker(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Suggests regions with permission, which are also fully containing the area provided by the marked blocks of the region marker
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Suggests regions with permission, which are also fully containing the area provided by the create local command
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<String>