mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 08:09:39 +01:00
Add option to control Unarmed item pickup behavior
By default when using Unarmed, picking up items is prevented when a players entire inventory is full, except for his empty hand.
This commit is contained in:
parent
1c30146491
commit
30085e1e34
@ -474,6 +474,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
/* Unarmed */
|
||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
||||
public boolean getUnarmedItemPickupDisabled() { return config.getBoolean("Skills.Unarmed.Item_Pickup_Disabled_Full_Inventory", true); }
|
||||
|
||||
/* Taming */
|
||||
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||
|
@ -333,7 +333,8 @@ public class PlayerListener implements Listener {
|
||||
|
||||
if ((mcMMOPlayer.isUsingUnarmed() && ItemUtils.isSharable(dropStack)) || mcMMOPlayer.getAbilityMode(AbilityType.BERSERK)) {
|
||||
boolean pickupSuccess = Unarmed.handleItemPickup(player.getInventory(), drop);
|
||||
event.setCancelled(pickupSuccess);
|
||||
boolean cancel = Config.getInstance().getUnarmedItemPickupDisabled() || pickupSuccess;
|
||||
event.setCancelled(cancel);
|
||||
|
||||
if (pickupSuccess) {
|
||||
player.playSound(player.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
|
||||
|
@ -352,6 +352,9 @@ Skills:
|
||||
Level_Cap: 0
|
||||
Block_Cracker:
|
||||
SmoothBrick_To_CrackedBrick: true
|
||||
# When using Unarmed, picked up items will automatically get moved to a free slot instead of going in the slot
|
||||
# of your hand. Should item pickup be disabled when your entire inventory - except for your hand - is full?
|
||||
Item_Pickup_Disabled_Full_Inventory: true
|
||||
Woodcutting:
|
||||
Tree_Feller_Sounds: true
|
||||
Level_Cap: 0
|
||||
|
Loading…
Reference in New Issue
Block a user