package de.slpnetwork.utils;

import com.hypixel.hytale.protocol.GameMode;
import com.hypixel.hytale.server.core.command.system.ParseResult;
import com.hypixel.hytale.server.core.command.system.arguments.types.SingleArgumentType;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class StringArgument extends SingleArgumentType<String> {
    public StringArgument(String name, @Nonnull String argumentUsage, @Nullable String... examples) {
        super(name, argumentUsage, examples);
    }

    @Nullable
    @Override
    public String parse(String s, ParseResult parseResult) {
        if (s.trim().isEmpty()) {
            return null;
        }
        return s;
    }
}
