Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Cheese 2015-11-24 21:30:45 +11:00
commit 7e2f5f0657
2 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public class VitalitySpores extends Skill
@EventHandler @EventHandler
public void playerMove(PlayerMoveEvent event) public void playerMove(PlayerMoveEvent event)
{ {
if (UtilMath.offset(event.getFrom(), event.getTo()) > 0) if (doesUserHaveSkill(event.getPlayer()) && UtilMath.offset(event.getFrom(), event.getTo()) > 0)
_lastMove.put(event.getPlayer(), System.currentTimeMillis()); _lastMove.put(event.getPlayer(), System.currentTimeMillis());
} }
@ -71,6 +71,6 @@ public class VitalitySpores extends Skill
@Override @Override
public void Reset(Player player) public void Reset(Player player)
{ {
_lastMove.remove(player);
} }
} }

View File

@ -257,6 +257,11 @@ public abstract class Skill implements ISkill, Listener
return null; return null;
} }
protected boolean doesUserHaveSkill(Player player)
{
return _users.containsKey(player);
}
@Override @Override
public Set<Player> GetUsers() public Set<Player> GetUsers()
{ {