mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Double check that a Player is not an NPC when loading profiles
This commit is contained in:
@ -30,6 +30,11 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
||||
// DO NOT MODIFY THE McMMOPLAYER FROM THIS CODE
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (Misc.isNPCIncludingVillagers(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Quit if they logged out
|
||||
if (!player.isOnline()) {
|
||||
mcMMO.p.getLogger().info("Aborting profile loading recovery for " + player.getName() + " - player logged out");
|
||||
|
@ -38,7 +38,7 @@ public class AlchemyBrewTask extends BukkitRunnable {
|
||||
brewTimer = DEFAULT_BREW_TICKS;
|
||||
|
||||
if (player != null
|
||||
&& !Misc.isNPCEntity(player)
|
||||
&& !Misc.isNPCEntityExcludingVillagers(player)
|
||||
&& Permissions.isSubSkillEnabled(player, SubSkillType.ALCHEMY_CATALYSIS)
|
||||
&& UserManager.getPlayer(player) != null) {
|
||||
|
||||
|
Reference in New Issue
Block a user