Improved SkillMonitorTask

This commit is contained in:
bm01 2013-03-08 02:03:25 +01:00
parent 03d0ecd450
commit cd4c328320

View File

@ -1,12 +1,8 @@
package com.gmail.nossr50.runnables.skills; package com.gmail.nossr50.runnables.skills;
import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.AbilityType;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.skills.SkillUtils;
@ -15,13 +11,7 @@ public class SkillMonitorTask implements Runnable {
public void run() { public void run() {
long curTime = System.currentTimeMillis(); long curTime = System.currentTimeMillis();
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) { for (McMMOPlayer mcMMOPlayer : UserManager.getPlayers().values()) {
if (Misc.isNPCEntity(player)) {
continue;
}
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
/* /*
* MONITOR SKILLS * MONITOR SKILLS
*/ */