From 704447aa81bdac3bc8c06ab509df44b545968a29 Mon Sep 17 00:00:00 2001 From: Pepich Date: Tue, 7 Feb 2017 20:56:39 +0100 Subject: [PATCH] Made mentio color entire words instead of just snippets --- src/com/redstoner/modules/mentio/Mentio.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/mentio/Mentio.java b/src/com/redstoner/modules/mentio/Mentio.java index 2d35523..a063a6c 100644 --- a/src/com/redstoner/modules/mentio/Mentio.java +++ b/src/com/redstoner/modules/mentio/Mentio.java @@ -23,7 +23,7 @@ import com.redstoner.misc.Utils; import com.redstoner.modules.Module; @AutoRegisterListener -@Version(major = 1, minor = 0, revision = 3, compatible = 1) +@Version(major = 1, minor = 0, revision = 4, compatible = 1) public class Mentio implements Module, Listener { private boolean enabled = false; @@ -157,7 +157,8 @@ public class Mentio implements Module, Listener // Using §§ as a placeholder as it can't occur in minecraft chat message naturally. If another plugin is stupid enough to leave that in, fuck that plugin. Utils.sendMessage(player, "", event.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", - temp.replaceFirst("§§", "§a§o" + mentio + lastColorCodes).replace("§§", mentio))); + temp.replaceFirst("§§([^ ]*) ", "§a§o" + mentio + "$1 " + lastColorCodes) + .replace("§§", mentio))); player.playSound(player.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1, 1); return; }