Allow newline in faction motd
This commit is contained in:
parent
9219c3eaa4
commit
84b66ba18b
@ -67,7 +67,8 @@ public class CmdFactionsMotd extends FactionsCommand
|
|||||||
// Inform
|
// Inform
|
||||||
for (MPlayer follower : msenderFaction.getMPlayers())
|
for (MPlayer follower : msenderFaction.getMPlayers())
|
||||||
{
|
{
|
||||||
follower.msg("<i>%s <i>set your faction motd to:\n%s", MixinDisplayName.get().getDisplayName(sender, follower), msenderFaction.getMotdDesc());
|
follower.msg("<i>%s <i>changed your faction motd.", MixinDisplayName.get().getDisplayName(sender, follower));
|
||||||
|
follower.message(msenderFaction.getMotdMessages());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@ -323,8 +324,10 @@ public class Faction extends Entity<Faction> implements FactionsParticipator, MP
|
|||||||
title = Txt.titleize(title);
|
title = Txt.titleize(title);
|
||||||
ret.add(title);
|
ret.add(title);
|
||||||
|
|
||||||
String motd = Txt.parse("<i>") + this.getMotdDesc();
|
String motd = this.getMotdDesc();
|
||||||
ret.add(motd);
|
List<String> motds = Arrays.asList(motd.split("\\\\n"));
|
||||||
|
motds = motds.stream().map(s -> Txt.parse("<i>") + s).collect(Collectors.toList());
|
||||||
|
ret.addAll(motds);
|
||||||
|
|
||||||
ret.add("");
|
ret.add("");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user