From 8d7706b9e08a3360b9345c0ed3a5abe58d9bf916 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 3 Mar 2020 11:08:34 +1300 Subject: [PATCH] Add libsdisguises.noactionbar --- pom.xml | 2 +- .../java/me/libraryaddict/disguise/disguisetypes/Disguise.java | 1 + src/main/resources/plugin.yml | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78b4ac25..1b51efd2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ LibsDisguises LibsDisguises - 9.9.8 + 9.9.8-SNAPSHOT exec:java clean install diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index 9e0094cf..4691a316 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -175,6 +175,7 @@ public abstract class Disguise { actionBarTicks = 0; if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player && + !getEntity().hasPermission("libsdisguises.noactionbar") && DisguiseAPI.getDisguise(getEntity()) == Disguise.this) { ((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder(LibsMsg.ACTION_BAR_MESSAGE.get(getType().toReadable())).create()); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 846675c6..258c8743 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -110,6 +110,9 @@ permissions: default: true libsdisguises.scoreboardtest: description: Test if the scoreboard is valid, this is a simple test. + libsdisguises.noactionbar: + description: Hides the action bar even if enabled in config + default: false libsdisguises.seecmd: description: See all commands in tab-completion default: true