mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-03 23:08:07 +01:00
Option to disable jobs shop
This commit is contained in:
parent
2346e7d623
commit
5ecb3456a3
@ -2,19 +2,24 @@ package com.gamingmesh.jobs.commands.list;
|
|||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gamingmesh.jobs.Jobs;
|
import com.gamingmesh.jobs.Jobs;
|
||||||
import com.gamingmesh.jobs.commands.Cmd;
|
import com.gamingmesh.jobs.commands.Cmd;
|
||||||
|
|
||||||
import net.Zrips.CMILib.Locale.LC;
|
import net.Zrips.CMILib.Locale.LC;
|
||||||
import net.Zrips.CMILib.Messages.CMIMessages;
|
|
||||||
|
|
||||||
public class shop implements Cmd {
|
public class shop implements Cmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
|
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)) {
|
if (!(sender instanceof Player)) {
|
||||||
CMIMessages.sendMessage(sender, LC.info_Ingame);
|
LC.info_Ingame.sendMessage(sender);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class GeneralConfigManager {
|
|||||||
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
|
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
|
||||||
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
||||||
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems, boostedItemsSlotSpecific, multiplyBoostedExtraValues, addPermissionBoost,
|
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems, boostedItemsSlotSpecific, multiplyBoostedExtraValues, addPermissionBoost,
|
||||||
highestPermissionBoost /*, preventCropResizePayment*/,
|
highestPermissionBoost,
|
||||||
payItemDurabilityLoss,
|
payItemDurabilityLoss,
|
||||||
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useMinimumOveralExp, useBreederFinder,
|
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useMinimumOveralExp, useBreederFinder,
|
||||||
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
||||||
@ -111,6 +111,8 @@ public class GeneralConfigManager {
|
|||||||
LoggingUse, payForCombiningItems, BlastFurnacesReassign = false, SmokerReassign = false, payForStackedEntities, payForAbove = false,
|
LoggingUse, payForCombiningItems, BlastFurnacesReassign = false, SmokerReassign = false, payForStackedEntities, payForAbove = false,
|
||||||
payForEachVTradeItem, allowEnchantingBoostedItems, bossBarAsync = false, preventShopItemEnchanting;
|
payForEachVTradeItem, allowEnchantingBoostedItems, bossBarAsync = false, preventShopItemEnchanting;
|
||||||
|
|
||||||
|
public boolean jobsshopenabled;
|
||||||
|
|
||||||
public ItemStack guiInfoButton;
|
public ItemStack guiInfoButton;
|
||||||
public int InfoButtonSlot = 9;
|
public int InfoButtonSlot = 9;
|
||||||
public List<String> InfoButtonCommands = new ArrayList<String>();
|
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");
|
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);
|
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",
|
c.addComment("enable-pay-near-spawner",
|
||||||
"Option to allow payment to be made when killing mobs from a 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");
|
"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");
|
||||||
|
Loading…
Reference in New Issue
Block a user