Advertisement
Lisenochek

Untitled

Sep 4th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. package com.realistic.tempeture;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Location;
  5. import org.bukkit.block.Biome;
  6. import org.bukkit.entity.Player;
  7.  
  8. import com.realistic.list.MinecraftList;
  9.  
  10. public class tempetureAPI {
  11.  
  12. private static MinecraftList ml;
  13.  
  14. public tempetureAPI(MinecraftList ml) {
  15. this.ml = ml;
  16. }
  17.  
  18. public static void callScheulder() {
  19.  
  20. for (Player ps : Bukkit.getOnlinePlayers()) {
  21.  
  22. while (Bukkit.getOnlinePlayers().size() > 0) {
  23.  
  24. Location loc = ps.getLocation();
  25. Biome b = loc.getWorld().getBiome(loc.getBlockX(), loc.getBlockZ());
  26.  
  27. if (b.DESERT != null) {
  28.  
  29. if (ml.temp.keySet().contains(ps)) {
  30.  
  31. ml.temp.put(ps, 1);
  32.  
  33. } else {
  34.  
  35. int current = ml.temp.get(ps).intValue();
  36. current++;
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement