mcMMO/src/main/java/com/gmail/nossr50/util/Permissions.java

701 lines
20 KiB
Java
Raw Normal View History

2012-04-27 11:47:11 +02:00
package com.gmail.nossr50.util;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Bukkit;
2013-01-07 02:52:31 +01:00
import org.bukkit.command.CommandSender;
2012-04-27 11:47:11 +02:00
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permission;
import org.bukkit.plugin.PluginManager;
2012-04-27 11:47:11 +02:00
import com.gmail.nossr50.skills.utilities.SkillType;
2013-01-22 02:01:33 +01:00
2013-01-26 23:01:55 +01:00
public final class Permissions {
private Permissions() {}
2013-01-07 02:52:31 +01:00
2013-01-26 23:01:55 +01:00
public static boolean hasPermission(CommandSender sender, String perm) {
return (sender.hasPermission(perm));
2012-04-27 11:47:11 +02:00
}
public static boolean hasDynamicPermission(CommandSender sender, String perm, String defaultType) {
Map<String, Object> m = new HashMap<String, Object>();
if(defaultType != null) {
m.put("default", defaultType);
}
PluginManager manager = Bukkit.getPluginManager();
if (manager.getPermission(perm) == null) {
Permission.loadPermission(perm, m);
}
return hasPermission(sender, perm);
}
2012-04-27 11:47:11 +02:00
/*
* GENERIC PERMISSIONS
*/
2013-01-07 02:52:31 +01:00
public static boolean motd(Player player) {
return player.hasPermission("mcmmo.motd");
2012-04-27 11:47:11 +02:00
}
/**
* @deprecated Use the permission "mcmmo.all" instead.
*/
@Deprecated
2013-01-07 02:52:31 +01:00
public static boolean admin(Player player) {
return player.hasPermission("mcmmo.admin");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.BYPASS.*
*/
2013-01-07 02:52:31 +01:00
public static boolean hardcoremodeBypass(Player player) {
return player.hasPermission("mcmmo.bypass.hardcoremode");
2012-04-30 15:44:56 +02:00
}
2012-05-01 15:11:56 +02:00
2013-01-07 02:52:31 +01:00
public static boolean arcaneBypass(Player player) {
return player.hasPermission("mcmmo.bypass.arcanebypass");
2012-04-27 11:47:11 +02:00
}
2013-01-31 15:00:17 +01:00
/**
* @deprecated Use {@link #inspectFar(player)} instead.
*/
@Deprecated
2013-01-07 02:52:31 +01:00
public static boolean inspectDistanceBypass(Player player) {
return player.hasPermission("mcmmo.bypass.inspect.distance");
2013-01-31 15:00:17 +01:00
}
2013-01-31 15:00:17 +01:00
public static boolean inspectFar(Player player) {
return (player.hasPermission("mcmmo.commands.inspect.far"));
2012-04-27 11:47:11 +02:00
}
2013-01-31 15:00:17 +01:00
/**
* @deprecated Use {@link #inspectOffline(player)} instead.
*/
@Deprecated
2013-01-07 02:52:31 +01:00
public static boolean inspectOfflineBypass(Player player) {
return player.hasPermission("mcmmo.bypass.inspect.offline");
2013-01-31 15:00:17 +01:00
}
2013-01-31 15:00:17 +01:00
public static boolean inspectOffline(Player player) {
return (player.hasPermission("mcmmo.commands.inspect.offline"));
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.TOOLS.*
*/
2013-01-07 02:52:31 +01:00
public static boolean mcrefresh(Player player) {
return player.hasPermission("mcmmo.tools.mcrefresh");
2013-01-07 02:52:31 +01:00
}
public static boolean mcremove(Player player) {
return player.hasPermission("mcmmo.tools.mcremove");
2013-01-07 02:52:31 +01:00
}
/**
* @deprecated Use {@link #mmoeditCommand(player)} instead.
*/
@Deprecated
public static boolean mmoedit(CommandSender sender) {
2013-02-13 04:54:17 +01:00
return sender.hasPermission("mcmmo.tools.mmoedit");
2013-01-07 02:52:31 +01:00
}
/**
* @deprecated Use {@link #mcgodCommand(player)} instead.
*/
@Deprecated
public static boolean mcgod(CommandSender sender) {
2013-02-13 04:54:17 +01:00
return sender.hasPermission("mcmmo.tools.mcgod");
2013-01-07 02:52:31 +01:00
}
/*
* MCMMO.PERKS.LUCKY*
*/
2013-01-22 02:01:33 +01:00
public static boolean lucky(Player player, SkillType skill) {
return player.hasPermission("mcmmo.perks.lucky." + skill.toString().toLowerCase());
2013-01-22 02:01:33 +01:00
}
2013-01-07 02:52:31 +01:00
public static boolean luckyAcrobatics(Player player) {
return player.hasPermission("mcmmo.perks.lucky.acrobatics");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyArchery(Player player) {
return player.hasPermission("mcmmo.perks.lucky.archery");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyAxes(Player player) {
return player.hasPermission("mcmmo.perks.lucky.axes");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyExcavation(Player player) {
return player.hasPermission("mcmmo.perks.lucky.excavation");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyFishing(Player player) {
return player.hasPermission("mcmmo.perks.lucky.fishing");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyHerbalism(Player player) {
return player.hasPermission("mcmmo.perks.lucky.herbalism");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyMining(Player player) {
return player.hasPermission("mcmmo.perks.lucky.mining");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyRepair(Player player) {
return player.hasPermission("mcmmo.perks.lucky.repair");
2013-01-07 02:52:31 +01:00
}
2013-01-23 22:34:01 +01:00
public static boolean luckySmelting(Player player) {
return player.hasPermission("mcmmo.perks.lucky.smelting");
2013-01-23 22:34:01 +01:00
}
2013-01-07 02:52:31 +01:00
public static boolean luckySwords(Player player) {
return player.hasPermission("mcmmo.perks.lucky.swords");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyTaming(Player player) {
return player.hasPermission("mcmmo.perks.lucky.taming");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean luckyUnarmed(Player player) {
return player.hasPermission("mcmmo.perks.lucky.unarmed");
2013-01-07 02:52:31 +01:00
}
public static boolean luckyWoodcutting(Player player) {
return player.hasPermission("mcmmo.perks.lucky.woodcutting");
2013-01-07 02:52:31 +01:00
}
/*
* MCMMO.PERKS.XP*
*/
public static boolean xpQuadruple(Player player) {
return player.hasPermission("mcmmo.perks.xp.quadruple");
2013-01-07 02:52:31 +01:00
}
public static boolean xpTriple(Player player) {
return player.hasPermission("mcmmo.perks.xp.triple");
2013-01-07 02:52:31 +01:00
}
public static boolean xpDoubleAndOneHalf(Player player) {
return player.hasPermission("mcmmo.perks.xp.150percentboost");
2013-01-07 02:52:31 +01:00
}
public static boolean xpDouble(Player player) {
return player.hasPermission("mcmmo.perks.xp.double");
2013-01-07 02:52:31 +01:00
}
public static boolean xpOneAndOneHalf(Player player) {
return player.hasPermission("mcmmo.perks.xp.50percentboost");
2013-01-07 02:52:31 +01:00
}
/*
* MCMMO.PERKS.COOLDOWNS*
*/
public static boolean cooldownsHalved(Player player) {
return player.hasPermission("mcmmo.perks.cooldowns.halved");
2013-01-07 02:52:31 +01:00
}
public static boolean cooldownsThirded(Player player) {
return player.hasPermission("mcmmo.perks.cooldowns.thirded");
2013-01-07 02:52:31 +01:00
}
public static boolean cooldownsQuartered(Player player) {
return player.hasPermission("mcmmo.perks.cooldowns.quartered");
2013-01-07 02:52:31 +01:00
}
/*
* MCMMO.PERKS.ACTIVATIONTIME*
*/
public static boolean activationTwelve(Player player) {
return player.hasPermission("mcmmo.perks.activationtime.twelveseconds");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean activationEight(Player player) {
return player.hasPermission("mcmmo.perks.activationtime.eightseconds");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean activationFour(Player player) {
return player.hasPermission("mcmmo.perks.activationtime.fourseconds");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.TAMING.*
*/
2013-01-07 02:52:31 +01:00
public static boolean fastFoodService(Player player) {
return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean sharpenedClaws(Player player) {
return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean gore(Player player) {
return player.hasPermission("mcmmo.ability.taming.gore");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean callOfTheWild(Player player) {
return player.hasPermission("mcmmo.ability.taming.callofthewild");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean environmentallyAware(Player player) {
return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean thickFur(Player player) {
return player.hasPermission("mcmmo.ability.taming.thickfur");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean shockProof(Player player) {
return player.hasPermission("mcmmo.ability.taming.shockproof");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean beastLore(Player player) {
return player.hasPermission("mcmmo.ability.taming.beastlore");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.FISHING.*
*/
2013-01-07 02:52:31 +01:00
public static boolean shakeMob(Player player) {
return player.hasPermission("mcmmo.ability.fishing.shakemob");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean fishingTreasures(Player player) {
return player.hasPermission("mcmmo.ability.fishing.treasures");
}
2013-01-07 02:52:31 +01:00
public static boolean fishingMagic(Player player) {
return player.hasPermission("mcmmo.ability.fishing.magic");
}
2013-01-07 02:52:31 +01:00
public static boolean fishermansDiet(Player player) {
return player.hasPermission("mcmmo.ability.fishing.fishermansdiet");
}
public static boolean fishingVanillaXPBoost(Player player) {
return player.hasPermission("mcmmo.ability.fishing.vanillaxpboost");
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.MINING.*
*/
2013-01-07 02:52:31 +01:00
public static boolean superBreaker(Player player) {
return player.hasPermission("mcmmo.ability.mining.superbreaker");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean miningDoubleDrops(Player player) {
return player.hasPermission("mcmmo.ability.mining.doubledrops");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.WOODCUTTING.*
*/
2013-01-07 02:52:31 +01:00
public static boolean treeFeller(Player player) {
return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean leafBlower(Player player) {
return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean woodcuttingDoubleDrops(Player player) {
return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.REPAIR.*
*/
2013-01-07 02:52:31 +01:00
public static boolean repairBonus(Player player) {
return player.hasPermission("mcmmo.ability.repair.repairbonus");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean repairMastery(Player player) {
return player.hasPermission("mcmmo.ability.repair.repairmastery");
}
2013-01-07 02:52:31 +01:00
public static boolean arcaneForging(Player player) {
return player.hasPermission("mcmmo.ability.repair.arcaneforging");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean woodRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.woodrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean stoneRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.stonerepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean leatherRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.leatherrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean ironRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.ironrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean goldRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.goldrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean diamondRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.diamondrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean armorRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.armorrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean toolRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.toolrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean otherMaterialRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.othermaterialrepair");
2012-05-17 15:26:39 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean otherRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.otherrepair");
2012-05-17 15:26:39 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean stringRepair(Player player) {
return player.hasPermission("mcmmo.ability.repair.stringrepair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean salvage(Player player) {
return player.hasPermission("mcmmo.ability.repair.salvage");
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.UNARMED.*
*/
2013-01-07 02:52:31 +01:00
public static boolean unarmedBonus(Player player) {
return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean disarm(Player player) {
return player.hasPermission("mcmmo.ability.unarmed.disarm");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean berserk(Player player) {
return player.hasPermission("mcmmo.ability.unarmed.berserk");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean deflect(Player player) {
return player.hasPermission("mcmmo.ability.unarmed.deflect");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean ironGrip(Player player) {
return player.hasPermission("mcmmo.ability.unarmed.irongrip");
2012-06-25 14:44:05 +02:00
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.ARCHERY.*
*/
2013-01-07 02:52:31 +01:00
public static boolean trackArrows(Player player) {
return player.hasPermission("mcmmo.ability.archery.trackarrows");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean daze(Player player) {
return player.hasPermission("mcmmo.ability.archery.daze");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean archeryBonus(Player player) {
return player.hasPermission("mcmmo.ability.archery.bonusdamage");
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.HERBALISM.*
*/
2013-01-07 02:52:31 +01:00
public static boolean herbalismDoubleDrops(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean greenTerra(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenterra");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbBlocks(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbCarrots(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcarrots");
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbCocoa(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcocoa");
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbNetherwart(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbnetherwart");
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbPotatoes(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbpotatoes");
}
2013-01-07 02:52:31 +01:00
public static boolean greenThumbWheat(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean farmersDiet(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.farmersdiet");
2012-05-01 15:11:56 +02:00
}
public static boolean hylianLuck(Player player) {
return player.hasPermission("mcmmo.ability.herbalism.hylianluck");
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.EXCAVATION.*
*/
2013-01-07 02:52:31 +01:00
public static boolean gigaDrillBreaker(Player player) {
return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean excavationTreasures(Player player) {
return player.hasPermission("mcmmo.ability.excavation.treasures");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.SWORDS.*
*/
2013-01-07 02:52:31 +01:00
public static boolean swordsBleed(Player player) {
return player.hasPermission("mcmmo.ability.swords.bleed");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean serratedStrikes(Player player) {
return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean counterAttack(Player player) {
return player.hasPermission("mcmmo.ability.swords.counterattack");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.AXES.*
*/
2013-01-07 02:52:31 +01:00
public static boolean skullSplitter(Player player) {
return player.hasPermission("mcmmo.ability.axes.skullsplitter");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean axeBonus(Player player) {
return player.hasPermission("mcmmo.ability.axes.bonusdamage");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean criticalHit(Player player) {
return player.hasPermission("mcmmo.ability.axes.criticalhit");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean impact(Player player) {
return player.hasPermission("mcmmo.ability.axes.impact");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean greaterImpact(Player player) {
return player.hasPermission("mcmmo.ability.axes.greaterimpact");
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.ABILITY.ACROBATICS.*
*/
2013-01-07 02:52:31 +01:00
public static boolean roll(Player player) {
return player.hasPermission("mcmmo.ability.acrobatics.roll");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean gracefulRoll(Player player) {
return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean dodge(Player player) {
return player.hasPermission("mcmmo.ability.acrobatics.dodge");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.ABILITY.BLASTMINING.*
*/
2013-01-07 02:52:31 +01:00
public static boolean biggerBombs(Player player) {
return player.hasPermission("mcmmo.ability.mining.blastmining.biggerbombs");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean demolitionsExpertise(Player player) {
return player.hasPermission("mcmmo.ability.mining.blastmining.demolitionsexpertise");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean blastMining(Player player) {
return player.hasPermission("mcmmo.ability.mining.blastmining.detonate");
}
2013-01-23 22:34:01 +01:00
/*
* MCMMO.ABILITY.SMELTING.*
*/
public static boolean fuelEfficiency(Player player) {
return player.hasPermission("mcmmo.ability.smelting.fuelefficiency");
2013-01-23 22:34:01 +01:00
}
public static boolean secondSmelt(Player player) {
return player.hasPermission("mcmmo.ability.smelting.secondsmelt");
2013-01-23 22:34:01 +01:00
}
public static boolean fluxMining(Player player) {
return player.hasPermission("mcmmo.ability.smelting.fluxmining");
2013-01-23 22:34:01 +01:00
}
public static boolean smeltingVanillaXPBoost(Player player) {
return player.hasPermission("mcmmo.ability.smelting.vanillaxpboost");
2013-01-23 22:34:01 +01:00
}
2012-04-27 11:47:11 +02:00
/*
* MCMMO.COMMANDS.*
*/
public static boolean mmoeditCommand(Player player) {
return (player.hasPermission("mcmmo.commands.mmoedit"));
}
public static boolean skillResetCommand(Player player) {
return (player.hasPermission("mcmmo.commands.skillreset"));
}
public static boolean mcAbilityCommand(Player player) {
return (player.hasPermission("mcmmo.commands.mcability"));
}
public static boolean mcgodCommand(CommandSender sender) {
return (hasPermission(sender, "mcmmo.commands.mcgod"));
}
/**
* @deprecated Use {@link #mcAbilityCommand(player)} instead.
*/
@Deprecated
2013-01-07 02:52:31 +01:00
public static boolean mcAbility(Player player) {
return player.hasPermission("mcmmo.commands.ability");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean partyTeleport(Player player) {
return player.hasPermission("mcmmo.commands.ptp");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean inspect(Player player) {
return player.hasPermission("mcmmo.commands.inspect");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean party(Player player) {
return player.hasPermission("mcmmo.commands.party");
2012-04-27 11:47:11 +02:00
}
2012-12-24 22:56:25 +01:00
/**
* @deprecated Use {@link #skillResetCommand(player)} instead.
*/
@Deprecated
2013-01-07 02:52:31 +01:00
public static boolean skillReset(Player player) {
return player.hasPermission("mcmmo.skillreset");
}
2012-12-24 22:56:25 +01:00
2012-04-27 11:47:11 +02:00
/*
* MCMMO.CHAT.*
*/
2013-01-07 02:52:31 +01:00
public static boolean partyChat(Player player) {
return player.hasPermission("mcmmo.chat.partychat");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean partyLock(Player player) {
return player.hasPermission("mcmmo.chat.partylock");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean adminChat(Player player) {
return player.hasPermission("mcmmo.chat.adminchat");
2012-04-27 11:47:11 +02:00
}
/*
* MCMMO.SKILLS.*
*/
2013-01-07 02:52:31 +01:00
public static boolean taming(Player player) {
return player.hasPermission("mcmmo.skills.taming");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean mining(Player player) {
return player.hasPermission("mcmmo.skills.mining");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean fishing(Player player) {
return player.hasPermission("mcmmo.skills.fishing");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean woodcutting(Player player) {
return player.hasPermission("mcmmo.skills.woodcutting");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean repair(Player player) {
return player.hasPermission("mcmmo.skills.repair");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean unarmed(Player player) {
return player.hasPermission("mcmmo.skills.unarmed");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean archery(Player player) {
return player.hasPermission("mcmmo.skills.archery");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean herbalism(Player player) {
return player.hasPermission("mcmmo.skills.herbalism");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean excavation(Player player) {
return player.hasPermission("mcmmo.skills.excavation");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean swords(Player player) {
return player.hasPermission("mcmmo.skills.swords");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean axes(Player player) {
return player.hasPermission("mcmmo.skills.axes");
2012-04-27 11:47:11 +02:00
}
2013-01-07 02:52:31 +01:00
public static boolean acrobatics(Player player) {
return player.hasPermission("mcmmo.skills.acrobatics");
2012-04-27 11:47:11 +02:00
}
2013-01-23 22:34:01 +01:00
public static boolean smelting(Player player) {
return player.hasPermission("mcmmo.skills.smelting");
2013-01-23 22:34:01 +01:00
}
/*
* MCMMO.PARTY.*
*/
public static boolean friendlyFire(Player player) {
return player.hasPermission("mcmmo.party.friendlyfire");
}
2012-04-27 11:47:11 +02:00
}