Skip to content

Commit

Permalink
Fix colors in /npc horse
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 23, 2022
1 parent 0e97f2f commit 5408e70
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Expand Up @@ -1102,7 +1102,7 @@ public void horse(CommandContext args, CommandSender sender, NPC npc,
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);
}
}

Expand Down
Expand Up @@ -85,5 +85,4 @@ public void register(Class<? extends VocalChord> clazz, String name) {
throw new IllegalArgumentException("vocalchord name already registered");
registered.put(name.toLowerCase(), clazz);
}

}
3 changes: 2 additions & 1 deletion main/src/main/java/net/citizensnpcs/trait/ShopTrait.java
Expand Up @@ -39,6 +39,7 @@
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;
Expand Down Expand Up @@ -100,7 +101,7 @@ public void display(Player sender) {
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);
Expand Down
4 changes: 3 additions & 1 deletion main/src/main/java/net/citizensnpcs/trait/SitTrait.java
Expand Up @@ -55,7 +55,9 @@ public void run() {
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) {
Expand Down

0 comments on commit 5408e70

Please sign in to comment.