Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void runDebugPanel() {
- new BukkitRunnable() {
- Player player = getPlayer();
- BPlayerBoard board = Netherboard.instance().createBoard(player, Utils.stripColor("&f&lMC&c&lRust &7- &a" + Main.plugin.getDescription().getVersion()));
- @Override
- public void run() {
- if (!playersMap.containsKey(playerName)) {
- board.delete();
- cancel();
- return;
- }
- if (CustomWorld.getCustomWorld().getWorld() != player.getWorld()) return;
- Cupboard cupboard = Cupboard.fromLocation(player.getLocation().getBlock().getLocation());
- Radtown radtown = Radtown.fromLocation(player.getLocation().getBlock().getLocation());
- boolean isBuilding;
- int slot = 14;
- isBuilding = cupboard == null ? radtown == null : cupboard.getOwnersList().contains(player.getUniqueId());
- for (String s : new String[]{
- (cupboard != null || radtown != null ? "&6» &7Строительство: " + (isBuilding ? "&aразрешено" : "&cзапрещено") : null),
- cupboard != null || radtown != null ? " " : null,
- "&6» " + "&a&l&nЗдоровье&a&l: " + (healthRegen == 0 ? "" : "&7(" + (healthRegen > 0 ? "&a+" + healthRegen : "&c" + healthRegen) + "&7)"),
- "&6» &7(&a" + (int) player.getHealth() + "&7) " + (Utils.generateLine(15, (int) player.getHealth(), 100, "&a&l", "&2&l")),
- "&6» " + "&b&l&nВода&b&l:",
- "&6» &7(&a" + water + "&7) " + (Utils.generateLine(15, water, 250, "&b&l", "&3&l")),
- "&6» " + "&e&l&nГолод&e&l:",
- "&6» &7(&a" + food + "&7) " + (Utils.generateLine(15, food, 500, "&e&l", "&6&l")),
- (radiation != 0 || bloodingCount != 0 || temperature <= 0 || temperature >= 30 ? " " : null),
- radiation != 0 ? "&6» &c&lРадиация &7[&c&l" + radiation + "&7]" : null,
- bloodingCount != 0 ? "&6» &c&lТечет кровь! - &7[&c&l" + bloodingCount + "&7]" : null,
- temperature <= 0 ? "&6» &e&lМне холодно! - &7[&b&l" + temperature + "℃&7]" : temperature >= 30 ? "&6» &e&lМне жарко! - &7[&6&l+" + temperature + "℃&7]" : null,
- " ",
- "&6» &7Координаты » &a" + player.getLocation().getBlockX() + " " + player.getLocation().getBlockY() + " " + player.getLocation().getBlockZ(),
- }) {
- if (s == null) continue;
- board.set(Utils.stripColor(s), slot);
- --slot;
- }
- }
- }.runTaskTimer(Main.plugin, 1, 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement