mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Config option for BlockTracker plugin usage
This commit is contained in:
parent
b2cd2c6e82
commit
eed592e5bd
@ -1019,7 +1019,7 @@ public final class Jobs extends JavaPlugin {
|
||||
List<JobProgression> progression = jPlayer.getJobProgression();
|
||||
int numjobs = progression.size();
|
||||
|
||||
if (!isBpOk(jPlayer, info, block, true))
|
||||
if (!Jobs.getGCManager().useBlockProtectionBlockTracker && !isBpOk(jPlayer, info, block, true))
|
||||
return;
|
||||
|
||||
// no job
|
||||
|
@ -93,7 +93,7 @@ public class GeneralConfigManager {
|
||||
|
||||
private FireworkEffect fireworkEffect;
|
||||
|
||||
public boolean ignoreOreGenerators, useBlockProtection, enableSchedule, PayForRenaming, PayForEnchantingOnAnvil, PayForEachCraft, SignsEnabled,
|
||||
public boolean ignoreOreGenerators, useBlockProtection, useBlockProtectionBlockTracker, enableSchedule, PayForRenaming, PayForEnchantingOnAnvil, PayForEachCraft, SignsEnabled,
|
||||
SignsColorizeJobName, ShowToplistInScoreboard, useGlobalTimer, useSilkTouchProtection, UseCustomNames,
|
||||
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
|
||||
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
||||
@ -885,6 +885,10 @@ public class GeneralConfigManager {
|
||||
"Modify restrictedBlocks.yml for blocks you want to protect");
|
||||
useBlockProtection = c.get("ExploitProtections.General.PlaceAndBreak.Enabled", c.getC().getBoolean("ExploitProtections.General.PlaceAndBreakProtection", true));
|
||||
|
||||
c.addComment("ExploitProtections.General.PlaceAndBreak.BlockTracker.Enabled",
|
||||
"Should we use BlockTracker plugin instead of built in block tracker");
|
||||
useBlockProtectionBlockTracker = c.get("ExploitProtections.General.PlaceAndBreak.BlockTracker.Enabled", false);
|
||||
|
||||
c.addComment("ExploitProtections.General.PlaceAndBreak.IgnoreOreGenerators",
|
||||
"Enabling this we will ignore blocks generated in ore generators, liko stone, coublestone and obsidian. You can still use timer on player placed obsidian block");
|
||||
ignoreOreGenerators = c.get("ExploitProtections.General.PlaceAndBreak.IgnoreOreGenerators", true);
|
||||
|
@ -418,8 +418,8 @@ public final class JobsPaymentListener implements Listener {
|
||||
return;
|
||||
|
||||
// Checks whether the broken block has been tracked by BlockTracker
|
||||
if (JobsHook.BlockTracker.isEnabled()) {
|
||||
if (HookManager.getBlockTrackerManager().isTracked(block)) return;
|
||||
if (JobsHook.BlockTracker.isEnabled() && Jobs.getGCManager().useBlockProtectionBlockTracker && HookManager.getBlockTrackerManager().isTracked(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
@ -438,7 +438,6 @@ public final class JobsPaymentListener implements Listener {
|
||||
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
|
||||
return;
|
||||
|
||||
|
||||
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
||||
|
||||
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
|
||||
@ -551,7 +550,7 @@ public final class JobsPaymentListener implements Listener {
|
||||
}
|
||||
|
||||
if (JobsHook.PyroFishingPro.isEnabled()) {
|
||||
if(PyroFishingProManager.lastFish != null) {
|
||||
if (PyroFishingProManager.lastFish != null) {
|
||||
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new PyroFishingProInfo(PyroFishingProManager.lastFish, ActionType.PYROFISHINGPRO));
|
||||
}
|
||||
return;
|
||||
@ -1669,8 +1668,6 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
CMIEntityType type = CMIEntityType.get(event.getEntityType());
|
||||
|
||||
|
||||
|
||||
if (type != CMIEntityType.TNT && type != CMIEntityType.TNT_MINECART && type != CMIEntityType.ENDER_CRYSTAL)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user