Solved BossBar

Discussion in 'Spigot Plugin Development' started by gianluca91, Apr 25, 2017.

Thread Status:
Not open for further replies.
  1. Code (Text):
    package ru.gianluca91.autoMessage;

    import java.io.File;
    import java.util.List;
    import java.util.Set;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import net.minecraft.server.v1_8_R3.*;
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Server;
    import org.bukkit.boss.BarColor;
    import org.bukkit.boss.BarFlag;
    import org.bukkit.boss.BarStyle;
    import org.bukkit.boss.BossBar;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.configuration.ConfigurationSection;
    import org.bukkit.configuration.file.FileConfiguration;
    import org.bukkit.configuration.file.YamlConfiguration;
    import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.Plugin;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.scheduler.BukkitRunnable;
    import org.bukkit.scheduler.BukkitScheduler;

    public class AutoBroadcast
      extends JavaPlugin
      implements Listener
    {
      File f;
      File actionbarFile;
      FileConfiguration actionbarConfig;
      File chatFile;
      FileConfiguration chatConfig;
      File titleFile;
      FileConfiguration titleConfig;
      File dragonbarFile;
      FileConfiguration dragonbarConfig;
      File langFile;
      FileConfiguration langConfig;
      File READMEFile;
      public Plugin plugin = this;
     
      public void onEnable()
      {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
        saveDefaultConfig();
       
        this.plugin = this;
        this.f = new File(getDataFolder() + "/AutoMessage");
        if (!this.f.exists()) {
          this.f.mkdirs();
        }
        this.actionbarFile = new File(getDataFolder() + "/AutoMessage", "actionbar.yml");
        if (!this.actionbarFile.exists()) {
          saveResource("AutoMessage/actionbar.yml", false);
        }
        this.chatFile = new File(getDataFolder() + "/AutoMessage", "chat.yml");
        if (!this.chatFile.exists()) {
          saveResource("AutoMessage/chat.yml", false);
        }
        this.titleFile = new File(getDataFolder() + "/AutoMessage", "title.yml");
        if (!this.titleFile.exists()) {
          saveResource("AutoMessage/title.yml", false);
        }
        this.dragonbarFile = new File(getDataFolder() + "/AutoMessage", "dragonbar.yml");
        if (!this.dragonbarFile.exists()) {
          saveResource("AutoMessage/dragonbar.yml", false);
        }
        this.READMEFile = new File(getDataFolder(), "READ-ME.yml");
        if (!this.READMEFile.exists()) {
          saveResource("READ-ME.yml", false);
        }
        this.langFile = new File(getDataFolder(), "lang.yml");
        if (!this.langFile.exists()) {
          saveResource("lang.yml", false);
        }
        this.actionbarConfig = YamlConfiguration.loadConfiguration(this.actionbarFile);
        this.chatConfig = YamlConfiguration.loadConfiguration(this.chatFile);
        this.titleConfig = YamlConfiguration.loadConfiguration(this.titleFile);
        this.dragonbarConfig = YamlConfiguration.loadConfiguration(this.dragonbarFile);
        this.langConfig = YamlConfiguration.loadConfiguration(this.langFile);
       
        autoActionBar();
        autoTitle();
        autoChat();
        autoDragonbar();
      }
     
      public void onDisable()
      {
        this.plugin = null;
      }
     
      public int actionBarNumber = -1;
      public int titleNumber = -1;
      public int dragonBarNumber = -1;
      public int chatNumber = -1;
      public int actionBarNumber1 = -1;
      public int titleNumber1 = -1;
      public int dragonBarNumber1 = -1;
     
      public void autoActionBar()
      {
        if (this.actionbarConfig.getBoolean("enabled")) {
          Bukkit.getScheduler().scheduleAsyncRepeatingTask(this.plugin, new Runnable()
          {
            public void run()
            {
              if (AutoBroadcast.this.actionBarNumber + 1 >= AutoBroadcast.this.actionbarConfig.getConfigurationSection("messages").getKeys(false).size()) {
                AutoBroadcast.this.actionBarNumber = -1;
              }
              AutoBroadcast.this.actionBarNumber += 1;
              new BukkitRunnable()
              {
                public void run()
                {
                  if (AutoBroadcast.this.actionBarNumber1 + 1 >= AutoBroadcast.this.actionbarConfig.getList("messages." + Integer.toString(AutoBroadcast.this.actionBarNumber + 1) + ".messages").size())
                  {
                    AutoBroadcast.this.actionBarNumber1 = -1;
                    PacketPlayOutChat packet = new PacketPlayOutChat(
                      IChatBaseComponent.ChatSerializer.a("{\"text\":\"\"}"), (byte)2);
                    for (Player p : Bukkit.getOnlinePlayers()) {
                      ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
                    }
                    cancel();
                    return;
                  }
                  AutoBroadcast.this.actionBarNumber1 += 1;
                  List<String> s = AutoBroadcast.this.actionbarConfig
                    .getStringList("messages." + Integer.toString(AutoBroadcast.this.actionBarNumber + 1) + ".messages");
                  String st = (String)s.get(AutoBroadcast.this.actionBarNumber1);
                  st = ChatColor.translateAlternateColorCodes('&', st);
                  PacketPlayOutChat packet = new PacketPlayOutChat(
                    IChatBaseComponent.ChatSerializer.a("{\"text\":\"" + st + "\"}"), (byte)2);
                  for (Player p : Bukkit.getOnlinePlayers()) {
                    ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
                  }
                }
              }.runTaskTimer(AutoBroadcast.this.plugin, 0L,
                AutoBroadcast.this.actionbarConfig.getInt("messages." + Integer.toString(AutoBroadcast.this.actionBarNumber + 1) + ".delay"));
            }
          }, 0L, 20 * this.actionbarConfig.getInt("time"));
        }
      }
     
      public void autoTitle()
      {
        if (this.titleConfig.getBoolean("enabled")) {
          Bukkit.getScheduler().scheduleAsyncRepeatingTask(this.plugin, new Runnable()
          {
            public void run()
            {
              if (AutoBroadcast.this.titleNumber + 1 >= AutoBroadcast.this.titleConfig.getConfigurationSection("messages").getKeys(false).size()) {
                AutoBroadcast.this.titleNumber = -1;
              }
              AutoBroadcast.this.titleNumber += 1;
              new BukkitRunnable()
              {
                public void run()
                {
                  if (AutoBroadcast.this.titleNumber1 + 1 >= AutoBroadcast.this.titleConfig.getList("messages." + Integer.toString(AutoBroadcast.this.titleNumber + 1) + ".messages").size())
                  {
                    AutoBroadcast.this.titleNumber1 = -1;
                    PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE,
                      IChatBaseComponent.ChatSerializer.a("{\"text\":\"\"}"), 1, 1, 1);
                    for (Player p : Bukkit.getOnlinePlayers()) {
                      ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
                    }
                    cancel();
                    return;
                  }
                  AutoBroadcast.this.titleNumber1 += 1;
                  List<String> s = AutoBroadcast.this.titleConfig
                    .getStringList("messages." + Integer.toString(AutoBroadcast.this.titleNumber + 1) + ".messages");
                  String st = (String)s.get(AutoBroadcast.this.titleNumber1);
                  st = ChatColor.translateAlternateColorCodes('&', st);
                  PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE,
                    IChatBaseComponent.ChatSerializer.a("{\"text\":\"" + st + "\"}"), 0,
                    AutoBroadcast.this.titleConfig.getInt("messages." + Integer.toString(AutoBroadcast.this.titleNumber + 1) + ".delay"), 0);
                  for (Player p : Bukkit.getOnlinePlayers()) {
                    ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
                  }
                }
              }.runTaskTimer(AutoBroadcast.this.plugin, 0L,
                AutoBroadcast.this.titleConfig.getInt("messages." + Integer.toString(AutoBroadcast.this.titleNumber + 1) + ".delay"));
            }
          }, 0L, 20 * this.titleConfig.getInt("time"));
        }
      }
     
      public void autoChat()
      {
        if (this.chatConfig.getBoolean("enabled")) {
          Bukkit.getScheduler().scheduleAsyncRepeatingTask(this.plugin, new Runnable()
          {
            public void run()
            {
              if (AutoBroadcast.this.chatNumber + 1 >= AutoBroadcast.this.chatConfig.getConfigurationSection("messages").getKeys(false).size()) {
                AutoBroadcast.this.chatNumber = -1;
              }
              AutoBroadcast.this.chatNumber += 1;
              StringBuilder sb = new StringBuilder();
              List<String> list = AutoBroadcast.this.chatConfig.getStringList("messages." + Integer.toString(AutoBroadcast.this.chatNumber + 1) + ".message");
              for (String s : list) {
                sb.append(s).append("\n");
              }
              String s = sb.toString();
              Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', s));
            }
          }, 0L, 20 * this.chatConfig.getInt("time"));
        }
      }
     
      public void autoDragonbar()
      {
        if (this.dragonbarConfig.getBoolean("enabled")) {
          Bukkit.getScheduler().scheduleAsyncRepeatingTask(this.plugin, new Runnable()
          {
            public void run()
            {
              if (AutoBroadcast.this.dragonBarNumber + 1 >= AutoBroadcast.this.dragonbarConfig.getConfigurationSection("messages").getKeys(false).size()) {
                AutoBroadcast.this.dragonBarNumber = -1;
              }
              AutoBroadcast.this.dragonBarNumber += 1;
              new BukkitRunnable()
              {
                public void run()
                {
                  if (AutoBroadcast.this.dragonBarNumber1 + 1 >= AutoBroadcast.this.dragonbarConfig.getList("messages." + Integer.toString(AutoBroadcast.this.dragonBarNumber + 1) + ".messages").size())
                  {
                    AutoBroadcast.this.dragonBarNumber1 = -1;
                   
                    cancel();
                    return;
                  }
                  AutoBroadcast.this.dragonBarNumber1 += 1;
                  List<String> s = AutoBroadcast.this.dragonbarConfig
                    .getStringList("messages." + Integer.toString(AutoBroadcast.this.dragonBarNumber + 1) + ".messages");
                  String st = (String)s.get(AutoBroadcast.this.dragonBarNumber1);
                  st = ChatColor.translateAlternateColorCodes('&', st);
                 
                  BossBar bar = AutoBroadcast.this.bossBar(st, BarColor.PURPLE);
                  AutoBroadcast.this.giveBossbar(bar, AutoBroadcast.this.dragonbarConfig
                    .getInt("messages." + Integer.toString(AutoBroadcast.this.dragonBarNumber + 1) + ".delay"));
                }
              }.runTaskTimer(AutoBroadcast.this.plugin, 0L,
                AutoBroadcast.this.dragonbarConfig.getInt("messages." + Integer.toString(AutoBroadcast.this.dragonBarNumber + 1) + ".delay"));
            }
          }, 0L, 20 * this.dragonbarConfig.getInt("time"));
        }
      }
     
      public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
      {
        if ((sender instanceof Player))
        {
          Player p = (Player)sender;
          if ((label.equalsIgnoreCase("broadcast")) || (label.equalsIgnoreCase("bc"))) {
            if ((p.hasPermission("automessage.*")) || (p.hasPermission("automessage.broadcast")))
            {
              if (args.length == 0) {
                p.sendMessage("/broadcast <type> <message>");
              } else if (args.length == 1) {
                p.sendMessage("/broadcast <type> <message>");
              } else if (args.length >= 2) {
                if (args.length == 2)
                {
                  if (args[0].equalsIgnoreCase("actionbar"))
                  {
                    PacketPlayOutChat packet = actionBar(ChatColor.translateAlternateColorCodes('&', args[1]));
                    sendPacket(packet);
                  }
                  else if (args[0].equalsIgnoreCase("title"))
                  {
                    PacketPlayOutTitle packet = title(ChatColor.translateAlternateColorCodes('&', args[1]));
                    sendPacket(packet);
                  }
                  else if (args[0].equalsIgnoreCase("chat"))
                  {
                    Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', args[1]));
                  }
                  else if ((args[0].equalsIgnoreCase("bossbar")) || (args[0].equalsIgnoreCase("dragonbar")))
                  {
                    BossBar bar = bossBar(ChatColor.translateAlternateColorCodes('&', args[1]), BarColor.PURPLE);
                    giveBossbar(bar, 100);
                  }
                  else
                  {
                    p.sendMessage(ChatColor.translateAlternateColorCodes('&',
                      this.langConfig.getString("unknown-broadcast-type")));
                  }
                }
                else if (args.length >= 3)
                {
                  StringBuilder sb = new StringBuilder();
                  for (int i = 1; i < args.length; i++) {
                    sb.append(args[i]).append(" ");
                  }
                  String s = sb.toString();
                  if (args[0].equalsIgnoreCase("actionbar"))
                  {
                    PacketPlayOutChat packet = actionBar(ChatColor.translateAlternateColorCodes('&', s));
                    sendPacket(packet);
                  }
                  else if (args[0].equalsIgnoreCase("title"))
                  {
                    PacketPlayOutTitle packet = title(ChatColor.translateAlternateColorCodes('&', s));
                    sendPacket(packet);
                  }
                  else if (args[0].equalsIgnoreCase("chat"))
                  {
                    Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', s));
                  }
                  else if ((args[0].equalsIgnoreCase("bossbar")) || (args[0].equalsIgnoreCase("dragonbar")))
                  {
                    BossBar bar = bossBar(ChatColor.translateAlternateColorCodes('&', args[1]),
                      BarColor.PURPLE);
                    giveBossbar(bar, 100);
                  }
                  else
                  {
                    p.sendMessage(ChatColor.translateAlternateColorCodes('&',
                      this.langConfig.getString("unknown-broadcast-type")));
                  }
                }
              }
            }
            else {
              p.sendMessage(ChatColor.translateAlternateColorCodes('&', this.langConfig.getString("nopermission")));
            }
          }
        }
        else
        {
          Bukkit.getLogger().log(Level.SEVERE, "[AutoMessagePlus] Only Players Can Use These Commands.");
        }
        return true;
      }
     
      public IChatBaseComponent json(String s)
      {
        return IChatBaseComponent.ChatSerializer.a("{\"text\":\"" + s + "\"}");
      }
     
      public void sendPacket(Player p, Packet<?> packet)
      {
        ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
      }
     
      public void sendPacket(Packet<?> packet)
      {
        for (Player p : Bukkit.getOnlinePlayers()) {
          ((CraftPlayer)p).getHandle().playerConnection.sendPacket((Packet) packet);
        }
      }
     
      public PacketPlayOutTitle title(String s)
      {
        PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE,
          IChatBaseComponent.ChatSerializer.a("{\"text\":\"" + s + "\"}"));
        return packet;
      }
     
      public PacketPlayOutTitle title(IChatBaseComponent text)
      {
        PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, text);
        return packet;
      }
     
      public PacketPlayOutChat actionBar(String s)
      {
        PacketPlayOutChat packet = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a("{\"text\":\"" + s + "\"}"), (byte)2);
        return packet;
      }
     
      public PacketPlayOutChat actionBar(IChatBaseComponent text)
      {
        PacketPlayOutChat packet = new PacketPlayOutChat(text, (byte)2);
        return packet;
      }
     
      public BossBar bossBar(String s)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, BarColor.BLUE, BarStyle.SOLID, new BarFlag[0]);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarColor color)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, color, BarStyle.SOLID, new BarFlag[0]);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarColor color, BarStyle style)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, color, style, new BarFlag[0]);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarStyle style)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, BarColor.BLUE, style, new BarFlag[0]);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarColor color, BarFlag... flag)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, color, BarStyle.SOLID, flag);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarColor color, BarStyle style, BarFlag... flag)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, color, style, flag);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarStyle style, BarFlag... flag)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = Bukkit.createBossBar(s, BarColor.BLUE, style, flag);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public BossBar bossBar(String s, BarFlag... flag)
      {
        s = ChatColor.translateAlternateColorCodes('&', s);
        BossBar bb = (BossBar)Bukkit.createBossBar(s, BarColor.BLUE, BarStyle.SOLID, flag);
        bb.setProgress(1.0D);
        return bb;
      }
     
      public void giveBossbar(BossBar bar, Player p)
      {
        bar.addPlayer(p);
      }
     
      public void giveBossbar(BossBar bar)
      {
        for (Player p : Bukkit.getOnlinePlayers()) {
          bar.addPlayer(p);
        }
      }
     
      public void giveBossbar(final BossBar bar, final Player p, int time)
      {
        bar.addPlayer(p);
        Bukkit.getScheduler().scheduleAsyncDelayedTask(this, new Runnable()
        {
          public void run()
          {
            bar.removePlayer(p);
          }
        }, time);
      }
     
      public void giveBossbar(final BossBar bar, int time)
      {
        for (Player p : Bukkit.getOnlinePlayers()) {
          bar.addPlayer(p);
        }
        Bukkit.getScheduler().scheduleAsyncDelayedTask(this, new Runnable()
        {
          public void run()
          {
            bar.removeAll();
          }
        }, time);
      }
     
      public void removeBossbar(BossBar bar, Player p)
      {
        bar.removePlayer(p);
      }
     
      public void removeBossbar(BossBar bar)
      {
        bar.removeAll();
      }
    }
     
    Hello, I have one problem. I have an error on Bukkit.createBossBar () Do not tell me what I did wrong.
     
  2. omg so many code lines ( would be better next time to post only the stuff that you have an issue with. ) could you also give us the error ?

    Edit: Mentioned the thing with your bossBar, because you have like 4 or more constructors just for the boss bar and your class is a bit filled up with random code
     
  3. Choco

    Moderator

    Sooo... what do you want us to do? Lol...
    "I'm not understanding how to use Bukkit#createBossBar(), what am I doing wrong? But don't tell me. Just let me figure it out!"

    Oooookayyyyy....
     
  4. Sorry, I do not know much English.What did I do wrong.
     
  5. Choco

    Moderator

    Haha that's fine. The phrasing of your initial sentence just doesn't make all that much sense. I understand that English may not be a maternal language ;)

    Considering you have this import, if I'm not mistaken, the BossBar API isn't even available. It was only added in early development of Minecraft 1.9. It would really help if you could show us or tell us what the error is telling you
    EDIT: It seems like you have imports for the various "org.bukkit.boss" packages, so are you using an up-to-date API? If you show us the error, we can tell you what's wrong
     
  6. Well ... here you go:

    You used this, what do you wanna get from it ? a new class instance from the BarFlag with the 0 object?
    Code (Text):

    new BarFlag[0];
     
    Code (Text):

    I think you tried to use BarFlag.values()[0];
     
    And note, you use a 1.8 library ( the new boss bar system has been added on 1.9 and later )
     
    • Winner Winner x 1
  7. [QUOTE = "2008Choco, должность: 2378970, член: 31119"] Ха-ха, это хорошо. Формулировка вашего первоначального предложения просто не делает все, что много смысла. Я понимаю, что английский язык не может быть материнским языком;)


    Учитывая, у вас есть этот импорт, если я не ошибаюсь, BossBar API не доступна даже. Она была добавлена только в начале развития Minecraft 1.9. Было бы очень полезно, если вы могли бы показать нам или сказать нам, что ошибка говорит вам [/ QUOTE]
    231232131.png
     
  8. that seems to be that the createBossBar method isn't available in 1.8, it has been added on 1.9 and later ( you need to update your spigot dependencies )
     
  9. Choco

    Moderator

    Nope. The parameter type of that method requires varargs (BarFlag... flags), in which he is initializing an array of BarFlag constants. This is correct syntax, though it's unnecessary. Typically, decompilers will do this.

    Could you please hover over the error so we can see what it is? (I would hope the error is in English so it's at least readable to us). If it's in Russian, could you please translate then copy and paste it here
     
  10. You see, if I replace library 1.10, it still marks it as an error.
     
  11. [QUOTE = "2008Choco, пост: 2378977, член: 31119"] Нет. Тип параметра этого метода требует (BarFlag с переменным числом аргументов ... флаги), в котором он инициализирует массив BarFlag констант. Это правильный синтаксис, хотя в этом нет необходимости. Как правило, декомпиляторов будет делать это.


    Не могли бы вы, пожалуйста, наведите курсор мыши на ошибку, поэтому мы можем увидеть, что это такое? (Я надеюсь, что ошибка на английском языке, так что, по крайней мере для чтения к нам). Если это по-русски, не могли бы вы перевести затем скопировать и вставить его здесь [/ QUOTE]
    231232131.png
     
  12. Choco

    Moderator

    No no, don't double click. Just hovering over it with your mouse cursor without having it selected ^-^
     
  13. have you updated the imports too?
     
  14. [QUOTE = "Phloxz, должность: 2378989, член: 26121"]? Вы обновляли импорт тоже [/ QUOTE]
    Да,
    импорт net.minecraft.server.v1_10_R1.EntityPlayer;
    импорт net.minecraft.server.v1_10_R1.IChatBaseComponent;
    импорт net.minecraft.server.v1_10_R1.IChatBaseComponent.ChatSerializer;
    импорт net.minecraft.server.v1_10_R1.Packet;
    импорт net.minecraft.server.v1_10_R1.PacketPlayOutChat;
    импорт net.minecraft.server.v1_10_R1.PacketPlayOutTitle;
    импорт net.minecraft.server.v1_10_R1.PacketPlayOutTitle.EnumTitleAction;
    импорт net.minecraft.server.v1_10_R1.PlayerConnection;
     
  15. [QUOTE = "2008Choco, должность: 2378987, член: 31119"] Нет, нет, не двойной щелчок. Просто парит над ним с помощью курсора мыши без него выбран ^ - ^ [/ QUOTE]
    231232131.png
     
  16. Eh there's no import for the BossBar class yet, all i see are some imports for titles and actionbar's
     
  17. try to use "BarFlag.CREATE_FOG" (For Example) instead of "new BarFlag[0]"
     
  18. import org.bukkit.boss.BarColor;
    import org.bukkit.boss.BarFlag;
    import org.bukkit.boss.BarStyle;
    import org.bukkit.boss.BossBar;
     
  19. What should I do?
     
Thread Status:
Not open for further replies.