allow fill gui item to be air
instead of printing error on stats failure, just print a warning
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'sh.okx'
|
||||
version '3.0-alpha.17'
|
||||
version '3.0-alpha.19'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Rankup
|
||||
version: 3.0-alpha.17
|
||||
version: 3.0-alpha.19
|
||||
main: sh.okx.rankup.Rankup
|
||||
author: Okx
|
||||
depend: [Vault]
|
||||
|
||||
Reference in New Issue
Block a user