mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Smelting!
This commit is contained in:
@ -303,4 +303,15 @@ public class BlockChecks {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canBeFluxMined(Block block) {
|
||||
switch (block.getType()) {
|
||||
case IRON_ORE:
|
||||
case GOLD_ORE:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -473,4 +473,21 @@ public class ItemChecks {
|
||||
type == Material.SHEARS || type == Material.FISHING_ROD || type == Material.CARROT_STICK ||
|
||||
type == Material.FLINT_AND_STEEL || type == Material.BOW;
|
||||
}
|
||||
|
||||
public static boolean isSmeltable(ItemStack itemStack) {
|
||||
switch (itemStack.getType()) {
|
||||
case COAL_ORE:
|
||||
case DIAMOND_ORE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GOLD_ORE:
|
||||
case IRON_ORE:
|
||||
case LAPIS_ORE:
|
||||
case REDSTONE_ORE:
|
||||
case EMERALD_ORE:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +113,10 @@ public class Permissions {
|
||||
return hasPermission(player, "mcmmo.perks.lucky.repair");
|
||||
}
|
||||
|
||||
public static boolean luckySmelting(Player player) {
|
||||
return hasPermission(player, "mcmmo.perks.lucky.smelting");
|
||||
}
|
||||
|
||||
public static boolean luckySwords(Player player) {
|
||||
return hasPermission(player, "mcmmo.perks.lucky.swords");
|
||||
}
|
||||
@ -502,6 +506,26 @@ public class Permissions {
|
||||
return hasPermission(player, "mcmmo.ability.blastmining.detonate");
|
||||
}
|
||||
|
||||
/*
|
||||
* MCMMO.ABILITY.SMELTING.*
|
||||
*/
|
||||
|
||||
public static boolean fuelEfficiency(Player player) {
|
||||
return hasPermission(player, "mcmmo.ability.smelting.fuelefficiency");
|
||||
}
|
||||
|
||||
public static boolean secondSmelt(Player player) {
|
||||
return hasPermission(player, "mcmmo.ability.smelting.secondsmelt");
|
||||
}
|
||||
|
||||
public static boolean fluxMining(Player player) {
|
||||
return hasPermission(player, "mcmmo.ability.smelting.fluxmining");
|
||||
}
|
||||
|
||||
public static boolean smeltingVanillaXPBoost(Player player) {
|
||||
return hasPermission(player, "mcmmo.ability.smelting.vanillaxpboost");
|
||||
}
|
||||
|
||||
/*
|
||||
* MCMMO.ITEM.*
|
||||
*/
|
||||
@ -602,4 +626,8 @@ public class Permissions {
|
||||
public static boolean acrobatics(Player player) {
|
||||
return hasPermission(player, "mcmmo.skills.acrobatics");
|
||||
}
|
||||
|
||||
public static boolean smelting(Player player) {
|
||||
return hasPermission(player, "mcmmo.skills.smelting");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user