mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Tweaked a few switch statements.
This commit is contained in:
parent
bc58aff362
commit
8257fd8e7c
@ -399,7 +399,7 @@ public class Mining {
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,10 @@ public class BlockChecks {
|
||||
* @return true if the block should allow ability activation, false otherwise
|
||||
*/
|
||||
public static boolean abilityBlockCheck(Block block) {
|
||||
if (customBlocksEnabled && CustomBlocksConfig.getInstance().customAbilityBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (block.getType()) {
|
||||
case BED_BLOCK:
|
||||
case BREWING_STAND:
|
||||
@ -94,17 +98,12 @@ public class BlockChecks {
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
|
||||
return false;
|
||||
}
|
||||
else if (customBlocksEnabled && CustomBlocksConfig.getInstance().customAbilityBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
if (block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,6 +148,7 @@ public class Combat {
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case WOLF:
|
||||
Wolf wolf = (Wolf) damager;
|
||||
|
||||
@ -173,6 +174,7 @@ public class Combat {
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ARROW:
|
||||
LivingEntity shooter = ((Arrow) damager).getShooter();
|
||||
|
||||
@ -190,7 +192,6 @@ public class Combat {
|
||||
}
|
||||
|
||||
archeryCheck((Player) shooter, target, event);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user