1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-04-03 10:16:23 +02:00

Merge pull request from MLG-Fortress/master

Don't handle item pickups when Items_As_Unarmed is set to true
This commit is contained in:
t00thpick1 2016-12-01 00:54:23 -05:00 committed by GitHub
commit ec0c7da494

@ -332,7 +332,7 @@ public class PlayerListener implements Listener {
}
}
if ((mcMMOPlayer.isUsingUnarmed() && ItemUtils.isSharable(dropStack)) || mcMMOPlayer.getAbilityMode(AbilityType.BERSERK)) {
if ((mcMMOPlayer.isUsingUnarmed() && ItemUtils.isSharable(dropStack) && !Config.getInstance().getUnarmedItemsAsUnarmed()) || mcMMOPlayer.getAbilityMode(AbilityType.BERSERK)) {
boolean pickupSuccess = Unarmed.handleItemPickup(player.getInventory(), drop);
boolean cancel = Config.getInstance().getUnarmedItemPickupDisabled() || pickupSuccess;
event.setCancelled(cancel);