1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #1074 from LinoxGH/master

A quick hotfix for diet cookies crashing the server.
This commit is contained in:
TheBusyBiscuit 2019-09-01 18:54:51 +02:00 committed by GitHub
commit 3e7554f497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,10 +28,10 @@ public class DietCookie extends SimpleSlimefunItem {
int amount = item.getAmount(); int amount = item.getAmount();
if (amount <= 1) { if (amount <= 1) {
if (e.getParentEvent().getHand() == EquipmentSlot.HAND) { if (e.getParentEvent().getHand() == EquipmentSlot.HAND) {
p.getInventory().setItemInMainHand(null); item.setAmount(0);
} }
else { else {
p.getInventory().setItemInOffHand(null); item.setAmount(0);
} }
} }
else { else {