private static ReadResults SetExecutor(EntitySelectorParser parser, IStringReader reader, bool negated, string originalName, int previousStart, DispatcherResources resources, bool useBedrock)
        {
            if (parser.IsTypeLimited())
            {
                reader.SetCursor(previousStart);
                return(ReadResults.Failure(CommandError.InapplicableOption(originalName).WithContext(reader)));
            }

            int start = reader.GetCursor();

            bool isTag = false;

            if (reader.CanRead() && reader.Peek() == '#')
            {
                reader.Skip();
                isTag = true;
            }

            ReadResults readResults = ResourceLocation.TryRead(reader, out ResourceLocation entity);

            if (!readResults.Successful)
            {
                return(readResults);
            }

            if (ResourceLocation.PLAYER_ENTITY.Equals(entity) && !negated)
            {
                parser.SetIncludesEntities(false);
            }
            else if (useBedrock)
            {
                // Temporary
                return(ReadResults.Success());
            }
            else if (!isTag)
            {
                if (!resources.Entities.Contains(entity))
                {
                    reader.SetCursor(start);
                    return(ReadResults.Failure(CommandError.InvalidEntityType(entity).WithContext(reader)));
                }
            }
            parser.AddArgument(new ParsedArgument <Entity>(new Entity(entity, isTag), false));
            return(ReadResults.Success());
        }