mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2026-01-03 22:16:44 +00:00
work
This commit is contained in:
@@ -586,7 +586,7 @@ public class AdvanceManagerImpl implements AdvanceManager {
|
||||
}
|
||||
registerCharacterFontData(id, bitmapCache, (properties) -> {
|
||||
int ascent = (int) properties.get("shift_y");
|
||||
String filePath = custom ? ConfigManager.namespace() + ":font/" + file : "minecraft:font/" + codePoints + ".png";
|
||||
String filePath = custom ? ConfigManager.namespace() + ":font/" + file : "minecraft:font/" + codePoints + ".png";
|
||||
plugin.getConfigManager().saveResource("tmp/" + codePoints + ".json");
|
||||
StringBuilder jsonContent = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(new File(plugin.getDataDirectory().toFile(), "tmp" + File.separator + codePoints + ".json")))) {
|
||||
|
||||
@@ -110,6 +110,7 @@ public abstract class AbstractChatManager implements ChatManager {
|
||||
@Override
|
||||
public void onChat(CNPlayer player, String message, String channel) {
|
||||
String text = message;
|
||||
plugin.debug(() -> player.name() + " says [" + message + "]");
|
||||
for (EmojiProvider provider : emojiProviders) {
|
||||
text = provider.replace(player, text);
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ public class UnlimitedTagManagerImpl implements UnlimitedTagManager, JoinQuitLis
|
||||
|
||||
@Override
|
||||
public void onPlayerJoin(CNPlayer player) {
|
||||
plugin.debug(() -> player.name() + " joined the server");
|
||||
TagRendererImpl sender = new TagRendererImpl(this, player);
|
||||
sender.onTick();
|
||||
TagRendererImpl previous = tagRenderers.put(player.uuid(), sender);
|
||||
|
||||
@@ -584,7 +584,7 @@ public class PlaceholderManagerImpl implements PlaceholderManager {
|
||||
List<RelationalPlaceholder> delayedPlaceholdersToUpdate = new ObjectArrayList<>();
|
||||
for (Placeholder placeholder : player.activePlaceholdersToRefresh()) {
|
||||
if (placeholder instanceof PlayerPlaceholder playerPlaceholder) {
|
||||
TimeStampData<String> previous = player.getValue(placeholder);
|
||||
TimeStampData<String> previous = player.getRawValue(placeholder);
|
||||
if (previous == null) {
|
||||
String value = playerPlaceholder.request(player);
|
||||
player.setValue(placeholder, new TimeStampData<>(value, MainTask.getTicks(), true));
|
||||
@@ -609,7 +609,7 @@ public class PlaceholderManagerImpl implements PlaceholderManager {
|
||||
} else if (placeholder instanceof RelationalPlaceholder relationalPlaceholder) {
|
||||
delayedPlaceholdersToUpdate.add(relationalPlaceholder);
|
||||
} else if (placeholder instanceof SharedPlaceholder sharedPlaceholder) {
|
||||
TimeStampData<String> previous = player.getValue(placeholder);
|
||||
TimeStampData<String> previous = player.getRawValue(placeholder);
|
||||
if (previous == null) {
|
||||
String value;
|
||||
// if the shared placeholder has been updated by other players
|
||||
@@ -649,7 +649,7 @@ public class PlaceholderManagerImpl implements PlaceholderManager {
|
||||
|
||||
for (RelationalPlaceholder placeholder : delayedPlaceholdersToUpdate) {
|
||||
for (CNPlayer nearby : player.nearbyPlayers()) {
|
||||
TimeStampData<String> previous = player.getRelationalValue(placeholder, nearby);
|
||||
TimeStampData<String> previous = player.getRawRelationalValue(placeholder, nearby);
|
||||
if (previous == null) {
|
||||
String value = placeholder.request(player, nearby);
|
||||
player.setRelationalValue(placeholder, nearby, new TimeStampData<>(value, MainTask.getTicks(), true));
|
||||
|
||||
Reference in New Issue
Block a user