1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-27 03:17:49 +01:00

Merge pull request #1776 from Jsinco/master

Add config option to disable tamed animal payouts
This commit is contained in:
Zrips 2024-08-15 13:32:13 +03:00 committed by GitHub
commit d83d942186
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 13 deletions

16
pom.xml
View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Jobs</groupId>
<artifactId>jobs</artifactId>
@ -150,11 +150,11 @@
</exclusions>
</dependency>
<!-- CMILib -->
<!-- <dependency>-->
<!-- <groupId>com.github.Zrips</groupId>-->
<!-- <artifactId>CMILib</artifactId>-->
<!-- <version>1.4.7.4</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.Zrips</groupId>-->
<!-- <artifactId>CMILib</artifactId>-->
<!-- <version>1.4.7.4</version>-->
<!-- </dependency>-->
<!-- WildStacker -->
<dependency>
<groupId>com.bgsoftware</groupId>
@ -232,7 +232,7 @@
<url>https://repo.bg-software.com/repository/api/</url>
</repository>
<!-- MyPet -->
<!--<repository> <id>mypet-repo</id> <url>https://repo.mypet-plugin.de/</url>
<!--<repository> <id>mypet-repo</id> <url>https://repo.mypet-plugin.de/</url>
</repositor> -->
</repositories>
<!-- Builds Plugin -->

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;
@ -107,7 +106,7 @@ public class GeneralConfigManager {
EmptyServerAccountActionBar, ActionBarsMessageByDefault, 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, BossBarsMessageByDefault = false, ExploreCompact, ExploreSaveIntoDatabase = false, DBCleaningJobsUse, DBCleaningUsersUse,
DisabledWorldsUse, UseAsWhiteListWorldList, MythicMobsEnabled,
@ -938,7 +937,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

@ -16,7 +16,7 @@ import com.gamingmesh.jobs.container.JobsPlayer;
public class JobsPayment1_20Listener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityBucketed(BlockDropItemEvent event) {
public void onBlockDropItem(BlockDropItemEvent event) {
Player player = event.getPlayer();

View File

@ -1378,7 +1378,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)