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:
commit
3e7554f497
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user