mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Option to disable daily quests
This commit is contained in:
parent
5ecb3456a3
commit
bc4e9343fc
@ -912,6 +912,9 @@ public final class Jobs extends JavaPlugin {
|
||||
}
|
||||
|
||||
private static void checkDailyQuests(JobsPlayer jPlayer, Job job, ActionInfo info) {
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
return;
|
||||
}
|
||||
if (!job.getQuests().isEmpty()) {
|
||||
for (QuestProgression one : jPlayer.getQuestProgressions(job, info.getType())) {
|
||||
one.processQuest(jPlayer, info);
|
||||
|
@ -56,6 +56,10 @@ public class editquests implements Cmd {
|
||||
|
||||
Action action = null;
|
||||
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
LC.info_FeatureNotEnabled.sendMessage(sender);
|
||||
}
|
||||
|
||||
for (String one : args) {
|
||||
if (page == 0) {
|
||||
try {
|
||||
|
@ -24,6 +24,12 @@ public class quests implements Cmd {
|
||||
|
||||
@Override
|
||||
public boolean perform(Jobs plugin, final CommandSender sender, String[] args) {
|
||||
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
LC.info_FeatureNotEnabled.sendMessage(sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
JobsPlayer jPlayer = null;
|
||||
boolean isPlayer = sender instanceof Player;
|
||||
|
||||
|
@ -11,10 +11,18 @@ import com.gamingmesh.jobs.container.Job;
|
||||
import com.gamingmesh.jobs.container.JobsPlayer;
|
||||
import com.gamingmesh.jobs.container.QuestProgression;
|
||||
|
||||
import net.Zrips.CMILib.Locale.LC;
|
||||
|
||||
public class resetquest implements Cmd {
|
||||
|
||||
@Override
|
||||
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
|
||||
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
LC.info_FeatureNotEnabled.sendMessage(sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length != 0 && args.length != 1 && args.length != 2) {
|
||||
Jobs.getCommandManager().sendUsage(sender, "resetquest");
|
||||
return true;
|
||||
|
@ -11,10 +11,17 @@ import com.gamingmesh.jobs.commands.Cmd;
|
||||
import com.gamingmesh.jobs.container.Job;
|
||||
import com.gamingmesh.jobs.container.JobsPlayer;
|
||||
|
||||
import net.Zrips.CMILib.Locale.LC;
|
||||
|
||||
public class resetquesttotal implements Cmd {
|
||||
|
||||
@Override
|
||||
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
LC.info_FeatureNotEnabled.sendMessage(sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length != 0 && args.length != 1) {
|
||||
Jobs.getCommandManager().sendUsage(sender, "resetquesttotal");
|
||||
return true;
|
||||
|
@ -13,10 +13,16 @@ import com.gamingmesh.jobs.container.Quest;
|
||||
import com.gamingmesh.jobs.container.QuestProgression;
|
||||
import com.gamingmesh.jobs.economy.BufferedEconomy;
|
||||
|
||||
import net.Zrips.CMILib.Locale.LC;
|
||||
|
||||
public class skipquest implements Cmd {
|
||||
|
||||
@Override
|
||||
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
|
||||
if (!Jobs.getGCManager().DailyQuestsEnabled) {
|
||||
LC.info_FeatureNotEnabled.sendMessage(sender);
|
||||
return true;
|
||||
}
|
||||
if (args.length != 2 && args.length != 3) {
|
||||
Jobs.getCommandManager().sendUsage(sender, "skipquest");
|
||||
return true;
|
||||
|
@ -112,6 +112,7 @@ public class GeneralConfigManager {
|
||||
payForEachVTradeItem, allowEnchantingBoostedItems, bossBarAsync = false, preventShopItemEnchanting;
|
||||
|
||||
public boolean jobsshopenabled;
|
||||
public boolean DailyQuestsEnabled;
|
||||
|
||||
public ItemStack guiInfoButton;
|
||||
public int InfoButtonSlot = 9;
|
||||
@ -422,6 +423,9 @@ public class GeneralConfigManager {
|
||||
c.addComment("broadcast.on-level-up.levels", "For what levels you want to broadcast message? Keep it at 0 if you want for all of them");
|
||||
BroadcastingLevelUpLevels = c.getIntList("broadcast.on-level-up.levels", Arrays.asList(0));
|
||||
|
||||
c.addComment("DailyQuests.Enabled", "Enables or disables daily quests");
|
||||
DailyQuestsEnabled = c.get("DailyQuests.Enabled", true);
|
||||
|
||||
c.addComment("DailyQuests.ResetTime", "Defines time in 24hour format when we want to give out new daily quests",
|
||||
"Any daily quests given before reset will be invalid and new ones will be given out");
|
||||
ResetTimeHour = c.get("DailyQuests.ResetTime.Hour", 4);
|
||||
|
Loading…
Reference in New Issue
Block a user