Support new enchantents, fixes #348. Bump version number

This commit is contained in:
HappyPikachu 2016-06-22 00:32:43 -04:00
parent 523032053e
commit 9cc4a97ae0
6 changed files with 14 additions and 5 deletions

Binary file not shown.

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>2.6.4</version>
<version>2.6.5</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -491,7 +491,8 @@ public class PlayerListener implements Listener, ColorUtil {
if (quester.hasObjective(quest, "breakBlock")) {
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
quester.breakBlock(quest, evt.getBlock().getType());
}

View File

@ -2023,7 +2023,13 @@ public class Quester {
}
public static String enchantmentString(Enchantment e) {
if (Lang.get("ENCHANTMENT_" + e.getName()).equals("NULL")) {
Bukkit.getLogger().warning(e.getName() + " was not found in Lang.yml, please ask the developer to "
+ "update the file or simply add an entry for the enchantment");
return "ENCHANTMENT_" + e.getName();
}
return (Lang.get("ENCHANTMENT_" + e.getName()));
}

View File

@ -5182,7 +5182,7 @@ try{
return Enchantment.WATER_WORKER;
} else {
System.out.println("");
return null;
}

View File

@ -973,16 +973,18 @@ public class Lang {
langMap.put("ENCHANTMENT_ARROW_KNOCKBACK", "Punch");
langMap.put("ENCHANTMENT_DAMAGE_ALL", "Sharpness");
langMap.put("ENCHANTMENT_DAMAGE_ARTHROPODS", "BaneOfArthropods");
langMap.put("ENCHANTMENT_DEPTH_STRIDER", "Depth Strider");
langMap.put("ENCHANTMENT_DEPTH_STRIDER", "DepthStrider");
langMap.put("ENCHANTMENT_DAMAGE_UNDEAD", "Smite");
langMap.put("ENCHANTMENT_DIG_SPEED", "Efficiency");
langMap.put("ENCHANTMENT_DURABILITY", "Unbreaking");
langMap.put("ENCHANTMENT_FIRE_ASPECT", "FireAspect");
langMap.put("ENCHANTMENT_FROST_WALKER", "FrostWalker");
langMap.put("ENCHANTMENT_KNOCKBACK", "Knockback");
langMap.put("ENCHANTMENT_LOOT_BONUS_BLOCKS", "Fortune");
langMap.put("ENCHANTMENT_LOOT_BONUS_MOBS", "Looting");
langMap.put("ENCHANTMENT_LUCK", "LuckOfTheSea");
langMap.put("ENCHANTMENT_LURE", "Lure");
langMap.put("ENCHANTMENT_MENDING", "Mending");
langMap.put("ENCHANTMENT_OXYGEN", "Respiration");
langMap.put("ENCHANTMENT_PROTECTION_ENVIRONMENTAL", "Protection");
langMap.put("ENCHANTMENT_PROTECTION_EXPLOSIONS", "BlastProtection");