mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-30 21:07:48 +01:00
WEEPING_VINES to pay out for entire broken stack
This commit is contained in:
parent
2639e9802d
commit
3cc8183ccb
@ -481,7 +481,7 @@ public class GeneralConfigManager {
|
||||
"This option is only related to: sugar_cane, cactus, kelp, bamboo");
|
||||
preventCropResizePayment = c.get("prevent-crop-resize-payment", false);*/
|
||||
|
||||
c.addComment("pay-for-above", "When enabled we will try to pay player for blocks above broken ones. This only applies to sugarcane, bamboo and kelp");
|
||||
c.addComment("pay-for-above", "When enabled we will try to pay player for blocks above broken ones. This only applies to sugarcane, bamboo, kelp and weeping_vines");
|
||||
payForAbove = c.get("pay-for-above", false);
|
||||
|
||||
c.addComment("pay-for-stacked-entities", "Allows to pay for stacked entities for each one. Requires StackMob or WildStacker.");
|
||||
|
@ -1883,7 +1883,8 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
CMIMaterial mat = CMIMaterial.get(block);
|
||||
|
||||
if (!mat.equals(CMIMaterial.SUGAR_CANE) && !mat.equals(CMIMaterial.BAMBOO) && !mat.equals(CMIMaterial.KELP_PLANT))
|
||||
if (!mat.equals(CMIMaterial.SUGAR_CANE) && !mat.equals(CMIMaterial.BAMBOO) && !mat.equals(CMIMaterial.KELP_PLANT) && !mat.equals(CMIMaterial.WEEPING_VINES) && !mat.equals(
|
||||
CMIMaterial.WEEPING_VINES_PLANT))
|
||||
return;
|
||||
|
||||
if (!Jobs.getGCManager().canPerformActionInWorld(block.getWorld()))
|
||||
@ -1892,7 +1893,12 @@ public final class JobsPaymentListener implements Listener {
|
||||
if (event.getSourceBlock().equals(event.getBlock()))
|
||||
return;
|
||||
|
||||
if (event.getBlock().getLocation().getBlockY() <= event.getSourceBlock().getLocation().getBlockY())
|
||||
if ((mat.equals(CMIMaterial.SUGAR_CANE) || mat.equals(CMIMaterial.BAMBOO) || mat.equals(CMIMaterial.KELP_PLANT)) &&
|
||||
event.getBlock().getLocation().getBlockY() <= event.getSourceBlock().getLocation().getBlockY())
|
||||
return;
|
||||
|
||||
if ((mat.equals(CMIMaterial.WEEPING_VINES) || mat.equals(CMIMaterial.WEEPING_VINES_PLANT)) &&
|
||||
event.getBlock().getLocation().getBlockY() >= event.getSourceBlock().getLocation().getBlockY())
|
||||
return;
|
||||
|
||||
Location loc = event.getSourceBlock().getLocation().clone();
|
||||
|
Loading…
Reference in New Issue
Block a user