mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Some optimizations
As suggested by @bm01 in issue #19: - Pass PlayerProfile and current time to monitorSkills - Pass PlayerProfile and current time to watchCooldowns Testing with only one player seems to indicate a near-negligible increase in performance, but could be useful with more users online.
This commit is contained in:
@ -37,6 +37,7 @@ public class mcTimer implements Runnable
|
||||
|
||||
public void run()
|
||||
{
|
||||
long curTime = System.currentTimeMillis();
|
||||
for(Player player : plugin.getServer().getOnlinePlayers())
|
||||
{
|
||||
if(player == null)
|
||||
@ -49,12 +50,12 @@ public class mcTimer implements Runnable
|
||||
/*
|
||||
* MONITOR SKILLS
|
||||
*/
|
||||
Skills.monitorSkills(player);
|
||||
Skills.monitorSkills(player, PP, curTime);
|
||||
|
||||
/*
|
||||
* COOLDOWN MONITORING
|
||||
*/
|
||||
Skills.watchCooldowns(player);
|
||||
Skills.watchCooldowns(player, PP, curTime);
|
||||
|
||||
/*
|
||||
* PLAYER BLEED MONITORING
|
||||
|
Reference in New Issue
Block a user