2012-04-27 11:47:11 +02:00
|
|
|
package com.gmail.nossr50.util;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
public class Permissions {
|
|
|
|
private static volatile Permissions instance;
|
|
|
|
|
|
|
|
public boolean permission(Player player, String perm) {
|
|
|
|
return player.hasPermission(perm);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Permissions getInstance() {
|
|
|
|
if (instance == null) {
|
|
|
|
instance = new Permissions();
|
|
|
|
}
|
|
|
|
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GENERIC PERMISSIONS
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean motd(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.motd");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean admin(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.admin");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.BYPASS.*
|
|
|
|
*/
|
2012-04-30 15:44:56 +02:00
|
|
|
public boolean hardcoremodeBypass(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.bypass.hardcoremode");
|
|
|
|
}
|
2012-05-01 15:11:56 +02:00
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
public boolean arcaneBypass(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.bypass.arcanebypass");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean inspectDistanceBypass(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.bypass.inspect.distance");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean inspectOfflineBypass(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.bypass.inspect.offline");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.TOOLS.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean mcrefresh(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.tools.mcrefresh");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean mcremove(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.tools.mcremove");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean mmoedit(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.tools.mmoedit");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean mcgod(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.tools.mcgod");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.TAMING.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean fastFoodService(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
|
|
|
|
}
|
|
|
|
|
2012-05-01 22:29:52 +02:00
|
|
|
public boolean sharpenedClaws(Player player) {
|
2012-04-27 11:47:11 +02:00
|
|
|
return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean gore(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.gore");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean callOfTheWild(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.callofthewild");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean environmentallyAware(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean thickFur(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.thickfur");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean shockProof(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.shockproof");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean beastLore(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.taming.beastlore");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.FISHING.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean shakeMob(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.fishing.shakemob");
|
|
|
|
}
|
|
|
|
|
2012-04-30 14:26:37 +02:00
|
|
|
public boolean fishingTreasures(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.fishing.treasures");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean fishingMagic(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.fishing.magic");
|
|
|
|
}
|
|
|
|
|
2012-11-13 01:18:27 +01:00
|
|
|
public boolean fishermansDiet(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.fishing.fishermansdiet");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.MINING.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean superBreaker(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.mining.superbreaker");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean miningDoubleDrops(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.mining.doubledrops");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.WOODCUTTING.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean treeFeller(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean leafBlower(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean woodcuttingDoubleDrops(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.REPAIR.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean repairBonus(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.repairbonus");
|
|
|
|
}
|
|
|
|
|
2012-05-01 19:52:44 +02:00
|
|
|
public boolean repairMastery(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.repairmastery");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
public boolean arcaneForging(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.arcaneforging");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean woodRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.woodrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean stoneRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.stonerepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean leatherRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.leatherrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean ironRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.ironrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean goldRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.goldrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean diamondRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.diamondrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean armorRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.armorrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean toolRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.toolrepair");
|
|
|
|
}
|
|
|
|
|
2012-05-17 15:26:39 +02:00
|
|
|
public boolean otherMaterialRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.othermaterialrepair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean otherRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.otherrepair");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
public boolean stringRepair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.stringrepair");
|
|
|
|
}
|
|
|
|
|
2012-11-13 16:50:00 +01:00
|
|
|
public boolean salvage(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.repair.salvage");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.UNARMED.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean unarmedBonus(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean disarm(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.unarmed.disarm");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean berserk(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.unarmed.berserk");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean deflect(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.unarmed.deflect");
|
|
|
|
}
|
|
|
|
|
2012-06-25 14:44:05 +02:00
|
|
|
public boolean ironGrip(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.unarmed.irongrip");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.ARCHERY.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean trackArrows(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.archery.trackarrows");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean daze(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.archery.daze");
|
|
|
|
}
|
|
|
|
|
2012-04-30 04:58:54 +02:00
|
|
|
public boolean archeryBonus(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.archery.bonusdamage");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.HERBALISM.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean herbalismDoubleDrops(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean greenTerra(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenterra");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean greenThumbBlocks(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
|
|
|
|
}
|
|
|
|
|
2012-11-10 01:37:12 +01:00
|
|
|
public boolean greenThumbCarrots(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcarrots");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean greenThumbCocoa(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcocoa");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean greenThumbNetherwart(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbnetherwart");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean greenThumbPotatoes(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbpotatoes");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
public boolean greenThumbWheat(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
|
|
|
|
}
|
|
|
|
|
2012-05-01 15:11:56 +02:00
|
|
|
public boolean farmersDiet(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.herbalism.farmersdiet");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.EXCAVATION.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean gigaDrillBreaker(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean excavationTreasures(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.excavation.treasures");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.SWORDS.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean swordsBleed(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.swords.bleed");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean serratedStrikes(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean counterAttack(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.swords.counterattack");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.AXES.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean skullSplitter(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.axes.skullsplitter");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean axeBonus(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.axes.bonusdamage");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean criticalHit(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.axes.criticalhit");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean impact(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.axes.impact");
|
|
|
|
}
|
|
|
|
|
2012-04-30 13:46:08 +02:00
|
|
|
public boolean greaterImpact(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.axes.greaterimpact");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.ACROBATICS.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean roll(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.acrobatics.roll");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean gracefulRoll(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean dodge(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.acrobatics.dodge");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.ABILITY.BLASTMINING.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean biggerBombs(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.blastmining.biggerbombs");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean demolitionsExpertise(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.blastmining.demolitionsexpertise");
|
|
|
|
}
|
|
|
|
|
2012-05-01 16:39:50 +02:00
|
|
|
public boolean blastMining(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.ability.blastmining.detonate");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
/*
|
|
|
|
* MCMMO.ITEM.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean chimaeraWing(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.item.chimaerawing");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.COMMANDS.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean mcAbility(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.commands.ability");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean partyTeleport(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.commands.ptp");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean inspect(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.commands.inspect");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean party(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.commands.party");
|
|
|
|
}
|
2012-07-30 05:49:42 +02:00
|
|
|
|
|
|
|
public boolean skillReset(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skillreset");
|
|
|
|
}
|
|
|
|
|
2012-04-27 11:47:11 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.CHAT.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean partyChat(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.chat.partychat");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean partyLock(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.chat.partylock");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean adminChat(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.chat.adminchat");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MCMMO.SKILLS.*
|
|
|
|
*/
|
|
|
|
|
|
|
|
public boolean taming(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.taming");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean mining(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.mining");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean fishing(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.fishing");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean woodcutting(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.woodcutting");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean repair(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.repair");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean unarmed(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.unarmed");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean archery(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.archery");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean herbalism(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.herbalism");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean excavation(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.excavation");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean swords(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.swords");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean axes(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.axes");
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean acrobatics(Player player) {
|
|
|
|
return player.hasPermission("mcmmo.skills.acrobatics");
|
|
|
|
}
|
|
|
|
}
|