mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Warn console when using old Vault versions. Bump version number
This commit is contained in:
parent
50b32d5f3e
commit
ef9297910c
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>2.7.4</version>
|
||||
<version>2.7.5</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -7,6 +7,7 @@ import me.blackvein.quests.Quester;
|
||||
import me.blackvein.quests.Quests;
|
||||
import net.milkbowl.vault.item.Items;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -212,12 +213,17 @@ public class ItemUtil implements ColorUtil {
|
||||
|
||||
public static String getName(ItemStack is) {
|
||||
|
||||
String text;
|
||||
String text = "";
|
||||
|
||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName();
|
||||
} else {
|
||||
text = AQUA + Items.itemByStack(is).getName();
|
||||
try {
|
||||
text = AQUA + Items.itemByStack(is).getName();
|
||||
} catch (NullPointerException ne) {
|
||||
Bukkit.getLogger().severe("This error is caused by an incompatible version of Vault. Please update!");
|
||||
ne.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
|
Loading…
Reference in New Issue
Block a user