Duel System / InGame - In queue

Discussion in 'Spigot Plugin Development' started by Frealy1995, Jun 16, 2016.

  1. Hello, I coding a 1v1 plugin, I have a one questions.

    The image my Unranked 1v1 gui.
    [​IMG]



    This is Badlion Server unranked 1v1 gui

    [​IMG]




    How to add, In game and In queue ? Please basic example. (Hashmap or ArrayList etz.) Thanks!
     
  2. You can use:
    Code (Text):

    ItemStack itemStack = new ItemStack(Material.Bucket);
    ItemMeta itemMeta = itemStack.getItemMeta();
    itemMeta.setDisplayName("§aIronBuildUHC");
    ArrayList<String> lore = new ArrayList();
    lore.add("§2In game: " + ingame);
    lore.add("§2In queue: " + queue);
    itemMeta.setLore(lore);
    item.setItemMeta(itemMeta);

     
     
    • Funny Funny x 1
  3. LOL

    I already know lore! I request not lore. ingame and queue logic.
     
  4. well you should fill the number of ingame players and the number of players in queue and put them in the variables ingame and queue in the code simagdo suggested.
    How to get these numbers depends on what mini-game you are talking about. I guess you mean some mini-game, if not just do getOnlinePlayers().size() to get the number of all players online on the server.
     
    • Like Like x 1
  5. Thanks,

    Example: Hashmap = PlayerJoin kit = SGHashmap = +1 Match end to -1 thanks.
     
  6. One way to do that would be with a couple of custom objects, like ArenaMatch to store a list of the players and whatnot and ArenaPlayer to store the player and their kit etc.
     
    • Agree Agree x 1
  7. Why you continue posting the same things in 3 different threads...