some docs to explain things

This commit is contained in:
YouHaveTrouble
2020-08-19 14:14:04 +02:00
parent b5c9edd1be
commit 6736c9437e
2 changed files with 7 additions and 0 deletions
@@ -9,6 +9,10 @@ import org.bukkit.event.Listener;
public class WolfAttackPlayerListener implements Listener { public class WolfAttackPlayerListener implements Listener {
/**
* Wolves stop following player with pvp off after trying to hit them
* This is to fix any inconsistancy with wolf behaviour
*/
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onWolfAttack(org.bukkit.event.entity.EntityDamageByEntityEvent event) { public void onWolfAttack(org.bukkit.event.entity.EntityDamageByEntityEvent event) {
if (event.getDamager() instanceof Wolf) { if (event.getDamager() instanceof Wolf) {
@@ -10,6 +10,9 @@ import org.bukkit.event.Listener;
public class WolfTargettingListener implements Listener { public class WolfTargettingListener implements Listener {
/**
* Stops wolves with owners targetting players with pvp off
*/
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onWolfTarget(org.bukkit.event.entity.EntityTargetEvent event) { public void onWolfTarget(org.bukkit.event.entity.EntityTargetEvent event) {
if (event.getEntity() instanceof Wolf) { if (event.getEntity() instanceof Wolf) {