Skip to content

Commit

Permalink
Merge pull request DevotedMC#20 from Diet-Cola/formatting-fixes
Browse files Browse the repository at this point in the history
Fix colour parsing
  • Loading branch information
wingzero54 authored May 21, 2022
2 parents 7d25f56 + e9e4aa3 commit 844b86f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.util.Vector;
import vg.civcraft.mc.civmodcore.chat.ChatUtils;

/**
* Instance of a player who is imprisoned in an exile pearl
Expand Down Expand Up @@ -481,7 +482,7 @@ public boolean equals(final Object o) {
public void performBroadcast() {
Location l = getHolder().getLocation();
String name = getHolder().getName();
getPlayer().sendMessage(String.format(Lang.pearlPearlIsHeld, name, l.getBlockX(), l.getBlockY(), l.getBlockZ(), l.getWorld().getName()));
getPlayer().sendMessage(ChatUtils.parseColor(String.format(Lang.pearlPearlIsHeld, name, l.getBlockX(), l.getBlockY(), l.getBlockZ(), l.getWorld().getName())));
for(BroadcastListener b : bcastListeners) {
b.broadcast(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ private void checkPlayer(UUID playerId) {
Location newLoc = getCorrectedLocation(pearlLocation, playerLocation, pearl.getPlayer().isFlying());
if (newLoc != null) {
player.teleport(newLoc, TeleportCause.PLUGIN);
pearl.getPlayer().sendMessage(String.format("<i>You can't come within %d blocks of your pearl at (%d, %d).", radius,
pearl.getLocation().getBlockX(), pearl.getLocation().getBlockZ()));
pearl.getPlayer().sendMessage(ChatUtils.parseColor(String.format("<i>You can't come within %d blocks of your pearl at (%d, %d).", radius,
pearl.getLocation().getBlockX(), pearl.getLocation().getBlockZ())));
}
}

Expand Down

0 comments on commit 844b86f

Please sign in to comment.