1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Fix stonecutter exploit when craft action called multiple times (#965)

This commit is contained in:
Futurixel 2020-10-18 16:32:03 +02:00 committed by GitHub
parent bc00105bde
commit 58bcb0d45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,7 @@ import org.bukkit.event.entity.SlimeSplitEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.hanging.HangingPlaceEvent;
import org.bukkit.event.inventory.BrewEvent;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.CraftItemEvent;
import org.bukkit.event.inventory.FurnaceSmeltEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
@ -877,7 +878,9 @@ public class JobsPaymentListener implements Listener {
return;
if (Version.isCurrentEqualOrHigher(Version.v1_14_R1) && inv instanceof StonecutterInventory) {
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
if (event.getAction() != InventoryAction.DROP_ONE_SLOT) {
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
}
return;
}