mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Merge pull request #1776 from Jsinco/master
Add config option to disable tamed animal payouts
This commit is contained in:
commit
d83d942186
10
pom.xml
10
pom.xml
@ -150,11 +150,11 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- CMILib -->
|
<!-- CMILib -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.github.Zrips</groupId>-->
|
<!-- <groupId>com.github.Zrips</groupId>-->
|
||||||
<!-- <artifactId>CMILib</artifactId>-->
|
<!-- <artifactId>CMILib</artifactId>-->
|
||||||
<!-- <version>1.4.7.4</version>-->
|
<!-- <version>1.4.7.4</version>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
<!-- WildStacker -->
|
<!-- WildStacker -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.bgsoftware</groupId>
|
<groupId>com.bgsoftware</groupId>
|
||||||
|
@ -46,7 +46,6 @@ import net.Zrips.CMILib.Equations.Parser;
|
|||||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||||
import net.Zrips.CMILib.Items.CMIItemStack;
|
import net.Zrips.CMILib.Items.CMIItemStack;
|
||||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
|
||||||
import net.Zrips.CMILib.Messages.CMIMessages;
|
import net.Zrips.CMILib.Messages.CMIMessages;
|
||||||
import net.Zrips.CMILib.Version.Version;
|
import net.Zrips.CMILib.Version.Version;
|
||||||
|
|
||||||
@ -107,7 +106,7 @@ public class GeneralConfigManager {
|
|||||||
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||||
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames, hideItemAttributes,
|
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames, hideItemAttributes,
|
||||||
DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UsePerPermissionForLeaving,
|
DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UsePerPermissionForLeaving,
|
||||||
EnableConfirmation, jobsInfoOpensBrowse, MonsterDamageUse, MonsterDamageIgnoreBosses, useMaxPaymentCurve, blockOwnershipTakeOver,
|
EnableConfirmation, jobsInfoOpensBrowse, MonsterDamageUse, MonsterDamageIgnoreBosses, tameablesPayout, useMaxPaymentCurve, blockOwnershipTakeOver,
|
||||||
hideJobsInfoWithoutPermission, UseTaxes, TransferToServerAccount, TakeFromPlayersPayment, AutoJobJoinUse, AllowDelevel, RomanNumbers,
|
hideJobsInfoWithoutPermission, UseTaxes, TransferToServerAccount, TakeFromPlayersPayment, AutoJobJoinUse, AllowDelevel, RomanNumbers,
|
||||||
BossBarEnabled = false, BossBarsMessageByDefault = false, ExploreCompact, ExploreSaveIntoDatabase = false, DBCleaningJobsUse, DBCleaningUsersUse,
|
BossBarEnabled = false, BossBarsMessageByDefault = false, ExploreCompact, ExploreSaveIntoDatabase = false, DBCleaningJobsUse, DBCleaningUsersUse,
|
||||||
DisabledWorldsUse, UseAsWhiteListWorldList, MythicMobsEnabled,
|
DisabledWorldsUse, UseAsWhiteListWorldList, MythicMobsEnabled,
|
||||||
@ -938,7 +937,10 @@ public class GeneralConfigManager {
|
|||||||
MonsterDamagePercentage = c.get("ExploitProtections.General.MonsterDamage.Percentage", 60);
|
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",
|
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");
|
"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", "McMMO abilities");
|
||||||
c.addComment("ExploitProtections.McMMO.TreeFellerMultiplier", "Players will get part of money from cutting trees with treefeller ability enabled.",
|
c.addComment("ExploitProtections.McMMO.TreeFellerMultiplier", "Players will get part of money from cutting trees with treefeller ability enabled.",
|
||||||
|
@ -16,7 +16,7 @@ import com.gamingmesh.jobs.container.JobsPlayer;
|
|||||||
|
|
||||||
public class JobsPayment1_20Listener implements Listener {
|
public class JobsPayment1_20Listener implements Listener {
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityBucketed(BlockDropItemEvent event) {
|
public void onBlockDropItem(BlockDropItemEvent event) {
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
@ -1378,7 +1378,7 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
if (uuid != null)
|
if (uuid != null)
|
||||||
pDamager = Bukkit.getPlayer(uuid);
|
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;
|
Tameable t = (Tameable) killer;
|
||||||
|
|
||||||
if (t.isTamed() && t.getOwner() instanceof Player)
|
if (t.isTamed() && t.getOwner() instanceof Player)
|
||||||
|
Loading…
Reference in New Issue
Block a user