SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities

Eg dead players.

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-06-02 18:28:23 +10:00
parent 041acf467f
commit 2522c28ac9

View File

@@ -28,9 +28,9 @@ public interface TNTPrimed extends Explosive {
* org.bukkit.World#spawn(Location, Class)} method, for example.) * org.bukkit.World#spawn(Location, Class)} method, for example.)
* <p> * <p>
* The source will become null if the chunk this primed TNT is in is * The source will become null if the chunk this primed TNT is in is
* unloaded then reloaded. If the source Entity becomes invalidated for * unloaded then reloaded. The source entity may be invalid if for example
* any reason, such being removed from the world, the returned value will * it has since died or been unloaded. Callers should check
* be null. * {@link Entity#isValid()}.
* *
* @return the source of this primed TNT * @return the source of this primed TNT
*/ */