Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. public class ReportsGUI {
  2. FileConfiguration c = Mainxd.Mainxd.config.getConfig();
  3.  
  4. public static ItemStack c(String s, Material m, List<String> lore){
  5. ItemCreatorAPI a = TheAPI.getItemCreatorAPI(m);
  6. a.setDisplayName(s);
  7. a.setLore(lore);
  8. return a.create();
  9. }
  10.  
  11. public void reportsGUImain(Player p) {
  12. for(String names: c.getConfigurationSection("reports").getKeys(false)){
  13. for(String id: c.getConfigurationSection("reports." + names + ".get").getKeys(false)){
  14. for(String ids: c.getConfigurationSection("reports." + p.getName() + ".get." + id).getKeys(false)){
  15.  
  16. String reason = c.getString("reports." + ids + ".reason");
  17. String reporter = c.getString("reports." + ids + ".reporter");
  18. String reported = c.getString("reports." + ids + ".reported");
  19.  
  20. HashMap<Options, Object> w = new HashMap<Options, Object>();
  21. GUICreatorAPI guiREP = TheAPI.getGUICreatorAPI(p);
  22. guiREP.setTitle("§4§lSelect §f§la §4§lreport§f§l.");
  23. guiREP.setSize(54);
  24. for(Player s: Bukkit.getOnlinePlayers()) {
  25. w.remove(Options.RUNNABLE);
  26. w.put(Options.CANT_PUT_ITEM, true);
  27. w.put(Options.CANT_BE_TAKEN, true);
  28. w.put(Options.RUNNABLE, new Runnable(){
  29. @Override
  30. public void run(){
  31.  
  32. }
  33. });
  34. guiREP.addItem(c(reported, Material.CHEST, Arrays.asList("", "§fReported For: " + reason, "§fReported By: " + reporter)), w);
  35. }
  36. guiREP.open();
  37.  
  38. }
  39. }
  40. }
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement