Add libsdisguises.noactionbar

This commit is contained in:
libraryaddict 2020-03-03 11:08:34 +13:00
parent 3f0fa4e8c1
commit 8d7706b9e0
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
3 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@
<!-- A good example on why temporary names for project identification shouldn't be used --> <!-- A good example on why temporary names for project identification shouldn't be used -->
<groupId>LibsDisguises</groupId> <groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId> <artifactId>LibsDisguises</artifactId>
<version>9.9.8</version> <version>9.9.8-SNAPSHOT</version>
<build> <build>
<defaultGoal>exec:java clean install</defaultGoal> <defaultGoal>exec:java clean install</defaultGoal>

View File

@ -175,6 +175,7 @@ public abstract class Disguise {
actionBarTicks = 0; actionBarTicks = 0;
if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player && if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player &&
!getEntity().hasPermission("libsdisguises.noactionbar") &&
DisguiseAPI.getDisguise(getEntity()) == Disguise.this) { DisguiseAPI.getDisguise(getEntity()) == Disguise.this) {
((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR, ((Player) getEntity()).spigot().sendMessage(ChatMessageType.ACTION_BAR,
new ComponentBuilder(LibsMsg.ACTION_BAR_MESSAGE.get(getType().toReadable())).create()); new ComponentBuilder(LibsMsg.ACTION_BAR_MESSAGE.get(getType().toReadable())).create());

View File

@ -110,6 +110,9 @@ permissions:
default: true default: true
libsdisguises.scoreboardtest: libsdisguises.scoreboardtest:
description: Test if the scoreboard is valid, this is a simple test. 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: libsdisguises.seecmd:
description: See all commands in tab-completion description: See all commands in tab-completion
default: true default: true