mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 10:20:11 +01:00
Remove <reset> from text
This commit is contained in:
parent
b686323cd7
commit
1213c5462c
@ -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>",
|
||||
"<reset>" + context.getMessage());
|
||||
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>",
|
||||
"<reset>" + context.getMessage());
|
||||
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>",
|
||||
"<reset>" + context.getMessage());
|
||||
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>", "<reset>" + context.getMessage());
|
||||
.replace("<text>", context.getMessage());
|
||||
talkToBystanders(npc, bystanderText, context);
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +287,6 @@ public class SkinUpdateTracker {
|
||||
return;
|
||||
|
||||
double viewDistance = Setting.NPC_SKIN_VIEW_DISTANCE.asDouble();
|
||||
viewDistance *= viewDistance;
|
||||
Location location = entity.getLocation(NPC_LOCATION);
|
||||
List<Player> players = entity.getWorld().getPlayers();
|
||||
for (Player player : players) {
|
||||
@ -296,8 +295,7 @@ public class SkinUpdateTracker {
|
||||
Location ploc = player.getLocation(CACHE_LOCATION);
|
||||
if (ploc.getWorld() != location.getWorld())
|
||||
continue;
|
||||
double distanceSquared = ploc.distanceSquared(location);
|
||||
if (distanceSquared > viewDistance)
|
||||
if (ploc.distance(location) > viewDistance)
|
||||
continue;
|
||||
|
||||
PlayerTracker tracker = playerTrackers.get(player.getUniqueId());
|
||||
|
@ -42,7 +42,6 @@ import net.citizensnpcs.util.Util;
|
||||
*/
|
||||
@TraitName("text")
|
||||
public class Text extends Trait implements Runnable, Listener, ConversationAbandonedListener {
|
||||
private int bubbleTicks;
|
||||
private final Map<UUID, Long> cooldowns = Maps.newHashMap();
|
||||
private int currentIndex;
|
||||
private int delay = -1;
|
||||
@ -52,7 +51,6 @@ public class Text extends Trait implements Runnable, Listener, ConversationAband
|
||||
private double range = Setting.DEFAULT_TALK_CLOSE_RANGE.asDouble();
|
||||
private boolean realisticLooker = Setting.DEFAULT_REALISTIC_LOOKING.asBoolean();
|
||||
private boolean speechBubbles;
|
||||
private final int speechIndex = -1;
|
||||
private boolean talkClose = Setting.DEFAULT_TALK_CLOSE.asBoolean();
|
||||
private final List<String> text = new ArrayList<String>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user