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'
|
group 'sh.okx'
|
||||||
version '3.0-alpha.17'
|
version '3.0-alpha.19'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class Rankup extends JavaPlugin {
|
|||||||
try {
|
try {
|
||||||
new Stats().init(this);
|
new Stats().init(this);
|
||||||
} catch (IOException e) {
|
} 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);
|
item = new ItemStack(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(item.getType() == Material.AIR && section.getName().equalsIgnoreCase("fill")) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
if (section.contains("lore")) {
|
if (section.contains("lore")) {
|
||||||
meta.setLore(Arrays.stream(format(section.getString("lore"), player, oldRank, rank).split("\n"))
|
meta.setLore(Arrays.stream(format(section.getString("lore"), player, oldRank, rank).split("\n"))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: Rankup
|
name: Rankup
|
||||||
version: 3.0-alpha.17
|
version: 3.0-alpha.19
|
||||||
main: sh.okx.rankup.Rankup
|
main: sh.okx.rankup.Rankup
|
||||||
author: Okx
|
author: Okx
|
||||||
depend: [Vault]
|
depend: [Vault]
|
||||||
|
|||||||
Reference in New Issue
Block a user