Skip to content

Commit

Permalink
Use TextUtils#parsePlayer in ChromatiCraft compat
Browse files Browse the repository at this point in the history
Signed-off-by: unilock <[email protected]>
  • Loading branch information
unilock committed Jul 6, 2024
1 parent fc8b8cd commit 393c0c5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Reika.ChromatiCraft.Magic.Progression.ResearchLevel;
import Reika.ChromatiCraft.Registry.ChromaResearch;
import cc.unilock.nilcord.NilcordPremain;
import cc.unilock.nilcord.util.TextUtils;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
Expand Down Expand Up @@ -76,9 +77,7 @@ public static void onProgressionLevel(EntityPlayer player, ResearchLevel level)
}

private static void sendMessage(EntityPlayerMP player, String template, String title, String desc) {
String msg = template
.replace("<username>", player.getGameProfile().getName())
.replace("<displayname>", player.getDisplayName())
String msg = TextUtils.parsePlayer(template, player)
.replace("<progress_title>", title)
.replace("<progress_description>", desc);

Expand Down

0 comments on commit 393c0c5

Please sign in to comment.