mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-16 12:31:59 +01:00
empty message shouldnt show prefix by default.
This commit is contained in:
parent
0f23deeca1
commit
cde7ab961f
@ -19,17 +19,6 @@ public abstract class ShowInline<C extends InlineDisplay<?, T>, T> extends ShowR
|
||||
this.contentBuilder = new StringBuilder();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void display() {
|
||||
showHeader();
|
||||
if (!hasContentToShow()) {
|
||||
this.display.getSender().sendMessage(String.format("%s%s",
|
||||
this.display.getPrefix(), this.display.getEmptyMessage()));
|
||||
return;
|
||||
}
|
||||
showContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -57,8 +57,7 @@ public class WhoCommand extends MultiverseCommand {
|
||||
}
|
||||
|
||||
ListDisplay display = new ListDisplay().withSender(sender)
|
||||
.withFilter(filter)
|
||||
.withEmptyMessage(String.format("%sNo players found.", ChatColor.GRAY));
|
||||
.withFilter(filter);
|
||||
|
||||
this.plugin.getMVWorldManager().getMVWorlds().stream()
|
||||
.filter(world -> player == null || this.plugin.getMVPerms().canEnterWorld(player, world))
|
||||
@ -69,8 +68,11 @@ public class WhoCommand extends MultiverseCommand {
|
||||
@NotNull ListDisplay display,
|
||||
@NotNull Set<Player> visiblePlayers) {
|
||||
|
||||
String prefix = String.format("%s%s - ", world.getColoredWorldString(), ChatColor.WHITE);
|
||||
|
||||
display.withCreator(buildPlayerList(world, visiblePlayers))
|
||||
.withPrefix(String.format("%s%s - ", world.getColoredWorldString(), ChatColor.WHITE))
|
||||
.withPrefix(prefix)
|
||||
.withEmptyMessage(String.format("%s%sNo players found.", prefix, ChatColor.GRAY))
|
||||
.build()
|
||||
.run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user