This commit is contained in:
Indyuce 2020-07-04 14:27:32 +02:00
commit 512145007e

View File

@ -158,6 +158,26 @@ public class CustomBlockListener implements Listener {
NBTItem nbt = NBTItem.get(item);
if (nbt.hasType())
return nbt.getInteger("MMOITEMS_PICKAXE_POWER");
else {
switch(item.getType().name()) {
case "WOODEN_PICKAXE":
case "WOOD_PICKAXE":
return 5;
case "STONE_PICKAXE":
return 10;
case "GOLDEN_PICKAXE":
case "GOLD_PICKAXE":
return 15;
case "IRON_PICKAXE":
return 20;
case "DIAMOND_PICKAXE":
return 25;
case "NETHERITE_PICKAXE":
return 30;
default:
return 0;
}
}
}
return 0;