Fix giving double treasures if the setting to give extra fish is on

Fixes #4363
This commit is contained in:
nossr50 2020-12-31 15:53:01 -08:00
parent 8ee405fbfd
commit 3f6de1c4ba
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ Version 2.1.165
mcMMO will now be compatible with changes to world height (1.17 compatibility)
Added missing cooldown locale message 'Commands.Database.Cooldown'
Added new locale message 'Taming.Summon.COTW.Removed'
mcMMO will ignore PlayerPickupItem events from "Fake-Player" NPCs if it recognizes them as such, this will prevent some issues
mcMMO will ignore EntityPickupItemEvents from "Fake-Player" NPCs if it recognizes them as such, this will prevent some compatibility issues with some plugins
NOTES:
Books dropped before this fix will not be usable and should just be chucked in lava, the broken books have blue names, the working books have yellow names.

View File

@ -449,11 +449,11 @@ public class FishingManager extends SkillManager {
}
if(fishingSucceeds) {
fishingCatch.setItemStack(treasureDrop);
if (Config.getInstance().getFishingExtraFish()) {
Misc.spawnItem(player.getEyeLocation(), fishingCatch.getItemStack(), ItemSpawnReason.FISHING_EXTRA_FISH);
}
fishingCatch.setItemStack(treasureDrop);
}
applyXpGain(fishXp + treasureXp, XPGainReason.PVE);