mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
We already had booted item enchantment prevention, no need to have
secondary one
This commit is contained in:
parent
b8822c2a57
commit
aaab2fe06c
@ -111,7 +111,7 @@ public class GeneralConfigManager {
|
||||
BossBarEnabled = false, BossBarsMessageByDefault = false, ExploreCompact, ExploreSaveIntoDatabase = false, DBCleaningJobsUse, DBCleaningUsersUse,
|
||||
DisabledWorldsUse, UseAsWhiteListWorldList, MythicMobsEnabled,
|
||||
LoggingUse, payForCombiningItems, BlastFurnacesReassign = false, SmokerReassign = false, payForStackedEntities, payForAbove = false,
|
||||
payForEachVTradeItem, allowEnchantingBoostedItems, preventShopItemEnchanting, preventBoostedItemEnchanting;
|
||||
payForEachVTradeItem, allowEnchantingBoostedItems, preventShopItemEnchanting;
|
||||
|
||||
public int ActionBarsMessageKeepFor;
|
||||
|
||||
@ -483,9 +483,6 @@ 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("prevent-boosted-item-enchanting", "Prevent players to enchant boosted jobs items in the anvil with enchanted books");
|
||||
preventBoostedItemEnchanting = c.get("prevent-boosted-item-enchanting", c.getC().getBoolean("prevent-shop-item-enchanting", true));
|
||||
|
||||
c.addComment("jobs-shop-enabled", "Enables or disables jobs shop");
|
||||
jobsshopenabled = c.get("jobs-shop-enabled", true);
|
||||
|
||||
|
@ -27,20 +27,6 @@ public final class JobsPayment1_9Listener implements Listener {
|
||||
event.setResult(null);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onBoostedItemEnchantEvent(final PrepareAnvilEvent event) {
|
||||
if (!Jobs.getGCManager().preventBoostedItemEnchanting)
|
||||
return;
|
||||
|
||||
if (!ItemBoostManager.isBoostedJobsItem(event.getInventory().getContents()[0]))
|
||||
return;
|
||||
|
||||
if (!CMIMaterial.get(event.getInventory().getContents()[1]).equals(CMIMaterial.ENCHANTED_BOOK))
|
||||
return;
|
||||
|
||||
event.setResult(null);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerHandSwap(PlayerSwapHandItemsEvent event) {
|
||||
Jobs.getPlayerManager().resetItemBonusCache(event.getPlayer().getUniqueId());
|
||||
|
Loading…
Reference in New Issue
Block a user