allow fill gui item to be air
instead of printing error on stats failure, just print a warning
This commit is contained in:
@@ -117,7 +117,7 @@ public class Rankup extends JavaPlugin {
|
||||
try {
|
||||
new Stats().init(this);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
getLogger().warning("Could not connect to stats server");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,10 @@ public class Gui implements InventoryHolder {
|
||||
item = new ItemStack(material);
|
||||
}
|
||||
|
||||
if(item.getType() == Material.AIR && section.getName().equalsIgnoreCase("fill")) {
|
||||
return item;
|
||||
}
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (section.contains("lore")) {
|
||||
meta.setLore(Arrays.stream(format(section.getString("lore"), player, oldRank, rank).split("\n"))
|
||||
|
||||
Reference in New Issue
Block a user