Advertisement
Lisenochek

Untitled

Dec 12th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. public void runDebugPanel() {
  2.  
  3. new BukkitRunnable() {
  4.  
  5. Player player = getPlayer();
  6. BPlayerBoard board = Netherboard.instance().createBoard(player, Utils.stripColor("&f&lMC&c&lRust &7- &a" + Main.plugin.getDescription().getVersion()));
  7.  
  8. @Override
  9. public void run() {
  10.  
  11. if (!playersMap.containsKey(playerName)) {
  12. board.delete();
  13. cancel();
  14. return;
  15. }
  16.  
  17. if (CustomWorld.getCustomWorld().getWorld() != player.getWorld()) return;
  18.  
  19. Cupboard cupboard = Cupboard.fromLocation(player.getLocation().getBlock().getLocation());
  20. Radtown radtown = Radtown.fromLocation(player.getLocation().getBlock().getLocation());
  21. boolean isBuilding;
  22. int slot = 14;
  23.  
  24. isBuilding = cupboard == null ? radtown == null : cupboard.getOwnersList().contains(player.getUniqueId());
  25.  
  26. for (String s : new String[]{
  27. (cupboard != null || radtown != null ? "&6» &7Строительство: " + (isBuilding ? "&aразрешено" : "&cзапрещено") : null),
  28. cupboard != null || radtown != null ? " " : null,
  29. "&6» " + "&a&l&nЗдоровье&a&l: " + (healthRegen == 0 ? "" : "&7(" + (healthRegen > 0 ? "&a+" + healthRegen : "&c" + healthRegen) + "&7)"),
  30. "&6» &7(&a" + (int) player.getHealth() + "&7) " + (Utils.generateLine(15, (int) player.getHealth(), 100, "&a&l", "&2&l")),
  31. "&6» " + "&b&l&nВода&b&l:",
  32. "&6» &7(&a" + water + "&7) " + (Utils.generateLine(15, water, 250, "&b&l", "&3&l")),
  33. "&6» " + "&e&l&nГолод&e&l:",
  34. "&6» &7(&a" + food + "&7) " + (Utils.generateLine(15, food, 500, "&e&l", "&6&l")),
  35. (radiation != 0 || bloodingCount != 0 || temperature <= 0 || temperature >= 30 ? " " : null),
  36. radiation != 0 ? "&6» &c&lРадиация &7[&c&l" + radiation + "&7]" : null,
  37. bloodingCount != 0 ? "&6» &c&lТечет кровь! - &7[&c&l" + bloodingCount + "&7]" : null,
  38. temperature <= 0 ? "&6» &e&lМне холодно! - &7[&b&l" + temperature + "℃&7]" : temperature >= 30 ? "&6» &e&lМне жарко! - &7[&6&l+" + temperature + "℃&7]" : null,
  39. " ",
  40. "&6» &7Координаты » &a" + player.getLocation().getBlockX() + " " + player.getLocation().getBlockY() + " " + player.getLocation().getBlockZ(),
  41. }) {
  42. if (s == null) continue;
  43. board.set(Utils.stripColor(s), slot);
  44. --slot;
  45. }
  46. }
  47. }.runTaskTimer(Main.plugin, 1, 1);
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement