mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 12:46:04 +01:00
Add error colour setting, don't over-paginate for console commands
This commit is contained in:
parent
03f3d1a713
commit
dabe4bb43e
@ -53,7 +53,7 @@ public class Settings {
|
||||
file = new File(CitizensAPI.getPlugin().getDataFolder(), Setting.DEBUG_FILE.asString());
|
||||
}
|
||||
Messaging.configure(file, Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
|
||||
Setting.HIGHLIGHT_COLOUR.asString());
|
||||
Setting.HIGHLIGHT_COLOUR.asString(), Setting.ERROR_COLOUR.asString());
|
||||
}
|
||||
|
||||
public enum Setting {
|
||||
@ -96,6 +96,7 @@ public class Settings {
|
||||
}
|
||||
},
|
||||
DISABLE_TABLIST("npc.tablist.disable", true),
|
||||
ERROR_COLOUR("general.color-scheme.message-error", "<c>"),
|
||||
HIGHLIGHT_COLOUR("general.color-scheme.message-highlight", "<e>"),
|
||||
KEEP_CHUNKS_LOADED("npc.chunks.always-keep-loaded", false),
|
||||
LOCALE("general.translation.locale", ""),
|
||||
|
@ -201,7 +201,7 @@ public class NPCCommands {
|
||||
else
|
||||
throw new CommandException(Messages.ANCHOR_MISSING, args.getFlag("remove"));
|
||||
} else if (!args.hasFlag('a')) {
|
||||
Paginator paginator = new Paginator().header("Anchors");
|
||||
Paginator paginator = new Paginator().header("Anchors").console(sender instanceof ConsoleCommandSender);
|
||||
paginator.addLine("<e>Key: <a>ID <b>Name <c>World <d>Location (X,Y,Z)");
|
||||
for (int i = 0; i < trait.getAnchors().size(); i++) {
|
||||
if (trait.getAnchors().get(i).isLoaded()) {
|
||||
@ -831,7 +831,7 @@ public class NPCCommands {
|
||||
}
|
||||
}
|
||||
|
||||
Paginator paginator = new Paginator().header("NPCs");
|
||||
Paginator paginator = new Paginator().header("NPCs").console(sender instanceof ConsoleCommandSender);
|
||||
paginator.addLine("<e>Key: <a>ID <b>Name");
|
||||
for (int i = 0; i < npcs.size(); i += 2) {
|
||||
String line = "<a>" + npcs.get(i).getId() + "<b> " + npcs.get(i).getName();
|
||||
|
@ -4,6 +4,7 @@ import java.util.Map;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
@ -67,7 +68,7 @@ public class Poses extends Trait {
|
||||
}
|
||||
|
||||
public void describe(CommandSender sender, int page) throws CommandException {
|
||||
Paginator paginator = new Paginator().header("Pose");
|
||||
Paginator paginator = new Paginator().header("Pose").console(sender instanceof ConsoleCommandSender);
|
||||
paginator.addLine("<e>Key: <a>ID <b>Name <c>Pitch/Yaw");
|
||||
int i = 0;
|
||||
for (Pose pose : poses.values()) {
|
||||
|
Loading…
Reference in New Issue
Block a user