Ver código fonte

Don't handle item pickups when Items_As_Unarmed is set to true

If `unarmed.Items_As_Unarmed` is set to true in config, then there's no
need to be manually handling item pickups.
RoboMWM 8 anos atrás
pai
commit
86432eb426

+ 1 - 1
src/main/java/com/gmail/nossr50/listeners/PlayerListener.java

@@ -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);