mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
MAJOR PERMISSIONS UPDATE. PLEASE CHECK PLUGIN.YML FOR DETAILS.
This commit is contained in:
@ -31,11 +31,15 @@ public class Acrobatics {
|
||||
int damage = event.getDamage();
|
||||
int health = player.getHealth();
|
||||
|
||||
if (!mcPermissions.getInstance().gracefulRoll(player)) {
|
||||
gracefulRoll = false;
|
||||
}
|
||||
|
||||
if (gracefulRoll) {
|
||||
acrovar = acrovar * 2;
|
||||
}
|
||||
|
||||
if (acrovar > MAX_BONUS_LEVEL || Math.random() * 1000 <= acrovar) {
|
||||
if ((acrovar > MAX_BONUS_LEVEL || Math.random() * 1000 <= acrovar) && mcPermissions.getInstance().roll(player)) {
|
||||
int threshold = 7;
|
||||
|
||||
if (gracefulRoll) {
|
||||
@ -99,7 +103,7 @@ public class Acrobatics {
|
||||
int skillLevel = PPd.getSkillLevel(SkillType.ACROBATICS);
|
||||
int skillCheck = m.skillCheck(skillLevel, MAX_BONUS_LEVEL);
|
||||
|
||||
if (Math.random() * 4000 <= skillCheck) {
|
||||
if (Math.random() * 4000 <= skillCheck && mcPermissions.getInstance().dodge(defender)) {
|
||||
defender.sendMessage(mcLocale.getString("Acrobatics.Dodge"));
|
||||
|
||||
if (System.currentTimeMillis() >= (5000 + PPd.getRespawnATS()) && defender.getHealth() >= 1) {
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
@ -100,7 +101,7 @@ public class Archery {
|
||||
loc.setPitch(-90);
|
||||
}
|
||||
|
||||
if (Math.random() * 2000 <= skillCheck) {
|
||||
if (Math.random() * 2000 <= skillCheck && mcPermissions.getInstance().daze(attacker)) {
|
||||
defender.teleport(loc);
|
||||
defender.sendMessage(mcLocale.getString("Combat.TouchedFuzzy"));
|
||||
attacker.sendMessage(mcLocale.getString("Combat.TargetDazed"));
|
||||
|
@ -233,6 +233,12 @@ public class BlastMining {
|
||||
event.setDamage(damage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remotely detonate TNT for Blast Mining.
|
||||
*
|
||||
* @param player Player detonating the TNT
|
||||
* @param plugin mcMMO plugin instance
|
||||
*/
|
||||
public static void remoteDetonation(Player player, mcMMO plugin) {
|
||||
final byte SNOW = 78;
|
||||
final byte AIR = 0;
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.config.LoadTreasures;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
@ -61,55 +62,57 @@ public class Excavation {
|
||||
ArrayList<ItemStack> is = new ArrayList<ItemStack>();
|
||||
|
||||
List<ExcavationTreasure> treasures = new ArrayList<ExcavationTreasure>();
|
||||
|
||||
|
||||
int xp = LoadProperties.mbase;
|
||||
|
||||
switch (type) {
|
||||
case DIRT:
|
||||
treasures = LoadTreasures.excavationFromDirt;
|
||||
break;
|
||||
if (mcPermissions.getInstance().excavationTreasures(player)) {
|
||||
switch (type) {
|
||||
case DIRT:
|
||||
treasures = LoadTreasures.excavationFromDirt;
|
||||
break;
|
||||
|
||||
case GRASS:
|
||||
treasures = LoadTreasures.excavationFromGrass;
|
||||
break;
|
||||
case GRASS:
|
||||
treasures = LoadTreasures.excavationFromGrass;
|
||||
break;
|
||||
|
||||
case SAND:
|
||||
treasures = LoadTreasures.excavationFromSand;
|
||||
break;
|
||||
case SAND:
|
||||
treasures = LoadTreasures.excavationFromSand;
|
||||
break;
|
||||
|
||||
case GRAVEL:
|
||||
treasures = LoadTreasures.excavationFromGravel;
|
||||
break;
|
||||
case GRAVEL:
|
||||
treasures = LoadTreasures.excavationFromGravel;
|
||||
break;
|
||||
|
||||
case CLAY:
|
||||
treasures = LoadTreasures.excavationFromClay;
|
||||
break;
|
||||
case CLAY:
|
||||
treasures = LoadTreasures.excavationFromClay;
|
||||
break;
|
||||
|
||||
case MYCEL:
|
||||
treasures = LoadTreasures.excavationFromMycel;
|
||||
break;
|
||||
case MYCEL:
|
||||
treasures = LoadTreasures.excavationFromMycel;
|
||||
break;
|
||||
|
||||
case SOUL_SAND:
|
||||
treasures = LoadTreasures.excavationFromSoulSand;
|
||||
break;
|
||||
case SOUL_SAND:
|
||||
treasures = LoadTreasures.excavationFromSoulSand;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (ExcavationTreasure treasure : treasures) {
|
||||
if (skillLevel >= treasure.getDropLevel()) {
|
||||
if (Math.random() * 100 <= treasure.getDropChance()) {
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
for (ExcavationTreasure treasure : treasures) {
|
||||
if (skillLevel >= treasure.getDropLevel()) {
|
||||
if (Math.random() * 100 <= treasure.getDropChance()) {
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Drop items
|
||||
for (ItemStack x : is) {
|
||||
if (x != null) {
|
||||
m.mcDropItem(loc, x);
|
||||
//Drop items
|
||||
for (ItemStack x : is) {
|
||||
if (x != null) {
|
||||
m.mcDropItem(loc, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -150,7 +151,7 @@ public class Herbalism {
|
||||
mat = Material.WHEAT;
|
||||
xp = LoadProperties.mwheat;
|
||||
|
||||
if (LoadProperties.wheatRegrowth) {
|
||||
if (LoadProperties.wheatRegrowth && mcPermissions.getInstance().greenThumbWheat(player)) {
|
||||
greenThumbWheat(block, player, event, plugin);
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
@ -164,7 +165,7 @@ public class Mining
|
||||
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.MINING);
|
||||
|
||||
if (MAX_BONUS_LEVEL > 1000 || (Math.random() * 1000 <= skillLevel)) {
|
||||
if ((MAX_BONUS_LEVEL > 1000 || (Math.random() * 1000 <= skillLevel)) && mcPermissions.getInstance().miningDoubleDrops(player)) {
|
||||
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||
m.mcDropItem(block.getLocation(), new ItemStack(block.getType()));
|
||||
}
|
||||
|
@ -39,18 +39,18 @@ public class Repair {
|
||||
/*
|
||||
* REPAIR ARMOR
|
||||
*/
|
||||
if (ItemChecks.isArmor(is) && LoadProperties.repairArmor) {
|
||||
if (ItemChecks.isDiamondArmor(is) && inventory.contains(LoadProperties.rDiamond) && skillLevel >= LoadProperties.repairdiamondlevel) {
|
||||
if (ItemChecks.isArmor(is) && LoadProperties.repairArmor && mcPermissions.getInstance().armorRepair(player)) {
|
||||
if (ItemChecks.isDiamondArmor(is) && inventory.contains(LoadProperties.rDiamond) && skillLevel >= LoadProperties.repairdiamondlevel && mcPermissions.getInstance().diamondRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rDiamond));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 6, true);
|
||||
}
|
||||
else if (ItemChecks.isIronArmor(is) && inventory.contains(LoadProperties.rIron) && skillLevel >= LoadProperties.repairIronLevel) {
|
||||
else if (ItemChecks.isIronArmor(is) && inventory.contains(LoadProperties.rIron) && skillLevel >= LoadProperties.repairIronLevel && mcPermissions.getInstance().ironRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rIron));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, true);
|
||||
}
|
||||
else if (ItemChecks.isGoldArmor(is) && inventory.contains(LoadProperties.rGold) && skillLevel >= LoadProperties.repairGoldLevel) {
|
||||
else if (ItemChecks.isGoldArmor(is) && inventory.contains(LoadProperties.rGold) && skillLevel >= LoadProperties.repairGoldLevel && mcPermissions.getInstance().goldRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rGold));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 4, true);
|
||||
@ -68,8 +68,8 @@ public class Repair {
|
||||
/*
|
||||
* REPAIR TOOLS
|
||||
*/
|
||||
else if (ItemChecks.isTool(is) && LoadProperties.repairTools) {
|
||||
if (ItemChecks.isStoneTool(is) && inventory.contains(LoadProperties.rStone) && skillLevel >= LoadProperties.repairStoneLevel) {
|
||||
else if (ItemChecks.isTool(is) && LoadProperties.repairTools && mcPermissions.getInstance().toolRepair(player)) {
|
||||
if (ItemChecks.isStoneTool(is) && inventory.contains(LoadProperties.rStone) && skillLevel >= LoadProperties.repairStoneLevel && mcPermissions.getInstance().stoneRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rStone));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||
@ -79,17 +79,17 @@ public class Repair {
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||
}
|
||||
else if (ItemChecks.isIronTool(is) && inventory.contains(LoadProperties.rIron) && skillLevel >= LoadProperties.repairIronLevel) {
|
||||
else if (ItemChecks.isIronTool(is) && inventory.contains(LoadProperties.rIron) && skillLevel >= LoadProperties.repairIronLevel && mcPermissions.getInstance().ironRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rIron));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 1, true);
|
||||
}
|
||||
else if (ItemChecks.isDiamondTool(is) && inventory.contains(LoadProperties.rDiamond) && skillLevel >= LoadProperties.repairdiamondlevel) {
|
||||
else if (ItemChecks.isDiamondTool(is) && inventory.contains(LoadProperties.rDiamond) && skillLevel >= LoadProperties.repairdiamondlevel && mcPermissions.getInstance().diamondRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rDiamond));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 1, true);
|
||||
}
|
||||
else if (ItemChecks.isGoldTool(is) && inventory.contains(LoadProperties.rGold) && skillLevel >= LoadProperties.repairGoldLevel) {
|
||||
else if (ItemChecks.isGoldTool(is) && inventory.contains(LoadProperties.rGold) && skillLevel >= LoadProperties.repairGoldLevel && mcPermissions.getInstance().goldRepair(player)) {
|
||||
inventory.removeItem(new ItemStack(LoadProperties.rGold));
|
||||
repairItem(player, is);
|
||||
xpHandler(player, PP, is, durabilityBefore, 8, true);
|
||||
@ -188,7 +188,7 @@ public class Repair {
|
||||
|
||||
int rank = getArcaneForgingRank(Users.getProfile(player).getSkillLevel(SkillType.REPAIR));
|
||||
|
||||
if (rank == 0) {
|
||||
if (rank == 0 || !mcPermissions.getInstance().arcaneForging(player)) {
|
||||
for (Enchantment x : enchants.keySet()) {
|
||||
is.removeEnchantment(x);
|
||||
}
|
||||
@ -410,7 +410,7 @@ public class Repair {
|
||||
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
|
||||
|
||||
if(skillLevel > MAX_BONUS_LEVEL || (Math.random() * 1000 <= skillLevel)) {
|
||||
if ((skillLevel > MAX_BONUS_LEVEL || (Math.random() * 1000 <= skillLevel)) && mcPermissions.getInstance().repairBonus(player)) {
|
||||
player.sendMessage(mcLocale.getString("Skills.FeltEasy"));
|
||||
return true;
|
||||
}
|
||||
@ -428,7 +428,7 @@ public class Repair {
|
||||
public static void repairItem(Player player, ItemStack is) {
|
||||
|
||||
/* Handle the enchants */
|
||||
if (LoadProperties.mayLoseEnchants && !mcPermissions.getInstance().repairArcaneBypass(player)) {
|
||||
if (LoadProperties.mayLoseEnchants && !mcPermissions.getInstance().arcaneBypass(player)) {
|
||||
addEnchants(player, is);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class Swords {
|
||||
Player defender = (Player) target;
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
|
||||
if (ItemChecks.isSword(defender.getItemInHand()) && mcPermissions.getInstance().swords(defender)) {
|
||||
if (ItemChecks.isSword(defender.getItemInHand()) && mcPermissions.getInstance().counterAttack(defender)) {
|
||||
final int MAX_BONUS_LEVEL = 600;
|
||||
final int COUNTER_ATTACK_MODIFIER = 2;
|
||||
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -17,6 +18,7 @@ import org.bukkit.metadata.FixedMetadataValue;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -104,7 +106,7 @@ public class Taming {
|
||||
* @param theWolf The wolf whose owner's name to get
|
||||
* @return the name of the wolf's owner, or "Offline Master" if the owner is offline
|
||||
*/
|
||||
public static String getOwnerName(Wolf theWolf) {
|
||||
private static String getOwnerName(Wolf theWolf) {
|
||||
AnimalTamer tamer = theWolf.getOwner();
|
||||
|
||||
if (tamer instanceof Player) {
|
||||
@ -140,41 +142,51 @@ public class Taming {
|
||||
case CONTACT:
|
||||
case LAVA:
|
||||
case FIRE:
|
||||
if (skillLevel >= ENVIRONMENTALLY_AWARE_LEVEL) {
|
||||
if (event.getDamage() >= wolf.getHealth()) {
|
||||
return;
|
||||
}
|
||||
if (mcPermissions.getInstance().environmentallyAware(master)) {
|
||||
if (skillLevel >= ENVIRONMENTALLY_AWARE_LEVEL) {
|
||||
if (event.getDamage() >= wolf.getHealth()) {
|
||||
return;
|
||||
}
|
||||
|
||||
wolf.teleport(master.getLocation());
|
||||
master.sendMessage(mcLocale.getString("mcEntityListener.WolfComesBack"));
|
||||
wolf.teleport(master.getLocation());
|
||||
master.sendMessage(mcLocale.getString("mcEntityListener.WolfComesBack"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case FALL:
|
||||
if (skillLevel >= ENVIRONMENTALLY_AWARE_LEVEL) {
|
||||
event.setCancelled(true);
|
||||
if (mcPermissions.getInstance().environmentallyAware(master)) {
|
||||
if (skillLevel >= ENVIRONMENTALLY_AWARE_LEVEL) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* Thick Fur */
|
||||
case FIRE_TICK:
|
||||
if(skillLevel >= THICK_FUR_LEVEL) {
|
||||
wolf.setFireTicks(0);
|
||||
if (mcPermissions.getInstance().thickFur(master)) {
|
||||
if(skillLevel >= THICK_FUR_LEVEL) {
|
||||
wolf.setFireTicks(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ENTITY_ATTACK:
|
||||
case PROJECTILE:
|
||||
if (skillLevel >= THICK_FUR_LEVEL) {
|
||||
event.setDamage(event.getDamage() / THICK_FUR_MODIFIER);
|
||||
if (mcPermissions.getInstance().thickFur(master)) {
|
||||
if (skillLevel >= THICK_FUR_LEVEL) {
|
||||
event.setDamage(event.getDamage() / THICK_FUR_MODIFIER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* Shock Proof */
|
||||
case ENTITY_EXPLOSION:
|
||||
case BLOCK_EXPLOSION:
|
||||
if (skillLevel >= SHOCK_PROOF_LEVEL) {
|
||||
event.setDamage(event.getDamage() / SHOCK_PROOF_MODIFIER);
|
||||
if (mcPermissions.getInstance().shockProof(master)) {
|
||||
if (skillLevel >= SHOCK_PROOF_LEVEL) {
|
||||
event.setDamage(event.getDamage() / SHOCK_PROOF_MODIFIER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -229,4 +241,31 @@ public class Taming {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspect a tamed animal for details.
|
||||
*
|
||||
* @param event
|
||||
* @param target
|
||||
*/
|
||||
public static void beastLore(EntityDamageByEntityEvent event, LivingEntity target, Player attacker) {
|
||||
|
||||
//TODO: Make this work for Ocelots
|
||||
if (target.getType().equals(EntityType.WOLF)) {
|
||||
Wolf wolf = (Wolf) target;
|
||||
String message = mcLocale.getString("Combat.BeastLore") + " ";
|
||||
int health = wolf.getHealth();
|
||||
event.setCancelled(true);
|
||||
|
||||
if (wolf.isTamed()) {
|
||||
message = message.concat(mcLocale.getString("Combat.BeastLoreOwner", new Object[] {getOwnerName(wolf)}) + " ");
|
||||
message = message.concat(mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {health}));
|
||||
}
|
||||
else {
|
||||
message = message.concat(mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {health}));
|
||||
}
|
||||
|
||||
attacker.sendMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
@ -54,4 +56,22 @@ public class Unarmed {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for arrow deflection.
|
||||
*
|
||||
* @param defender The defending player
|
||||
* @param event The event to modify
|
||||
*/
|
||||
public static void deflectCheck(Player defender, EntityDamageByEntityEvent event) {
|
||||
final int MAX_BONUS_LEVEL = 1000;
|
||||
|
||||
int skillLevel = Users.getProfile(defender).getSkillLevel(SkillType.UNARMED);
|
||||
int skillCheck = m.skillCheck(skillLevel, MAX_BONUS_LEVEL);
|
||||
|
||||
if (Math.random() * 2000 <= skillCheck && mcPermissions.getInstance().deflect(defender)) {
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.Bukkit;
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -248,7 +249,7 @@ public class WoodCutting {
|
||||
byte type = block.getData();
|
||||
Material mat = Material.getMaterial(block.getTypeId());
|
||||
|
||||
if (skillLevel > MAX_SKILL_LEVEL || Math.random() * 1000 <= skillLevel) {
|
||||
if ((skillLevel > MAX_SKILL_LEVEL || Math.random() * 1000 <= skillLevel) && mcPermissions.getInstance().woodcuttingDoubleDrops(player)) {
|
||||
ItemStack item = new ItemStack(mat, 1, (short) 0, type);
|
||||
m.mcDropItem(block.getLocation(), item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user