mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fixed Beast Lore not working, fixes #771
This commit is contained in:
parent
d3ec976f44
commit
b779258d69
@ -16,6 +16,7 @@ Version 1.4.01-dev
|
|||||||
= Fixed bug where the wrong flag was being set when taking damage
|
= Fixed bug where the wrong flag was being set when taking damage
|
||||||
= Fixed bug where the PTP cooldown was set improperly
|
= Fixed bug where the PTP cooldown was set improperly
|
||||||
= Fixed bug where ptp permissions weren't being handled properly
|
= Fixed bug where ptp permissions weren't being handled properly
|
||||||
|
= Fixed bug where Beast Lore wouldn't work
|
||||||
|
|
||||||
Version 1.4.00
|
Version 1.4.00
|
||||||
+ Added new Child Skill - Smelting!
|
+ Added new Child Skill - Smelting!
|
||||||
|
@ -61,14 +61,19 @@ public final class CombatUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target instanceof Tameable && isFriendlyPet(player, (Tameable) target)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack heldItem = player.getItemInHand();
|
ItemStack heldItem = player.getItemInHand();
|
||||||
Material heldItemType = heldItem.getType();
|
|
||||||
|
|
||||||
if (ItemUtils.isSword(heldItem)) {
|
if (target instanceof Tameable) {
|
||||||
|
if (heldItem.getType() == Material.BONE && Permissions.beastLore(player)) {
|
||||||
|
SkillManagerStore.getInstance().getTamingManager(player.getName()).beastLore(target);
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (isFriendlyPet(player, (Tameable) target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ItemUtils.isSword(heldItem)) {
|
||||||
if (targetIsPlayer || targetIsTamedPet) {
|
if (targetIsPlayer || targetIsTamedPet) {
|
||||||
if (!SkillType.SWORDS.getPVPEnabled()) {
|
if (!SkillType.SWORDS.getPVPEnabled()) {
|
||||||
return;
|
return;
|
||||||
@ -133,7 +138,7 @@ public final class CombatUtils {
|
|||||||
startGainXp(axeManager.getMcMMOPlayer(), target, SkillType.AXES);
|
startGainXp(axeManager.getMcMMOPlayer(), target, SkillType.AXES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (heldItemType == Material.AIR) {
|
else if (heldItem.getType() == Material.AIR) {
|
||||||
if (targetIsPlayer || targetIsTamedPet) {
|
if (targetIsPlayer || targetIsTamedPet) {
|
||||||
if (!SkillType.UNARMED.getPVPEnabled()) {
|
if (!SkillType.UNARMED.getPVPEnabled()) {
|
||||||
return;
|
return;
|
||||||
@ -173,9 +178,6 @@ public final class CombatUtils {
|
|||||||
startGainXp(mcMMOPlayer, target, SkillType.UNARMED);
|
startGainXp(mcMMOPlayer, target, SkillType.UNARMED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (heldItemType == Material.BONE && target instanceof Tameable && Permissions.beastLore(player)) {
|
|
||||||
SkillManagerStore.getInstance().getTamingManager(player.getName()).beastLore(target);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (damager.getType()) {
|
switch (damager.getType()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user