From b9e5096d335706d6d237a6b0a302140ff7ede91f Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Tue, 27 Jun 2023 09:43:56 -0500 Subject: [PATCH] feat: actionbar when player has hidden cosmetics --- .../java/com/hibiscusmc/hmccosmetics/user/CosmeticUser.java | 1 + common/src/main/resources/messages.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/user/CosmeticUser.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/user/CosmeticUser.java index 66df56a8..fd4a31b9 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/user/CosmeticUser.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/user/CosmeticUser.java @@ -59,6 +59,7 @@ public class CosmeticUser { Runnable run = () -> { MessagesUtil.sendDebugMessages("Tick[uuid=" + uniqueId + "]", Level.INFO); updateCosmetic(); + if (getHidden()) MessagesUtil.sendActionBar(getPlayer(), "hidden-cosmetics"); }; int tickPeriod = Settings.getTickPeriod(); diff --git a/common/src/main/resources/messages.yml b/common/src/main/resources/messages.yml index 32b6b734..bb292dca 100644 --- a/common/src/main/resources/messages.yml +++ b/common/src/main/resources/messages.yml @@ -1,3 +1,8 @@ +# +# Messages.yml File +# If you don't wish for a message to be sent, simply make it blank. +# + prefix: "HMCCosmetics ยป" reloaded: "%prefix% Config files reloaded!" not-enough-args: "%prefix% Improper amount of arguments" @@ -20,6 +25,7 @@ equip-cosmetic: "%prefix% You have equipped unequip-cosmetic: "%prefix% You have unequipped !" hide-cosmetic: "%prefix% Hidden cosmetics" show-cosmetic: "%prefix% Revealed cosmetics!" +hidden-cosmetics: "%prefix% Your cosmetics are hidden!" emote-blocked: "%prefix% You can not use your emote here!" emote-none: "%prefix% You have no emote equipped!"