mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Don't blindly check cancel status for all damage
If fall damage is disabled via another plugin like WorldGuard, abilities like Shockwave can't function upon landing. Plus, there's already a lot of checks for event.isCancelled, so don't see a reason to do a check for the entire event.
This commit is contained in:
parent
e9ee121574
commit
d242ecd1fc
1 changed files with 1 additions and 4 deletions
|
@ -732,11 +732,8 @@ public class PKListener implements Listener {
|
||||||
event.setFormat(format);
|
event.setFormat(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void onPlayerDamage(EntityDamageEvent event) {
|
public void onPlayerDamage(EntityDamageEvent event) {
|
||||||
if (event.isCancelled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.getEntity() instanceof Player) {
|
if (event.getEntity() instanceof Player) {
|
||||||
Player player = (Player) event.getEntity();
|
Player player = (Player) event.getEntity();
|
||||||
|
|
Loading…
Reference in a new issue