Lisenochek

Untitled

Sep 12th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public void chunkCheck() {
  2.  
  3. for (Player p : Bukkit.getOnlinePlayers()) {
  4.  
  5. Location loc = p.getLocation();
  6. Chunk chunk = loc.getChunk();
  7.  
  8. int x = commonSignalLocation.getBlockX();
  9. int y = commonSignalLocation.getBlockY();
  10. int z = commonSignalLocation.getBlockZ();
  11.  
  12. BukkitRunnable run = new BukkitRunnable() {
  13.  
  14. public void run() {
  15.  
  16. if (chunk.isLoaded()) {
  17. if (MinecraftList.signalLoc.containsKey(commonSignalLocation)) {
  18. if (chunk.getBlock(x, y, z) != null) {
  19.  
  20. }
  21. }
  22. }
  23. }
  24. };
  25. run.runTaskTimer(API.getInstance(), 1, 100);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment