Class PokePasteReader

java.lang.Object
com.pixelmonmod.pixelmon.api.util.PokePasteReader

public class PokePasteReader extends Object
Utility class for reading PokePaste.es links or files To read a pokepaste use from(File) or from(String)
  • Method Details

    • getLines

      public List<String> getLines()
      Reads the lines from the pokepaste
      Returns:
      The lines of text
    • build

      public List<Pokemon> build() throws PokemonImportException
      Creates a list of Pokemon from the URL or file that has been read
      Returns:
      The created pokemon
      Throws:
      PokemonImportException
    • from

      @Nullable public static PokePasteReader from(String paste)
      Reads a pokepaste from the URL provided - will append '/raw' if not already there
      Parameters:
      paste - The paste URL
      Returns:
      The reader instance
    • from

      @Nullable public static PokePasteReader from(File file)
      Reads a pokepaste from the given file
      Parameters:
      file - The file to read
      Returns:
      The reader instance