mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-26 17:31:19 +01:00
New config option to limit results of /quests top
This commit is contained in:
parent
c7b6488380
commit
63579df80e
@ -34,6 +34,7 @@ public class Settings {
|
||||
private boolean showQuestReqs = true;
|
||||
private boolean showQuestTitles = true;
|
||||
private int strictPlayerMovement = 0;
|
||||
private int topLimit = 150;
|
||||
private boolean translateNames = false;
|
||||
private boolean translateSubCommands = false;
|
||||
private boolean useCompass = true;
|
||||
@ -127,6 +128,12 @@ public class Settings {
|
||||
public void setStrictPlayerMovement(int strictPlayerMovement) {
|
||||
this.strictPlayerMovement = strictPlayerMovement;
|
||||
}
|
||||
public int getTopLimit() {
|
||||
return topLimit;
|
||||
}
|
||||
public void setTopLimit(int topLimit) {
|
||||
this.topLimit = topLimit;
|
||||
}
|
||||
/**
|
||||
* @deprecated As of release 2.6.4, use {@link #canTranslateNames()}
|
||||
*/
|
||||
@ -186,6 +193,7 @@ public class Settings {
|
||||
showQuestReqs = config.getBoolean("show-requirements", true);
|
||||
showQuestTitles = config.getBoolean("show-titles", true);
|
||||
strictPlayerMovement = config.getInt("strict-player-movement", 0);
|
||||
topLimit = config.getInt("top-limit", 150);
|
||||
translateNames = config.getBoolean("translate-names", true);
|
||||
translateSubCommands = config.getBoolean("translate-subcommands", false);
|
||||
useCompass = config.getBoolean("use-compass", true);
|
||||
|
@ -532,8 +532,9 @@ public class CmdExecutor implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (topNumber < 1) {
|
||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("inputPosNum"));
|
||||
if (topNumber < 1 || topNumber > plugin.getSettings().getTopLimit()) {
|
||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("invalidRange").replace("<least>", "1")
|
||||
.replace("<greatest>", String.valueOf(plugin.getSettings().getTopLimit())));
|
||||
return true;
|
||||
}
|
||||
File folder = new File(plugin.getDataFolder(), "data");
|
||||
|
@ -16,6 +16,7 @@ npc-effects:
|
||||
show-requirements: true
|
||||
show-titles: true
|
||||
strict-player-movement: 0
|
||||
top-limit: 150
|
||||
translate-names: true
|
||||
translate-subcommands: false
|
||||
use-compass: true
|
Loading…
Reference in New Issue
Block a user