Fix bossbar not working when mypet is not enabled
This commit is contained in:
parent
687e063ad9
commit
d179384954
|
|
@ -117,7 +117,7 @@ public class AFKPlayer {
|
|||
}
|
||||
|
||||
public void warnPlayer(Player player) {
|
||||
if (AFKDetector.myPetEnabled) updateBossBarProgress(Config.TOGGLE_TIME);
|
||||
updateBossBarProgress(Config.TOGGLE_TIME);
|
||||
if (isWarned)
|
||||
return;
|
||||
bossBar.setColor(BarColor.PURPLE);
|
||||
|
|
@ -133,6 +133,7 @@ public class AFKPlayer {
|
|||
}
|
||||
|
||||
void sendPetAway() {
|
||||
if (!AFKDetector.myPetEnabled) return;
|
||||
MyPetPlayer myPetPlayer = MyPetApi.getPlayerManager().getMyPetPlayer(player);
|
||||
|
||||
if (myPetPlayer == null || !myPetPlayer.hasMyPet() || !myPetPlayer.getMyPet().getStatus().equals(MyPet.PetState.Here))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user