Add reset to NPC text

This commit is contained in:
fullwall 2022-10-09 19:59:15 +08:00
parent 91feca62c7
commit b686323cd7
2 changed files with 8 additions and 8 deletions

View File

@ -28,10 +28,10 @@ public class AdminCommands {
@Command(aliases = { "citizens" }, desc = "Show basic plugin information", max = 0, permission = "citizens.admin")
public void citizens(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
Messaging.send(sender, StringHelper.wrapHeader("<e>Citizens v" + plugin.getDescription().getVersion()));
Messaging.send(sender, " <7>-- <c>Author: fullwall");
Messaging.send(sender, " <7>-- <c>Website: " + plugin.getDescription().getWebsite());
Messaging.send(sender, " <7>-- <c>Support: https://discord.gg/Q6pZGSR");
Messaging.send(sender, StringHelper.wrapHeader("<green>Citizens v" + plugin.getDescription().getVersion()));
Messaging.send(sender, " <yellow>-- <green>Author: fullwall");
Messaging.send(sender, " <yellow>-- <green>Website: " + plugin.getDescription().getWebsite());
Messaging.send(sender, " <yellow>-- <green>Support: https://discord.gg/Q6pZGSR");
}
@Command(

View File

@ -30,7 +30,7 @@ public class Chat implements VocalChord {
// chat to the world with CHAT_FORMAT and CHAT_RANGE settings
if (!context.hasRecipients()) {
String text = Setting.CHAT_FORMAT.asString().replace("<npc>", npc.getName()).replace("<text>",
context.getMessage());
"<reset>" + context.getMessage());
talkToBystanders(npc, text, context);
return;
}
@ -38,7 +38,7 @@ public class Chat implements VocalChord {
// Assumed recipients at this point
else if (context.size() <= 1) {
String text = Setting.CHAT_FORMAT_TO_TARGET.asString().replace("<npc>", npc.getName()).replace("<text>",
context.getMessage());
"<reset>" + context.getMessage());
String targetName = "";
// For each recipient
for (Talkable entity : context) {
@ -57,7 +57,7 @@ public class Chat implements VocalChord {
else { // Multiple recipients
String text = Setting.CHAT_FORMAT_TO_TARGET.asString().replace("<npc>", npc.getName()).replace("<text>",
context.getMessage());
"<reset>" + context.getMessage());
List<String> targetNames = new ArrayList<String>();
// Talk to each recipient
for (Talkable entity : context) {
@ -98,7 +98,7 @@ public class Chat implements VocalChord {
String bystanderText = Setting.CHAT_FORMAT_WITH_TARGETS_TO_BYSTANDERS.asString()
.replace("<npc>", npc.getName()).replace("<targets>", targets)
.replace("<text>", context.getMessage());
.replace("<text>", "<reset>" + context.getMessage());
talkToBystanders(npc, bystanderText, context);
}
}