Fixed coloring of leather armor sets so that they do not error out with

bows.
This commit is contained in:
sigonasr2 2017-01-08 23:34:44 -06:00
parent c7375a24b7
commit fd495c8ea5
3 changed files with 21 additions and 20 deletions

View File

@ -6,6 +6,5 @@
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/AutoPluginUpdate.jar"/> <classpathentry kind="lib" path="D:/Documents/Test Server/plugins/AutoPluginUpdate.jar"/>
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/GlowAPI_v1.4.4.jar"/> <classpathentry kind="lib" path="D:/Documents/Test Server/plugins/GlowAPI_v1.4.4.jar"/>
<classpathentry kind="lib" path="D:/Documents/Test Server/spigot-1.9.2-R0.1-SNAPSHOT.jar"/> <classpathentry kind="lib" path="D:/Documents/Test Server/spigot-1.9.2-R0.1-SNAPSHOT.jar"/>
<classpathentry kind="src" path="/AutoPluginUpdate"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

Binary file not shown.

View File

@ -3457,6 +3457,7 @@ public class GenericFunctions {
} }
public static void ConvertSetColor(ItemStack item, ItemSet set) { public static void ConvertSetColor(ItemStack item, ItemSet set) {
if (item.getType().name().contains("LEATHER_")) {
if (set==ItemSet.JAMDAK) { if (set==ItemSet.JAMDAK) {
LeatherArmorMeta lm = (LeatherArmorMeta)item.getItemMeta(); LeatherArmorMeta lm = (LeatherArmorMeta)item.getItemMeta();
lm.setColor(org.bukkit.Color.fromRGB(128, 64, 0)); lm.setColor(org.bukkit.Color.fromRGB(128, 64, 0));
@ -3478,6 +3479,7 @@ public class GenericFunctions {
item.setItemMeta(lm); item.setItemMeta(lm);
} }
} }
}
public static ExperienceOrb spawnXP(Location location, int expAmount) { public static ExperienceOrb spawnXP(Location location, int expAmount) {
ExperienceOrb orb = location.getWorld().spawn(location, ExperienceOrb.class); ExperienceOrb orb = location.getWorld().spawn(location, ExperienceOrb.class);