From 5410e8dd04bc3d80812e94bc7e7dfb52e14787e6 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 3 Feb 2020 18:37:32 +1300 Subject: [PATCH] Dont send action bar every tick --- .../me/libraryaddict/disguise/disguisetypes/Disguise.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index ee2c4484..6d260ce6 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -175,11 +175,11 @@ public abstract class Disguise { @Override public void run() { if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player && - actionBarTicks++ % 20 == 0) { + ++actionBarTicks % 20 == 0) { actionBarTicks = 0; - ((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder("") - .appendLegacy(LibsMsg.ACTION_BAR_MESSAGE.get(getType().toReadable())).create()); + ((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR, + new ComponentBuilder(LibsMsg.ACTION_BAR_MESSAGE.get(getType().toReadable())).create()); } // If entity is no longer valid. Remove it.