mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed Alchemy XP Gain
This commit is contained in:
parent
cb89a80fd8
commit
bdfac28b44
@ -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
|
||||
|
@ -178,20 +178,18 @@ 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();
|
||||
|
||||
if(furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).size() > 0)
|
||||
furnaceBlock.removeMetadata(mcMMO.furnaceMetadataKey, mcMMO.p);
|
||||
Block furnaceBlock = processInventoryOpenOrCloseEvent(event.getInventory());
|
||||
|
||||
furnaceBlock.setMetadata(mcMMO.furnaceMetadataKey, UserManager.getPlayer(player).getPlayerMetadata());
|
||||
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)) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user