9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2026-01-04 15:31:47 +00:00

Added API to take over actionbars

This commit is contained in:
XiaoMoMi
2024-12-26 18:14:06 +08:00
parent 23bde6ab9d
commit 0270830517
13 changed files with 138 additions and 3 deletions

View File

@@ -160,6 +160,8 @@ public class ActionBarSender implements Feature {
if (isTemporarilyHidden()) return;
if (latestContent != null) {
updateLastUpdateTime();
// do not send if other plugins have taken over the actionbar
if (!owner.shouldCNTakeOverActionBar()) return;
Object packet = CustomNameplates.getInstance().getPlatform().setActionBarTextPacket(AdventureHelper.miniMessageToMinecraftComponent(latestContent, "nameplates", "actionbar"));
CustomNameplates.getInstance().getPacketSender().sendPacket(owner, packet);
}

View File

@@ -41,7 +41,6 @@ import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.*;
public class ResourcePackManagerImpl implements ResourcePackManager {

View File

@@ -36,6 +36,10 @@ integrations:
Essentials: false # Integration with Essentials chat
ChatControlRed: false # Integration with ChatControlRed
Chatty: false # Integration with Chatty
# Let typewriter take over actionbar on certain events
typewriter:
dialogue: true
cinematic: true
# Resource Pack Generation Settings: Configure resource pack generation behavior.
resource-pack: