Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ReportsGUI {
- FileConfiguration c = Mainxd.Mainxd.config.getConfig();
- public static ItemStack c(String s, Material m, List<String> lore){
- ItemCreatorAPI a = TheAPI.getItemCreatorAPI(m);
- a.setDisplayName(s);
- a.setLore(lore);
- return a.create();
- }
- public void reportsGUImain(Player p) {
- for(String names: c.getConfigurationSection("reports").getKeys(false)){
- for(String id: c.getConfigurationSection("reports." + names + ".get").getKeys(false)){
- for(String ids: c.getConfigurationSection("reports." + p.getName() + ".get." + id).getKeys(false)){
- String reason = c.getString("reports." + ids + ".reason");
- String reporter = c.getString("reports." + ids + ".reporter");
- String reported = c.getString("reports." + ids + ".reported");
- HashMap<Options, Object> w = new HashMap<Options, Object>();
- GUICreatorAPI guiREP = TheAPI.getGUICreatorAPI(p);
- guiREP.setTitle("§4§lSelect §f§la §4§lreport§f§l.");
- guiREP.setSize(54);
- for(Player s: Bukkit.getOnlinePlayers()) {
- w.remove(Options.RUNNABLE);
- w.put(Options.CANT_PUT_ITEM, true);
- w.put(Options.CANT_BE_TAKEN, true);
- w.put(Options.RUNNABLE, new Runnable(){
- @Override
- public void run(){
- }
- });
- guiREP.addItem(c(reported, Material.CHEST, Arrays.asList("", "§fReported For: " + reason, "§fReported By: " + reporter)), w);
- }
- guiREP.open();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement