Bukkit/Bukkit — pull request #1035 by EEwing (2014-02-18 20:40:53+00:00)
Title:  [B+C] Allow entities to be set as explosion source. Fixes BUKKIT-4888

**The Issue:**

There is currently no way to set the source of an explosion created within the World class, using the createExplosion method set.

**Justification:**

Previously, when using the world.createExplosion() method set, there was no way to set the source of the entity. This became an issue when plugins wish to create an explosion which, when killing another player, would display the death message "Player X was killed by Player Y". Furthermore, in the DeathEvent preceding the death, event.getEntity().getKiller() would return null, when it would be more applicable to return the Player who created the explosion.

**PR Breakdown:**

This PR, along with the related CraftBukkit PR, will allow developers to set the source of an explosion created using the createExplosion() method set in the World class. Since this PR only adds a new overloaded method to do this, it will not break plugins currently using the createExplosion() method.

**Testing:**

Testing was done using the following code to test explosions with every entity, and the resulting death messages and .getKiller() return value. Everything I found works as expected, except the fact that the entity passed into the method isn't damaged by the explosion, due to the way the explosion looks for nearby entities.
https://gist.github.com/EEwing/2e3691fc6f780fdf9c33

**JIRA Ticket:**

https://bukkit.atlassian.net/browse/BUKKIT-4888?jql=text%20~%20%22explosion%22

**Related PRs:**

CraftBukkit side: https://github.com/Bukkit/CraftBukkit/pull/1340