1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00

Add config option to disable tamed animal payouts

This commit is contained in:
Jsinco 2024-06-12 17:35:58 -04:00
parent 42e3043062
commit 7c86827672
3 changed files with 11 additions and 5 deletions

View File

@ -253,8 +253,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>D:\MC\Server 1.20.5\plugins\</outputDirectory>
<outputDirectory>${basedir}/build/jar</outputDirectory>
</configuration>
<!-- This should be kept local -->
<!--<configuration>
<outputDirectory>D:\MC\Server 1.20.5\plugins\</outputDirectory>
</configuration>-->
</plugin>
</plugins>
</build>

View File

@ -46,7 +46,6 @@ import net.Zrips.CMILib.Equations.Parser;
import net.Zrips.CMILib.FileHandler.ConfigReader;
import net.Zrips.CMILib.Items.CMIItemStack;
import net.Zrips.CMILib.Items.CMIMaterial;
import net.Zrips.CMILib.Logs.CMIDebug;
import net.Zrips.CMILib.Messages.CMIMessages;
import net.Zrips.CMILib.Version.Version;
@ -106,7 +105,7 @@ public class GeneralConfigManager {
EmptyServerAccountActionBar, ActionBarsMessageByDefault, aBarSilentMode, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames, hideItemAttributes,
DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UsePerPermissionForLeaving,
EnableConfirmation, jobsInfoOpensBrowse, MonsterDamageUse, MonsterDamageIgnoreBosses, useMaxPaymentCurve, blockOwnershipTakeOver,
EnableConfirmation, jobsInfoOpensBrowse, MonsterDamageUse, MonsterDamageIgnoreBosses, tameablesPayout, useMaxPaymentCurve, blockOwnershipTakeOver,
hideJobsInfoWithoutPermission, UseTaxes, TransferToServerAccount, TakeFromPlayersPayment, AutoJobJoinUse, AllowDelevel, RomanNumbers,
BossBarEnabled = false, BossBarShowOnEachAction = false, BossBarsMessageByDefault = false, ExploreCompact, ExploreSaveIntoDatabase = false, DBCleaningJobsUse, DBCleaningUsersUse,
DisabledWorldsUse, UseAsWhiteListWorldList, MythicMobsEnabled,
@ -919,7 +918,10 @@ public class GeneralConfigManager {
MonsterDamagePercentage = c.get("ExploitProtections.General.MonsterDamage.Percentage", 60);
c.addComment("ExploitProtections.General.MonsterDamage.IgnoreBosses", "When enabled we will avoid checking damage done to ender dragon, wither and warden",
"This can help out in case you have server with custom damage sources which might not be registered and payouts might not be given out");
MonsterDamageIgnoreBosses = c.get("ExploitProtections.General.MonsterDamage.IgnoreBosses", true);
MonsterDamageIgnoreBosses = c.get("ExploitProtections.General.MonsterDamage.IgnoreBosses", true); // TODO
c.addComment("ExploitProtections.General.TameablesPayout", "Should tamed animals payout to their owners?");
tameablesPayout = c.get("ExploitProtections.General.TameablesPayout", true);
c.addComment("ExploitProtections.McMMO", "McMMO abilities");
c.addComment("ExploitProtections.McMMO.TreeFellerMultiplier", "Players will get part of money from cutting trees with treefeller ability enabled.",

View File

@ -1363,7 +1363,7 @@ public final class JobsPaymentListener implements Listener {
if (uuid != null)
pDamager = Bukkit.getPlayer(uuid);
} else if (isTameable) { // Checking if killer is tamed animal
} else if (isTameable && Jobs.getGCManager().tameablesPayout) { // Checking if killer is tamed animal
Tameable t = (Tameable) killer;
if (t.isTamed() && t.getOwner() instanceof Player)