mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-07 00:38:42 +01:00
parent
1413662c19
commit
269ee4c2ca
@ -23,6 +23,6 @@ public class BlockCollectInfo extends BaseActionInfo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNameWithSub() {
|
public String getNameWithSub() {
|
||||||
return getName() + "-" + ageOrLevel;
|
return getName() + ":" + ageOrLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ public abstract class MaterialActionInfo extends BaseActionInfo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNameWithSub() {
|
public String getNameWithSub() {
|
||||||
return getName() + "-" + data;
|
return getName() + ":" + data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public class GeneralConfigManager {
|
|||||||
SignsColorizeJobName, ShowToplistInScoreboard, useGlobalTimer, useSilkTouchProtection, UseCustomNames,
|
SignsColorizeJobName, ShowToplistInScoreboard, useGlobalTimer, useSilkTouchProtection, UseCustomNames,
|
||||||
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps,
|
PreventSlimeSplit, PreventMagmaCubeSplit, PreventHopperFillUps, PreventBrewingStandFillUps,
|
||||||
BrowseUseNewLook, payExploringWhenGliding = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
BrowseUseNewLook, payExploringWhenGliding = false, disablePaymentIfMaxLevelReached, disablePaymentIfRiding,
|
||||||
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems, preventCropResizePayment, payItemDurabilityLoss,
|
boostedItemsInOffHand = false, boostedItemsInMainHand, boostedArmorItems/*, preventCropResizePayment*/, payItemDurabilityLoss,
|
||||||
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useBreederFinder,
|
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useBreederFinder,
|
||||||
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
||||||
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
|
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?");
|
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);
|
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");
|
"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.");
|
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);
|
payForStackedEntities = c.get("pay-for-stacked-entities", false);
|
||||||
|
@ -944,7 +944,8 @@ public class JobsPlayer {
|
|||||||
Double income = jobinfo.getIncome(level, numjobs, maxJobsEquation);
|
Double income = jobinfo.getIncome(level, numjobs, maxJobsEquation);
|
||||||
Double pointAmount = jobinfo.getPoints(level, numjobs, maxJobsEquation);
|
Double pointAmount = jobinfo.getPoints(level, numjobs, maxJobsEquation);
|
||||||
Double expAmount = jobinfo.getExperience(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;
|
return false;
|
||||||
|
@ -38,7 +38,6 @@ import org.bukkit.GameMode;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
|
||||||
import org.bukkit.block.BrewingStand;
|
import org.bukkit.block.BrewingStand;
|
||||||
import org.bukkit.block.Furnace;
|
import org.bukkit.block.Furnace;
|
||||||
import org.bukkit.block.data.Ageable;
|
import org.bukkit.block.data.Ageable;
|
||||||
@ -415,13 +414,14 @@ public class JobsPaymentListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Better implementation?
|
||||||
// Prevent money duplication when breaking plant blocks
|
// 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()
|
if (Jobs.getGCManager().preventCropResizePayment && (brokenBlock == CMIMaterial.SUGAR_CANE.getMaterial()
|
||||||
|| brokenBlock == CMIMaterial.KELP.getMaterial()
|
|| brokenBlock == CMIMaterial.KELP.getMaterial()
|
||||||
|| brokenBlock == CMIMaterial.CACTUS.getMaterial() || brokenBlock == CMIMaterial.BAMBOO.getMaterial())) {
|
|| brokenBlock == CMIMaterial.CACTUS.getMaterial() || brokenBlock == CMIMaterial.BAMBOO.getMaterial())) {
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), bInfo, block);
|
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), bInfo, block);
|
||||||
}
|
}
|
||||||
@ -461,14 +461,6 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (Jobs.getGCManager().disablePaymentIfRiding && player.isInsideVehicle())
|
if (Jobs.getGCManager().disablePaymentIfRiding && player.isInsideVehicle())
|
||||||
return;
|
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);
|
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new BlockActionInfo(block, ActionType.PLACE), block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user