mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +01:00
Show extended help in trial mode
This commit is contained in:
parent
6ccdfd9e36
commit
44fb413656
@ -199,7 +199,7 @@ public class Settings {
|
||||
showQuestReqs = config.getBoolean("show-requirements", true);
|
||||
showQuestTitles = config.getBoolean("show-titles", true);
|
||||
strictPlayerMovement = config.getInt("strict-player-movement", 0);
|
||||
trialSave = config.getBoolean("trial-save", true);
|
||||
trialSave = config.getBoolean("trial-save", false);
|
||||
topLimit = config.getInt("top-limit", 150);
|
||||
translateNames = config.getBoolean("translate-names", true);
|
||||
translateSubCommands = config.getBoolean("translate-subcommands", false);
|
||||
|
@ -12,36 +12,6 @@
|
||||
|
||||
package me.blackvein.quests.listeners;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentSkipListSet;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.conversations.Conversable;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import me.blackvein.quests.Quest;
|
||||
import me.blackvein.quests.Quester;
|
||||
import me.blackvein.quests.Quests;
|
||||
@ -57,6 +27,35 @@ import me.blackvein.quests.storage.Storage;
|
||||
import me.blackvein.quests.util.ItemUtil;
|
||||
import me.blackvein.quests.util.Lang;
|
||||
import me.blackvein.quests.util.MiscUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.conversations.Conversable;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentSkipListSet;
|
||||
|
||||
public class CmdExecutor implements CommandExecutor {
|
||||
private final Quests plugin;
|
||||
@ -501,7 +500,8 @@ public class CmdExecutor implements CommandExecutor {
|
||||
|
||||
private boolean questsActions(final CommandSender cs) {
|
||||
if (cs.hasPermission("quests.events.*") || cs.hasPermission("quests.actions.*")
|
||||
|| cs.hasPermission("quests.actions.editor") || cs.hasPermission("quests.events.editor")) {
|
||||
|| cs.hasPermission("quests.actions.editor") || cs.hasPermission("quests.events.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
final Conversable c = (Conversable) cs;
|
||||
if (!c.isConversing()) {
|
||||
plugin.getActionFactory().getConversationFactory().buildConversation(c).begin();
|
||||
@ -515,7 +515,8 @@ public class CmdExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
private boolean questsConditions(final CommandSender cs) {
|
||||
if (cs.hasPermission("quests.conditions.*") || cs.hasPermission("quests.conditions.editor")) {
|
||||
if (cs.hasPermission("quests.conditions.*") || cs.hasPermission("quests.conditions.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
final Conversable c = (Conversable) cs;
|
||||
if (!c.isConversing()) {
|
||||
plugin.getConditionFactory().getConversationFactory().buildConversation(c).begin();
|
||||
@ -529,7 +530,8 @@ public class CmdExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
private boolean questsEditor(final CommandSender cs) {
|
||||
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")) {
|
||||
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
final Conversable c = (Conversable) cs;
|
||||
if (!c.isConversing()) {
|
||||
final Conversation cn = plugin.getQuestFactory().getConversationFactory().buildConversation(c);
|
||||
@ -869,19 +871,21 @@ public class CmdExecutor implements CommandExecutor {
|
||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_TOP")
|
||||
: "top") + ChatColor.YELLOW));
|
||||
}
|
||||
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")) {
|
||||
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EDITOR_HELP")
|
||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_EDITOR")
|
||||
: "editor") + ChatColor.YELLOW));
|
||||
}
|
||||
if (cs.hasPermission("quests.events.*") || cs.hasPermission("quests.actions.*")
|
||||
|| cs.hasPermission("quests.events.editor") || cs.hasPermission("quests.actions.editor")) {
|
||||
|| cs.hasPermission("quests.events.editor") || cs.hasPermission("quests.actions.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EVENTS_EDITOR_HELP")
|
||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands
|
||||
? Lang.get("COMMAND_EVENTS_EDITOR") : "actions") + ChatColor.YELLOW));
|
||||
}
|
||||
if (cs.hasPermission("quests.conditions.*")
|
||||
|| cs.hasPermission("quests.conditions.editor")) {
|
||||
if (cs.hasPermission("quests.conditions.*") || cs.hasPermission("quests.conditions.editor")
|
||||
|| cs.hasPermission("quests.admin.trial")) {
|
||||
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_CONDITIONS_EDITOR_HELP")
|
||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands
|
||||
? Lang.get("COMMAND_CONDITIONS_EDITOR") : "conditions") + ChatColor.YELLOW));
|
||||
|
@ -32,7 +32,7 @@ storage-data:
|
||||
connection-timeout: 5000
|
||||
storage-method:
|
||||
player-data: yaml
|
||||
trial-save: true
|
||||
trial-save: false
|
||||
top-limit: 150
|
||||
translate-names: true
|
||||
translate-subcommands: false
|
Loading…
Reference in New Issue
Block a user