mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +00:00
time_step / Intervals
This commit is contained in:
parent
b45846be68
commit
a050d86886
2 changed files with 9 additions and 2 deletions
|
@ -23,6 +23,9 @@ public class BendingManager implements Runnable {
|
|||
|
||||
public ProjectKorra plugin;
|
||||
|
||||
long time;
|
||||
long interval;
|
||||
|
||||
ArrayList<World> worlds = new ArrayList<World>();
|
||||
ConcurrentHashMap<World, Boolean> nights = new ConcurrentHashMap<World, Boolean>();
|
||||
ConcurrentHashMap<World, Boolean> days = new ConcurrentHashMap<World, Boolean>();
|
||||
|
@ -34,10 +37,15 @@ public class BendingManager implements Runnable {
|
|||
|
||||
public BendingManager(ProjectKorra plugin) {
|
||||
this.plugin = plugin;
|
||||
time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
interval = System.currentTimeMillis() - time;
|
||||
time = System.currentTimeMillis();
|
||||
ProjectKorra.time_step = interval;
|
||||
|
||||
AirPassive.handlePassive(Bukkit.getServer());
|
||||
ChiPassive.handlePassive();
|
||||
WaterPassive.handlePassive();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.projectkorra.ProjectKorra;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -12,6 +10,7 @@ import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager;
|
|||
|
||||
public class ProjectKorra extends JavaPlugin {
|
||||
|
||||
public static long time_step = 1;
|
||||
public static ProjectKorra plugin;
|
||||
public static Logger log;
|
||||
|
||||
|
|
Loading…
Reference in a new issue