public static void damage(org.bukkit.entity.Entity entity, DamageCause cause, double damage) {
DamageSource source;
if (cause == DamageCause.BLOCK_EXPLOSION) {
Location loc = entity.getLocation();
World worldhandle = CommonNMS.getNative(loc.getWorld());
Explosion ex = new Explosion(worldhandle, null, loc.getX(), loc.getY(), loc.getZ(), (float) 4.0);
source = DamageSource.explosion(ex);
} else if (cause == DamageCause.CONTACT) {
source = DamageSource.CACTUS;
} else if (cause == DamageCause.DROWNING) {
source = DamageSource.DROWN;