/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014 The Voxel Plugineering Team
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package com.voxelplugineering.voxelsniper.registry.vsl;

import com.google.common.base.Optional;
import com.voxelplugineering.voxelsniper.Gunsmith;
import com.voxelplugineering.voxelsniper.api.commands.ArgumentParser;
import com.voxelplugineering.voxelsniper.api.world.biome.Biome;

/**
 * A static library of standard argument parsers.
 */
@SuppressWarnings("javadoc")
public class ArgumentParsers
{

    public static ArgumentParser<Biome> BIOME_PARSER = null;
    public static ArgumentParser<String> STRING_PARSER = null;

    /**
     * Initialize
     */
    public static void init()
    {
        STRING_PARSER = new ArgumentParser.RawParser();
        BIOME_PARSER = new ArgumentParser<Biome>()
        {

            @Override
            public Optional<Biome> get(String arg)
            {
                return Gunsmith.getBiomeRegistry().getBiome(arg);
            }

        };
    }
}

/*
 * TODO default ArgumentParsers
 * 
 * Add default parsers for: - Players - Worlds - Materials - Numbers
 */

@@ -1420,192 +1420,645 @@
 api.
-world.biome.Biome;%0A%0A/**%0A * A static library of standard argument parsers.%0A */%0A@SuppressWarnings(%22javadoc%22)%0Apublic class ArgumentParsers%0A%7B%0A%0A    public static ArgumentParser%3CBiome%3E BIOME
+entity.living.Player;%0Aimport com.voxelplugineering.voxelsniper.api.world.World;%0Aimport com.voxelplugineering.voxelsniper.api.world.biome.Biome;%0Aimport com.voxelplugineering.voxelsniper.api.world.material.Material;%0A%0A/**%0A * A static library of standard argument parsers.%0A */%0A@SuppressWarnings(%22javadoc%22)%0Apublic class ArgumentParsers%0A%7B%0A%0A    public static ArgumentParser%3CBiome%3E BIOME_PARSER = null;%0A    public static ArgumentParser%3CDouble%3E DOUBLE_PARSER = null;%0A    public static ArgumentParser%3CInteger%3E INTEGER_PARSER = null;%0A    public static ArgumentParser%3CMaterial%3E MATERIAL_PARSER = null;%0A    public static ArgumentParser%3CPlayer%3E PLAYER
 _PAR
@@ -2131,16 +2131,77 @@
  = null;
+%0A    public static ArgumentParser%3CWorld%3E WOLRD_PARSER = null;
 %0A%0A    /*
@@ -2569,121 +2569,1237 @@
     
-%7D%0A%7D%0A%0A/*%0A * TODO default ArgumentParsers%0A * %0A * Add default parsers for: - Players - Worlds - Materials - Numbers%0A */
+    INTEGER_PARSER = new ArgumentParser%3CInteger%3E()%0A        %7B%0A%0A            @Override%0A            public Optional%3CInteger%3E get(String arg)%0A            %7B%0A                return Optional.of(Integer.parseInt(arg));%0A            %7D%0A%0A        %7D;%0A        DOUBLE_PARSER = new ArgumentParser%3CDouble%3E()%0A        %7B%0A%0A            @Override%0A            public Optional%3CDouble%3E get(String arg)%0A            %7B%0A                return Optional.of(Double.parseDouble(arg));%0A            %7D%0A%0A        %7D;%0A        WOLRD_PARSER = new ArgumentParser%3CWorld%3E()%0A        %7B%0A%0A            @Override%0A            public Optional%3CWorld%3E get(String arg)%0A            %7B%0A                return Gunsmith.getWorldRegistry().getWorld(arg);%0A            %7D%0A%0A        %7D;%0A        MATERIAL_PARSER = new ArgumentParser%3CMaterial%3E()%0A        %7B%0A%0A            @Override%0A            public Optional%3CMaterial%3E get(String arg)%0A            %7B%0A                return Gunsmith.getDefaultMaterialRegistry().getMaterial(arg);%0A            %7D%0A%0A        %7D;%0A        PLAYER_PARSER = new ArgumentParser%3CPlayer%3E()%0A        %7B%0A%0A            @Override%0A            public Optional%3CPlayer%3E get(String arg)%0A            %7B%0A                return Gunsmith.getPlayerRegistry().getPlayer(arg);%0A            %7D%0A%0A        %7D;%0A    %7D%0A%7D
 %0A

Add default ArgumentParsers