1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-31 21:37:57 +01:00

Option to disable jobs shop

This commit is contained in:
Zrips 2023-05-02 16:42:26 +03:00
parent 2346e7d623
commit 5ecb3456a3
2 changed files with 28 additions and 18 deletions

View File

@ -2,19 +2,24 @@ package com.gamingmesh.jobs.commands.list;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.commands.Cmd;
import net.Zrips.CMILib.Locale.LC;
import net.Zrips.CMILib.Messages.CMIMessages;
public class shop implements Cmd {
@Override
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
if (!Jobs.getGCManager().jobsshopenabled) {
LC.info_FeatureNotEnabled.sendMessage(sender);
return true;
}
if (!(sender instanceof Player)) {
CMIMessages.sendMessage(sender, LC.info_Ingame);
LC.info_Ingame.sendMessage(sender);
return true;
}

View File

@ -96,7 +96,7 @@ public class GeneralConfigManager {
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems, boostedItemsSlotSpecific, multiplyBoostedExtraValues, addPermissionBoost,
highestPermissionBoost /*, preventCropResizePayment*/,
highestPermissionBoost,
payItemDurabilityLoss,
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useMinimumOveralExp, useBreederFinder,
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
@ -111,6 +111,8 @@ public class GeneralConfigManager {
LoggingUse, payForCombiningItems, BlastFurnacesReassign = false, SmokerReassign = false, payForStackedEntities, payForAbove = false,
payForEachVTradeItem, allowEnchantingBoostedItems, bossBarAsync = false, preventShopItemEnchanting;
public boolean jobsshopenabled;
public ItemStack guiInfoButton;
public int InfoButtonSlot = 9;
public List<String> InfoButtonCommands = new ArrayList<String>();
@ -451,6 +453,9 @@ public class GeneralConfigManager {
c.addComment("prevent-shop-item-enchanting", "Prevent players to enchant items from the shop in the anvil with enchanted books");
preventShopItemEnchanting = c.get("prevent-shop-item-enchanting", true);
c.addComment("jobs-shop-enabled", "Enables or disables jobs shop");
jobsshopenabled = c.get("jobs-shop-enabled", true);
c.addComment("enable-pay-near-spawner",
"Option to allow payment to be made when killing mobs from a spawner.",
"Use jobs.nearspawner.[amount] to define multiplayer. Example jobs.nearspawner.-0.5 will pay half of payment, jobs.nearspawner.-1 will not pay at all");