Fixed Alchemy XP Gain

This commit is contained in:
nossr50 2019-01-31 18:44:51 -08:00
parent cb89a80fd8
commit bdfac28b44
3 changed files with 10 additions and 10 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal
Version 2.1.4
Fixed a bug where Alchemy didn't gain XP
Temporarily disabled Flux Mining
Removed XP from entities that target endermite to prevent easy exploitation (Credits to TheBentoBox for the tip!) [Can be turned off in experience.yml]
Fixed a bug where static chance skills like Arcane Salvage were using incorrect calculations for success

View File

@ -178,21 +178,19 @@ public class InventoryListener implements Listener {
Inventory inventory = event.getInventory();
Block furnaceBlock = processInventoryOpenOrCloseEvent(event.getInventory());
if (furnaceBlock == null) {
return;
}
if(event.getWhoClicked() instanceof Player)
{
Player player = ((Player) event.getWhoClicked()).getPlayer();
Block furnaceBlock = processInventoryOpenOrCloseEvent(event.getInventory());
if (furnaceBlock != null)
{
if (furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).size() > 0)
furnaceBlock.removeMetadata(mcMMO.furnaceMetadataKey, mcMMO.p);
furnaceBlock.setMetadata(mcMMO.furnaceMetadataKey, UserManager.getPlayer(player).getPlayerMetadata());
}
}
if (!(inventory instanceof BrewerInventory)) {
return;

View File

@ -8,6 +8,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.SkillManager;
import com.gmail.nossr50.util.StringUtils;
import com.gmail.nossr50.util.skills.RankUtils;