Fix colors in /npc horse

This commit is contained in:
fullwall 2022-11-23 19:03:06 +08:00
parent 0e97f2f23f
commit 5408e7059c
4 changed files with 6 additions and 4 deletions

View File

@ -1102,7 +1102,7 @@ public class NPCCommands {
Messaging.sendTr(sender, Messages.HORSE_DESCRIBE, Util.prettyEnum(horse.getColor()), Util.prettyEnum(type),
Util.prettyEnum(horse.getStyle()));
} else {
sender.sendMessage(output);
Messaging.send(sender, output);
}
}

View File

@ -85,5 +85,4 @@ public class CitizensSpeechFactory implements SpeechFactory {
throw new IllegalArgumentException("vocalchord name already registered");
registered.put(name.toLowerCase(), clazz);
}
}

View File

@ -39,6 +39,7 @@ import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import net.citizensnpcs.api.util.Colorizer;
import net.citizensnpcs.api.util.DataKey;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.api.util.Placeholders;
import net.citizensnpcs.trait.shop.ItemAction;
import net.citizensnpcs.trait.shop.ItemAction.ItemActionGUI;
@ -100,7 +101,7 @@ public class ShopTrait extends Trait {
if (viewPermission != null && !sender.hasPermission(viewPermission))
return;
if (pages.size() == 0) {
sender.sendMessage(ChatColor.RED + "Empty shop");
Messaging.send(sender, "<red>Empty shop");
return;
}
InventoryMenu.createSelfRegistered(new NPCShopViewer(this, sender)).present(sender);

View File

@ -55,7 +55,9 @@ public class SitTrait extends Trait {
NMS.mount(holder.getEntity(), npc.getEntity());
}
holder.teleport(sittingAt, TeleportCause.PLUGIN);
if (holder.getStoredLocation() != null && holder.getStoredLocation().distance(sittingAt) > 0.05) {
holder.teleport(sittingAt, TeleportCause.PLUGIN);
}
}
public void setSitting(Location at) {