Merge pull request #92 in MIN/mineplex from update-SSM to master
* commit '504a49278cb7e140029e4c2ceb85f3defe524a33': SSM kit description change, grammar mistake SSM Pig bomb bug fix
This commit is contained in:
commit
0b8e0409b6
@ -1,5 +1,7 @@
|
||||
package mineplex.core.common.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
@ -496,6 +498,20 @@ public class UtilPlayer
|
||||
return best;
|
||||
}
|
||||
|
||||
private static boolean checkClosest(Player player, Entity... ignore)
|
||||
{
|
||||
for(Entity e : ignore)
|
||||
{
|
||||
if(e instanceof Player)
|
||||
{
|
||||
if(e == player)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Player getClosest(Location loc, Entity... ignore)
|
||||
{
|
||||
Player best = null;
|
||||
@ -509,6 +525,9 @@ public class UtilPlayer
|
||||
if (cur.isDead())
|
||||
continue;
|
||||
|
||||
if(checkClosest(cur, ignore))
|
||||
continue;
|
||||
|
||||
if (ignore != null)
|
||||
{
|
||||
for (int i = 0; i < ignore.length; i++)
|
||||
|
@ -62,7 +62,7 @@ public class KitPig extends SmashKit
|
||||
ChatColor.RESET + "dealing damage and knockback to enemies.",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Eat the bacon to restore some Energy.",
|
||||
ChatColor.RESET + "Bacon that hit an enemy will restore Health.",
|
||||
ChatColor.RESET + "Bacon that hits an enemy will restore Health.",
|
||||
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user