mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Almost completed SQL handling
This commit is contained in:
1 parent
b95629a986
commit
cf1ffdb611
9 files changed
+488
-89
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package me.william278.huskhomes2;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
|
||||
public class runEverySecond {
|
||||
|
||||
private static Main plugin = Main.getInstance();
|
||||
|
||||
// HashMap mapping teleportation times to players
|
||||
public static HashMap<Player,Integer> teleportationTimer = new HashMap<>();
|
||||
|
||||
public runEverySecond() {
|
||||
BukkitScheduler scheduler = getServer().getScheduler();
|
||||
|
||||
// Run every second
|
||||
scheduler.scheduleSyncRepeatingTask(plugin, () -> {
|
||||
for (Player p : teleportationTimer.keySet()) {
|
||||
|
||||
}
|
||||
}, 0L, 20L);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user