Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to 1.4.6 bukkit and fix fall damage.
- Loading branch information
Showing
4 changed files
with
83 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 11 additions & 15 deletions
26
src/main/java/jadedwolf/plugins/nofarm/NoFarmEntityListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
package jadedwolf.plugins.nofarm; | ||
|
||
import org.bukkit.entity.Entity; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.entity.EntityDeathEvent; | ||
import org.bukkit.event.entity.EntityDamageByEntityEvent; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.entity.EntityDamageEvent; | ||
|
||
|
||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.entity.EntityDamageByEntityEvent; | ||
import org.bukkit.event.entity.EntityDeathEvent; | ||
|
||
public class NoFarmEntityListener implements Listener { | ||
|
||
public NoFarmEntityListener(NoFarm instance) { | ||
} | ||
public NoFarmEntityListener(NoFarm instance) { | ||
} | ||
|
||
@EventHandler | ||
public void onEntityDeath(EntityDeathEvent event) { | ||
if(!(event.getEntity() instanceof Player) && !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent)) { | ||
event.setDroppedExp(0); | ||
event.getDrops().clear(); | ||
@EventHandler | ||
public void onEntityDeath(EntityDeathEvent event) { | ||
if (!(event.getEntity() instanceof Player) && !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent)) { | ||
event.setDroppedExp(0); | ||
event.getDrops().clear(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters