package mcjty.rftoolsdim.commands;

import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;

public abstract class AbstractRfToolsCommand implements RfToolsCommand {

    protected String fetchString(ICommandSender sender, String[] args, int index, String defaultValue) {
        if(index < 0 || index >= args.length) return defaultValue;
        return args[index];
    }

    protected boolean fetchBool(ICommandSender sender, String[] args, int index, boolean defaultValue) {
        if(index < 0 || index >= args.length) return defaultValue;
        if(args[index].equalsIgnoreCase("true")) {
            return true;
        } else if(!args[index].equalsIgnoreCase("false")) {
            ITextComponent component = new TextComponentString(TextFormatting.RED + "Parameter is not a valid boolean!");
            if (sender instanceof EntityPlayer) {
                ((EntityPlayer) sender).sendStatusMessage(component, false);
            } else {
                sender.sendMessage(component);
            }
        }
        return false;
    }

    protected int fetchInt(ICommandSender sender, String[] args, int index, int defaultValue) {
        if(index < 0 || index >= args.length) return defaultValue;
        try {
            return Integer.parseInt(args[index]);
        } catch (NumberFormatException e) {
            ITextComponent component = new TextComponentString(TextFormatting.RED + "Parameter is not a valid integer!");
            if (sender instanceof EntityPlayer) {
                ((EntityPlayer) sender).sendStatusMessage(component, false);
            } else {
                sender.sendMessage(component);
            }
            return 0;
        }
    }

    protected float fetchFloat(ICommandSender sender, String[] args, int index, float defaultValue) {
        if(index < 0 || index >= args.length) return defaultValue;
        try {
            return Float.parseFloat(args[index]);
        } catch (NumberFormatException e) {
            ITextComponent component = new TextComponentString(TextFormatting.RED + "Parameter is not a valid real number!");
            if (sender instanceof EntityPlayer) {
                ((EntityPlayer) sender).sendStatusMessage(component, false);
            } else {
                sender.sendMessage(component);
            }
            return 0.0f;
        }
    }

    @Override
    public boolean isClientSide() {
        return false;
    }
}

@@ -1862,32 +1862,679 @@
        %7D%0A    %7D%0A%0A
+    protected long fetchLong(ICommandSender sender, String%5B%5D args, int index, long defaultValue) %7B%0A        if(index %3C 0 %7C%7C index %3E= args.length) return defaultValue;%0A        try %7B%0A            return Long.parseLong(args%5Bindex%5D);%0A        %7D catch (NumberFormatException e) %7B%0A            ITextComponent component = new TextComponentString(TextFormatting.RED + %22Parameter is not a valid long integer!%22);%0A            if (sender instanceof EntityPlayer) %7B%0A                ((EntityPlayer) sender).sendStatusMessage(component, false);%0A            %7D else %7B%0A                sender.sendMessage(component);%0A            %7D%0A            return 0;%0A        %7D%0A    %7D%0A%0A
     protected fl

Add fetchLong method