1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-07-04 14:44:44 +02:00

Fixed exploit where you could gain tons of Acrobatics XP from spamming

Ender Pearls
This commit is contained in:
GJ
2012-05-21 23:41:11 -04:00
parent f9e5096ceb
commit 41c9741b72
5 changed files with 24 additions and 10 deletions
Changelog.txt
src/main/java/com/gmail/nossr50

@ -15,6 +15,7 @@ public class ModChecks {
private static Config configInstance = Config.getInstance();
private static boolean customToolsEnabled = configInstance.getToolModsEnabled();
private static boolean customArmorEnabled = configInstance.getArmorModsEnabled();
private static boolean customBlocksEnabled = configInstance.getBlockModsEnabled();
private static CustomToolsConfig toolInstance = CustomToolsConfig.getInstance();
private static CustomArmorConfig armorInstance = CustomArmorConfig.getInstance();
@ -60,6 +61,21 @@ public class ModChecks {
return null;
}
/**
* Check if a custom block is a custom block.
*
* @param block The block to check
* @return true if the block is custom, false otherwise
*/
public static boolean isCustomMiningBlock(Block block) {
if (customBlocksEnabled && blocksInstance.customMiningBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return true;
}
else {
return false;
}
}
/**
* Check if a custom block is a leaf block.
*