Kewilleen

Untitled

Nov 21st, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. for (String tags : cnf.getConfigurationSection("Tags.GUI.Tags").getKeys(false)) {
  2.                         id = cnf.getInt("Tags.GUI.Tags." + tags + ".ID");
  3.                         for (String tag : m.getConfigurationSection("Tags").getKeys(false)) {
  4.                             List<String> jogadores = m.getStringList("Tags." + tag + ".Usuarios");
  5.                             if (click.getTypeId() == id) {
  6.                                 if (!jogadores.contains(pp)) {
  7.                                     jogadores.add(pp);
  8.                                     m.set("Tags." + tag + ".Usuarios", jogadores);
  9.                                     KwConfig.saveFile();
  10.                                     p.sendMessage(KwMetodos.getReplaced("Selecionou").replace("{tag}", tags));
  11.                                     p.closeInventory();
  12.                                     e.setCancelled(true);
  13.                                 } else {
  14.                                     jogadores.remove(pp);
  15.                                     m.set("Tags." + tag + ".Usuarios", jogadores);
  16.                                     KwConfig.saveFile();
  17.                                     p.sendMessage(KwMetodos.getReplaced("Removida").replace("{tag}", tags));
  18.                                     p.closeInventory();
  19.                                     e.setCancelled(true);
  20.                                 }
  21.                             }
  22.                         }
  23.                     }
Advertisement
Add Comment
Please, Sign In to add comment