1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

Revert back the colon, causing problems with the plants

Fixes #1096
This commit is contained in:
montlikadani 2021-02-27 20:24:25 +01:00
parent 1413662c19
commit 269ee4c2ca
5 changed files with 12 additions and 18 deletions

View File

@ -23,6 +23,6 @@ public class BlockCollectInfo extends BaseActionInfo {
@Override
public String getNameWithSub() {
return getName() + "-" + ageOrLevel;
return getName() + ":" + ageOrLevel;
}
}

View File

@ -39,7 +39,7 @@ public abstract class MaterialActionInfo extends BaseActionInfo {
@Override
public String getNameWithSub() {
return getName() + "-" + data;
return getName() + ":" + data;
}
}

View File

@ -91,7 +91,7 @@ public class GeneralConfigManager {
SignsColorizeJobName, ShowToplistInScoreboard, useGlobalTimer, useSilkTouchProtection, UseCustomNames,
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps,
BrowseUseNewLook, payExploringWhenGliding = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems, preventCropResizePayment, payItemDurabilityLoss,
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems/*, preventCropResizePayment*/, payItemDurabilityLoss,
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useBreederFinder,
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
@ -462,9 +462,10 @@ public class GeneralConfigManager {
c.addComment("enable-boosted-armor-items", "Do the jobs boost ignore the boosted items usage in armor slots?");
boostedArmorItems = c.get("enable-boosted-armor-items", true);
c.addComment("prevent-crop-resize-payment", "Do you want to prevent crop resizing payment when placing more cactus?",
// Better implementation?
/*c.addComment("prevent-crop-resize-payment", "Do you want to prevent crop resizing payment when placing more cactus?",
"This option is only related to: sugar_cane, cactus, kelp, bamboo");
preventCropResizePayment = c.get("prevent-crop-resize-payment", false);
preventCropResizePayment = c.get("prevent-crop-resize-payment", false);*/
c.addComment("pay-for-stacked-entities", "Allows to pay for stacked entities for each one. Requires StackMob or WildStacker.");
payForStackedEntities = c.get("pay-for-stacked-entities", false);

View File

@ -944,7 +944,8 @@ public class JobsPlayer {
Double income = jobinfo.getIncome(level, numjobs, maxJobsEquation);
Double pointAmount = jobinfo.getPoints(level, numjobs, maxJobsEquation);
Double expAmount = jobinfo.getExperience(level, numjobs, maxJobsEquation);
return income != 0D || pointAmount != 0D || expAmount != 0D;
if (income != 0D || pointAmount != 0D || expAmount != 0D)
return true;
}
return false;

View File

@ -38,7 +38,6 @@ import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.BrewingStand;
import org.bukkit.block.Furnace;
import org.bukkit.block.data.Ageable;
@ -415,13 +414,14 @@ public class JobsPaymentListener implements Listener {
}
}
// Better implementation?
// Prevent money duplication when breaking plant blocks
Material brokenBlock = block.getRelative(BlockFace.DOWN).getType();
/*Material brokenBlock = block.getRelative(BlockFace.DOWN).getType();
if (Jobs.getGCManager().preventCropResizePayment && (brokenBlock == CMIMaterial.SUGAR_CANE.getMaterial()
|| brokenBlock == CMIMaterial.KELP.getMaterial()
|| brokenBlock == CMIMaterial.CACTUS.getMaterial() || brokenBlock == CMIMaterial.BAMBOO.getMaterial())) {
return;
}
}*/
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), bInfo, block);
}
@ -461,14 +461,6 @@ public class JobsPaymentListener implements Listener {
if (Jobs.getGCManager().disablePaymentIfRiding && player.isInsideVehicle())
return;
// Prevent money duplication when placing plant blocks
Material placedBlock = event.getBlockPlaced().getRelative(BlockFace.DOWN).getType();
if (Jobs.getGCManager().preventCropResizePayment && (placedBlock == CMIMaterial.SUGAR_CANE.getMaterial()
|| placedBlock == CMIMaterial.KELP.getMaterial()
|| placedBlock == CMIMaterial.CACTUS.getMaterial() || placedBlock == CMIMaterial.BAMBOO.getMaterial())) {
return;
}
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new BlockActionInfo(block, ActionType.PLACE), block);
}
@ -987,7 +979,7 @@ public class JobsPaymentListener implements Listener {
CMIEnchantment ench = CMIEnchantment.get(enchant);
enchantName = ench == null ? null : ench.toString();
}
if (enchantName == null)
continue;