mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Merge pull request #4235 from kn-km/patch-1
Fix McMMOPlayerSalvageCheckEvent Handling
This commit is contained in:
commit
7828437414
@ -100,7 +100,6 @@ public class SalvageManager extends SkillManager {
|
||||
|
||||
potentialSalvageYield = Math.min(potentialSalvageYield, getSalvageLimit()); // Always get at least something back, if you're capable of salvaging it.
|
||||
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
|
||||
location.add(0.5, 1, 0.5);
|
||||
|
||||
Map<Enchantment, Integer> enchants = item.getEnchantments();
|
||||
@ -140,6 +139,8 @@ public class SalvageManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
|
||||
|
||||
Location anvilLoc = location.clone();
|
||||
Location playerLoc = player.getLocation().clone();
|
||||
double distance = anvilLoc.distance(playerLoc);
|
||||
|
Loading…
Reference in New Issue
Block a user