java.lang.Object
net.apartium.cocoabeans.commands.parsers.ArgumentParser<org.bukkit.entity.Player>
net.apartium.cocoabeans.commands.spigot.parsers.PlayerParser
All Implemented Interfaces:
Comparable<net.apartium.cocoabeans.commands.parsers.ArgumentParser<?>>

public class PlayerParser extends net.apartium.cocoabeans.commands.parsers.ArgumentParser<org.bukkit.entity.Player>
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.apartium.cocoabeans.commands.parsers.ArgumentParser

    net.apartium.cocoabeans.commands.parsers.ArgumentParser.ParseResult<T extends Object>, net.apartium.cocoabeans.commands.parsers.ArgumentParser.TabCompletionResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerParser(int priority)
    Creates new player parser
    PlayerParser(int priority, String keyword)
    Creates new player parser
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.apartium.cocoabeans.commands.parsers.ArgumentParser.ParseResult<org.bukkit.entity.Player>>
    parse(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
     
    Optional<net.apartium.cocoabeans.commands.parsers.ArgumentParser.TabCompletionResult>
    tabCompletion(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
     
    tryParse(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
     

    Methods inherited from class net.apartium.cocoabeans.commands.parsers.ArgumentParser

    compareTo, getArgumentType, getKeyword, getPriority, isSupportMultipleArguments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • PlayerParser

      @AvailableSince("0.0.36") public PlayerParser(int priority, String keyword)
      Creates new player parser
      Parameters:
      priority - parser priority of which should be higher than others or lower
      keyword - parser keyword
    • PlayerParser

      public PlayerParser(int priority)
      Creates new player parser
      Parameters:
      priority - parser priority of which should be higher than others or lower
  • Method Details

    • parse

      public Optional<net.apartium.cocoabeans.commands.parsers.ArgumentParser.ParseResult<org.bukkit.entity.Player>> parse(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
      Specified by:
      parse in class net.apartium.cocoabeans.commands.parsers.ArgumentParser<org.bukkit.entity.Player>
    • tryParse

      public OptionalInt tryParse(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
      Specified by:
      tryParse in class net.apartium.cocoabeans.commands.parsers.ArgumentParser<org.bukkit.entity.Player>
    • tabCompletion

      public Optional<net.apartium.cocoabeans.commands.parsers.ArgumentParser.TabCompletionResult> tabCompletion(net.apartium.cocoabeans.commands.CommandProcessingContext processingContext)
      Specified by:
      tabCompletion in class net.apartium.cocoabeans.commands.parsers.ArgumentParser<org.bukkit.entity.Player>