Action bar every 15 ticks, only if current disguise is main disguise

This commit is contained in:
libraryaddict 2020-02-04 16:07:47 +13:00
parent 4af9da10c5
commit 7f2de5194f
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -175,7 +175,7 @@ public abstract class Disguise {
@Override
public void run() {
if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player &&
++actionBarTicks % 20 == 0) {
++actionBarTicks % 15 == 0 && DisguiseAPI.getDisguise(getEntity()) == Disguise.this) {
actionBarTicks = 0;
((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR,