mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +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;
|
public ProjectKorra plugin;
|
||||||
|
|
||||||
|
long time;
|
||||||
|
long interval;
|
||||||
|
|
||||||
ArrayList<World> worlds = new ArrayList<World>();
|
ArrayList<World> worlds = new ArrayList<World>();
|
||||||
ConcurrentHashMap<World, Boolean> nights = new ConcurrentHashMap<World, Boolean>();
|
ConcurrentHashMap<World, Boolean> nights = new ConcurrentHashMap<World, Boolean>();
|
||||||
ConcurrentHashMap<World, Boolean> days = 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) {
|
public BendingManager(ProjectKorra plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
time = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
interval = System.currentTimeMillis() - time;
|
||||||
|
time = System.currentTimeMillis();
|
||||||
|
ProjectKorra.time_step = interval;
|
||||||
|
|
||||||
AirPassive.handlePassive(Bukkit.getServer());
|
AirPassive.handlePassive(Bukkit.getServer());
|
||||||
ChiPassive.handlePassive();
|
ChiPassive.handlePassive();
|
||||||
WaterPassive.handlePassive();
|
WaterPassive.handlePassive();
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.projectkorra.ProjectKorra;
|
package com.projectkorra.ProjectKorra;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -12,6 +10,7 @@ import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager;
|
||||||
|
|
||||||
public class ProjectKorra extends JavaPlugin {
|
public class ProjectKorra extends JavaPlugin {
|
||||||
|
|
||||||
|
public static long time_step = 1;
|
||||||
public static ProjectKorra plugin;
|
public static ProjectKorra plugin;
|
||||||
public static Logger log;
|
public static Logger log;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue