mcMMO now checks in all places for a loaded profile before executing processing on said profile

This commit is contained in:
nossr50
2019-04-12 15:17:05 -07:00
parent 00cc5f0845
commit 33a68daa9c
62 changed files with 560 additions and 21 deletions

View File

@ -93,6 +93,11 @@ public final class AlchemyPotionBrewer {
}
private static List<ItemStack> getValidIngredients(Player player) {
if(UserManager.getPlayer(player) != null)
{
return PotionConfig.getInstance().getIngredients(1);
}
return PotionConfig.getInstance().getIngredients((player == null || !Permissions.isSubSkillEnabled(player, SubSkillType.ALCHEMY_CONCOCTIONS)) ? 1 : UserManager.getPlayer(player).getAlchemyManager().getTier());
}
@ -142,6 +147,7 @@ public final class AlchemyPotionBrewer {
if (output != null && player != null) {
PotionStage potionStage = PotionStage.getPotionStage(input, output);
//TODO: hmm
if (UserManager.hasPlayerDataKey(player)) {
UserManager.getPlayer(player).getAlchemyManager().handlePotionBrewSuccesses(potionStage, 1);
}