9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-28 19:29:17 +00:00

better support

This commit is contained in:
XiaoMoMi
2024-11-19 16:46:01 +08:00
parent 001ecd28ed
commit 3df6d66efb
8 changed files with 135 additions and 59 deletions

View File

@@ -25,6 +25,7 @@ import net.momirealms.customnameplates.api.feature.tag.NameTagConfig;
import net.momirealms.customnameplates.api.feature.tag.Tag;
import net.momirealms.customnameplates.api.feature.tag.TagRenderer;
import net.momirealms.customnameplates.api.feature.tag.UnlimitedTagManager;
import net.momirealms.customnameplates.api.helper.VersionHelper;
import net.momirealms.customnameplates.api.network.Tracker;
import java.util.*;
@@ -301,7 +302,13 @@ public class TagRendererImpl implements TagRenderer {
passengers[index++] = passenger;
}
Object packet = CustomNameplates.getInstance().getPlatform().setPassengersPacket(owner.entityID(), passengers);
CustomNameplates.getInstance().getPacketSender().sendPacket(another, packet);
if (VersionHelper.isPaperOrItsForks()) {
CustomNameplates.getInstance().getPacketSender().sendPacket(another, packet);
} else {
CustomNameplates.getInstance().getScheduler().sync().runLater(() -> {
CustomNameplates.getInstance().getPacketSender().sendPacket(another, packet);
}, 0, null);
}
}
public void handleEntityDataChange(CNPlayer another, boolean isCrouching) {

View File

@@ -66,8 +66,8 @@ other-settings:
display-system-actionbar: true # Should the plugin display system actionbar and temporarily hide the custom actionbar?
hide-team-names: true # Hide the team name sent by other plugins or vanilla team system
unsafe-chat-event: false # Listen for canceled(unsafe) chat events from unknown plugins
default-condition-refresh-interval: 20 # Set default condition refresh interval
default-placeholder-refresh-interval: 1 # Set default placeholder refresh interval
default-condition-refresh-interval: 10 # Set default condition refresh interval in ticks
default-placeholder-refresh-interval: 1 # Set default placeholder refresh interval in ticks
placeholder-refresh-interval: # Custom placeholder refresh intervals for performance optimization
"%player_name%": 100
"%vault_prefix%": 20