Remove unused sitPets method in MAUtils.
This method was superseded by the SitPets join/leave step.
This commit is contained in:
@@ -15,9 +15,7 @@ import org.bukkit.block.Sign;
|
|||||||
import org.bukkit.block.data.Rotatable;
|
import org.bukkit.block.data.Rotatable;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Ocelot;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Wolf;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
@@ -81,37 +79,6 @@ public class MAUtils
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ///////////////////////////////////////////////////////////////////// //
|
|
||||||
|
|
||||||
PET CLASS METHODS
|
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////////////////////// */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes all nearby wolves sit if their owner is the given player.
|
|
||||||
*/
|
|
||||||
public static void sitPets(Player p)
|
|
||||||
{
|
|
||||||
if (p == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
List<Entity> entities = p.getNearbyEntities(80, 40, 80);
|
|
||||||
for (Entity e : entities)
|
|
||||||
{
|
|
||||||
if (e instanceof Wolf) {
|
|
||||||
Wolf w = (Wolf) e;
|
|
||||||
if (w.isTamed() && w.getOwner() != null && w.getOwner().equals(p))
|
|
||||||
w.setSitting(true);
|
|
||||||
} else if (e instanceof Ocelot) {
|
|
||||||
Ocelot o = (Ocelot) e;
|
|
||||||
if (o.isTamed() && o.getOwner() != null && o.getOwner().equals(p))
|
|
||||||
o.setSitting(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ///////////////////////////////////////////////////////////////////// //
|
/* ///////////////////////////////////////////////////////////////////// //
|
||||||
|
|
||||||
MISC METHODS
|
MISC METHODS
|
||||||
|
|||||||
Reference in New Issue
Block a user