mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-01 17:36:46 +01:00
Toolless unarmed now configurable
Added features outlined here: https://github.com/mcMMO-Dev/mcMMO/pull/2389 New option in config.yml: Items_As_Unarmed When marked as true, users can attack with any non-item (blocks, their hand, etc.) and it will count as unarmed.
This commit is contained in:
parent
e19a898aa6
commit
64a54873ee
@ -7,6 +7,8 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
|
+ Added option to config.yml to let non-tools in hand count as unarmed
|
||||||
|
|
||||||
Version 1.5.02-dev
|
Version 1.5.02-dev
|
||||||
+ Added option to config.yml for Chimaera Wings to stop using bed spawn points
|
+ Added option to config.yml for Chimaera Wings to stop using bed spawn points
|
||||||
= Fixed bug where no Mining XP was granted when Flux Mining was successful
|
= Fixed bug where no Mining XP was granted when Flux Mining was successful
|
||||||
|
@ -498,6 +498,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* Unarmed */
|
/* Unarmed */
|
||||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
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); }
|
public boolean getUnarmedItemPickupDisabled() { return config.getBoolean("Skills.Unarmed.Item_Pickup_Disabled_Full_Inventory", true); }
|
||||||
|
public boolean getUnarmedItemsAsUnarmed() { return config.getBoolean("Skills.Unarmed.Items_As_Unarmed", false); }
|
||||||
|
|
||||||
/* Taming */
|
/* Taming */
|
||||||
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.material.Dye;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.party.ItemWeightConfig;
|
import com.gmail.nossr50.config.party.ItemWeightConfig;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
public final class ItemUtils {
|
public final class ItemUtils {
|
||||||
@ -153,7 +154,10 @@ public final class ItemUtils {
|
|||||||
* @return true if the item counts as unarmed, false otherwise
|
* @return true if the item counts as unarmed, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isUnarmed(ItemStack item) {
|
public static boolean isUnarmed(ItemStack item) {
|
||||||
return !isMinecraftTool(item);
|
if(Config.getInstance().getUnarmedItemsAsUnarmed())
|
||||||
|
return !isMinecraftTool(item);
|
||||||
|
|
||||||
|
return item.getType() == Material.AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -395,6 +395,8 @@ Skills:
|
|||||||
# When using Unarmed, picked up items will automatically get moved to a free slot instead of going in the slot
|
# 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?
|
# of your hand. Should item pickup be disabled when your entire inventory - except for your hand - is full?
|
||||||
Item_Pickup_Disabled_Full_Inventory: true
|
Item_Pickup_Disabled_Full_Inventory: true
|
||||||
|
# Any attacks made without a tool, i.e. with one's open hand, a block, etc., will count as unarmed.
|
||||||
|
Items_As_Unarmed: false
|
||||||
Woodcutting:
|
Woodcutting:
|
||||||
Tree_Feller_Sounds: true
|
Tree_Feller_Sounds: true
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user