mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
feat: hook into hooks to check invisibility
This commit is contained in:
@@ -80,7 +80,7 @@ allprojects {
|
|||||||
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.12")
|
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.12")
|
||||||
//compileOnly("it.unimi.dsi:fastutil:8.5.14")
|
//compileOnly("it.unimi.dsi:fastutil:8.5.14")
|
||||||
compileOnly("org.projectlombok:lombok:1.18.34")
|
compileOnly("org.projectlombok:lombok:1.18.34")
|
||||||
compileOnly("me.lojosho:HibiscusCommons:0.6.0-0a688635")
|
compileOnly("me.lojosho:HibiscusCommons:0.6.0-85d65299")
|
||||||
|
|
||||||
// Handled by Spigot Library Loader
|
// Handled by Spigot Library Loader
|
||||||
compileOnly("net.kyori:adventure-api:4.18.0")
|
compileOnly("net.kyori:adventure-api:4.18.0")
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ public class CosmeticUser {
|
|||||||
// Occasionally updates the entity cosmetics
|
// Occasionally updates the entity cosmetics
|
||||||
Runnable run = () -> {
|
Runnable run = () -> {
|
||||||
MessagesUtil.sendDebugMessages("Tick[uuid=" + uniqueId + "]", Level.INFO);
|
MessagesUtil.sendDebugMessages("Tick[uuid=" + uniqueId + "]", Level.INFO);
|
||||||
|
if (Hooks.isInvisible(uniqueId)) hideCosmetics(HiddenReason.VANISH);
|
||||||
|
else showCosmetics(HiddenReason.VANISH);
|
||||||
updateCosmetic();
|
updateCosmetic();
|
||||||
if (isHidden() && !getUserEmoteManager().isPlayingEmote() && !getCosmetics().isEmpty()) MessagesUtil.sendActionBar(getPlayer(), "hidden-cosmetics");
|
if (isHidden() && !getUserEmoteManager().isPlayingEmote() && !getCosmetics().isEmpty()) MessagesUtil.sendActionBar(getPlayer(), "hidden-cosmetics");
|
||||||
};
|
};
|
||||||
@@ -692,6 +694,7 @@ public class CosmeticUser {
|
|||||||
NONE,
|
NONE,
|
||||||
WORLDGUARD,
|
WORLDGUARD,
|
||||||
PLUGIN,
|
PLUGIN,
|
||||||
|
VANISH,
|
||||||
POTION,
|
POTION,
|
||||||
ACTION,
|
ACTION,
|
||||||
COMMAND,
|
COMMAND,
|
||||||
|
|||||||
Reference in New Issue
Block a user