mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Don't "setLastDamageCause" in the DamageEvent constructor. Addresses BUKKIT-1881
This is now done after the event to allow you to be able to get previous damageCauses, and is now only applied if the event is not canceled. By: feildmaster <admin@feildmaster.com>
This commit is contained in:
@@ -24,6 +24,7 @@ public class KillCommand extends VanillaCommand {
|
||||
Bukkit.getPluginManager().callEvent(ede);
|
||||
if (ede.isCancelled()) return true;
|
||||
|
||||
ede.getEntity().setLastDamageCause(ede);
|
||||
player.damage(ede.getDamage());
|
||||
} else {
|
||||
sender.sendMessage("You can only perform this command as a player");
|
||||
|
Reference in New Issue
Block a user