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();
|
List<JobProgression> progression = jPlayer.getJobProgression();
|
||||||
int numjobs = progression.size();
|
int numjobs = progression.size();
|
||||||
|
|
||||||
if (!isBpOk(jPlayer, info, block, true))
|
if (!Jobs.getGCManager().useBlockProtectionBlockTracker && !isBpOk(jPlayer, info, block, true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// no job
|
// no job
|
||||||
|
@ -93,7 +93,7 @@ public class GeneralConfigManager {
|
|||||||
|
|
||||||
private FireworkEffect fireworkEffect;
|
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,
|
SignsColorizeJobName, ShowToplistInScoreboard, useGlobalTimer, useSilkTouchProtection, UseCustomNames,
|
||||||
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
|
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps, informOnPaymentDisable,
|
||||||
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
BrowseUseNewLook, payExploringWhenGliding = false, resetExploringData = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
||||||
@ -884,7 +884,11 @@ public class GeneralConfigManager {
|
|||||||
"Enable blocks protection, like ore, from exploiting by placing and destroying same block again and again.",
|
"Enable blocks protection, like ore, from exploiting by placing and destroying same block again and again.",
|
||||||
"Modify restrictedBlocks.yml for blocks you want to protect");
|
"Modify restrictedBlocks.yml for blocks you want to protect");
|
||||||
useBlockProtection = c.get("ExploitProtections.General.PlaceAndBreak.Enabled", c.getC().getBoolean("ExploitProtections.General.PlaceAndBreakProtection", true));
|
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",
|
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");
|
"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);
|
ignoreOreGenerators = c.get("ExploitProtections.General.PlaceAndBreak.IgnoreOreGenerators", true);
|
||||||
|
@ -418,8 +418,8 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Checks whether the broken block has been tracked by BlockTracker
|
// Checks whether the broken block has been tracked by BlockTracker
|
||||||
if (JobsHook.BlockTracker.isEnabled()) {
|
if (JobsHook.BlockTracker.isEnabled() && Jobs.getGCManager().useBlockProtectionBlockTracker && HookManager.getBlockTrackerManager().isTracked(block)) {
|
||||||
if (HookManager.getBlockTrackerManager().isTracked(block)) return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
@ -438,7 +438,6 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
|
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
||||||
|
|
||||||
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
|
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
|
||||||
@ -551,7 +550,7 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (JobsHook.PyroFishingPro.isEnabled()) {
|
if (JobsHook.PyroFishingPro.isEnabled()) {
|
||||||
if(PyroFishingProManager.lastFish != null) {
|
if (PyroFishingProManager.lastFish != null) {
|
||||||
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new PyroFishingProInfo(PyroFishingProManager.lastFish, ActionType.PYROFISHINGPRO));
|
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new PyroFishingProInfo(PyroFishingProManager.lastFish, ActionType.PYROFISHINGPRO));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1668,9 +1667,7 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CMIEntityType type = CMIEntityType.get(event.getEntityType());
|
CMIEntityType type = CMIEntityType.get(event.getEntityType());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (type != CMIEntityType.TNT && type != CMIEntityType.TNT_MINECART && type != CMIEntityType.ENDER_CRYSTAL)
|
if (type != CMIEntityType.TNT && type != CMIEntityType.TNT_MINECART && type != CMIEntityType.ENDER_CRYSTAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user