Update SmiteCMD.java

This commit is contained in:
Deauthorized 2024-05-02 17:27:47 -04:00 committed by GitHub
parent 773f320cb6
commit 647f17b5bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,21 +78,16 @@ public class SmiteCMD extends PlexCommand
final Player player = getNonNullPlayer(args[0]); final Player player = getNonNullPlayer(args[0]);
final PlexPlayer plexPlayer = getPlexPlayer(player); final PlexPlayer plexPlayer = getPlexPlayer(player);
Title title = Title.title(Component.text("You've been smitten.").color(NamedTextColor.RED), Component.text("Be sure to follow the rules!").color(NamedTextColor.YELLOW)); Title title = Title.title(messageComponent("smiteTitleHeader"), messageComponent("smiteTitleMessage", reason, sender.getName()));
player.showTitle(title); player.showTitle(title);
if (!silent) if (!silent)
{ {
PlexUtils.broadcast(mmString("<red>" + player.getName() + " has been a naughty, naughty boy.")); PlexUtils.broadcast(messageComponent("smiteBroadcast", player.getName(), reason != null ? reason : messageString("noReasonProvided"), sender.getName()));
if (reason != null)
{
PlexUtils.broadcast(mmString(" <red>Reason: " + "<yellow>" + reason));
}
PlexUtils.broadcast(mmString(" <red>Smitten by: " + "<yellow>" + sender.getName()));
} }
else else
{ {
send(sender, "Smitten " + player.getName() + " quietly."); send(sender, messageComponent("smittenQuietly", player.getName()));
} }
// Set gamemode to survival // Set gamemode to survival
@ -129,8 +124,8 @@ public class SmiteCMD extends PlexCommand
if (reason != null) if (reason != null)
{ {
punishment.setReason(reason); punishment.setReason(reason);
send(player, mmString("<red>You've been smitten. Reason: <yellow>" + reason));
} }
send(player, messageComponent("smitten", reason != null ? reason : messageString("noReasonProvided")));
return null; return null;
} }