mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixing a bug where an entity dealing 0 damage still earned experience.
This commit is contained in:
parent
4a52135a0b
commit
c3c7fe08b6
@ -57,9 +57,11 @@ public class EntityListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
||||
if (event instanceof FakeEntityDamageByEntityEvent) {
|
||||
if (event instanceof FakeEntityDamageByEntityEvent)
|
||||
return;
|
||||
|
||||
if(event.getDamage() <= 0)
|
||||
return;
|
||||
}
|
||||
|
||||
Entity attacker = event.getDamager();
|
||||
Entity defender = event.getEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user