Using getCriteria with a custom element type
Fixed it for now by including a custom enum class in the base plugin file:
    

abstract class CustomElementType extends BaseEnum
{
    const Badges_Badge = 'Badges_Badge';
}


and then querying for the custom element in the plugin using craft()-&gt;elements-&gt;getCriteria(CustomElementType::Badges_Badge);