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

@ -37,7 +37,11 @@ public class AlchemyBrewTask extends BukkitRunnable {
brewSpeed = DEFAULT_BREW_SPEED;
brewTimer = DEFAULT_BREW_TICKS;
if (player != null && !Misc.isNPCEntity(player) && Permissions.isSubSkillEnabled(player, SubSkillType.ALCHEMY_CATALYSIS)) {
if (player != null
&& !Misc.isNPCEntity(player)
&& Permissions.isSubSkillEnabled(player, SubSkillType.ALCHEMY_CATALYSIS)
&& UserManager.getPlayer(player) != null) {
double catalysis = UserManager.getPlayer(player).getAlchemyManager().calculateBrewSpeed(Permissions.lucky(player, PrimarySkillType.ALCHEMY));
McMMOPlayerCatalysisEvent event = new McMMOPlayerCatalysisEvent(player, catalysis);