mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 12:14:43 +02:00
MASSIVE Permissions overhaul. Added a handful of new permissions,
renamed a few more. Changed Green Terra to handle blocks based on perms rather than the config file. For more details, read the diff.
This commit is contained in:
@ -67,7 +67,7 @@ public class Excavation {
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
List<ExcavationTreasure> treasures = new ArrayList<ExcavationTreasure>();
|
||||
|
||||
if (Permissions.excavationTreasures(player)) {
|
||||
if (Permissions.excavationTreasureHunter(player)) {
|
||||
switch (material) {
|
||||
case DIRT:
|
||||
treasures = TreasuresConfig.getInstance().excavationFromDirt;
|
||||
@ -105,7 +105,7 @@ public class Excavation {
|
||||
|
||||
for (ExcavationTreasure treasure : treasures) {
|
||||
if (mcMMOPlayer.getProfile().getSkillLevel(SkillType.EXCAVATION) >= treasure.getDropLevel()) {
|
||||
int activationChance = PerksUtils.handleLuckyPerks(Permissions.luckyExcavation(player));
|
||||
int activationChance = PerksUtils.handleLuckyPerks(player, SkillType.EXCAVATION);
|
||||
|
||||
if (Misc.getRandom().nextDouble() * activationChance <= treasure.getDropChance()) {
|
||||
xp += treasure.getXp();
|
||||
|
@ -27,7 +27,7 @@ public class ExcavationCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||
canTreasureHunt = Permissions.excavationTreasures(player);
|
||||
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user