mcPermissions.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. package com.gmail.nossr50;
  2. import org.bukkit.entity.Player;
  3. public class mcPermissions {
  4. private static volatile mcPermissions instance;
  5. public boolean permission(Player player, String perm) {
  6. return player.hasPermission(perm);
  7. }
  8. public static mcPermissions getInstance() {
  9. if (instance == null) {
  10. instance = new mcPermissions();
  11. }
  12. return instance;
  13. }
  14. /*
  15. * GENERIC PERMISSIONS
  16. */
  17. public boolean motd(Player player) {
  18. return player.hasPermission("mcmmo.motd");
  19. }
  20. public boolean admin(Player player) {
  21. return player.hasPermission("mcmmo.admin");
  22. }
  23. public boolean arcaneBypass(Player player) {
  24. return player.hasPermission(("mcmmo.repair.arcanebypass"));
  25. }
  26. /*
  27. * MCMMO.TOOLS.*
  28. */
  29. public boolean mcrefresh(Player player) {
  30. return player.hasPermission("mcmmo.tools.mcrefresh");
  31. }
  32. public boolean mcremove(Player player) {
  33. return player.hasPermission("mcmmo.tools.mcremove");
  34. }
  35. public boolean mmoedit(Player player) {
  36. return player.hasPermission("mcmmo.tools.mmoedit");
  37. }
  38. public boolean mcgod(Player player) {
  39. return player.hasPermission("mcmmo.tools.mcgod");
  40. }
  41. /*
  42. * MCMMO.ABILITY.TAMING.*
  43. */
  44. public boolean fastFoodService(Player player) {
  45. return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
  46. }
  47. public boolean sharpenedclaws(Player player) {
  48. return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
  49. }
  50. public boolean gore(Player player) {
  51. return player.hasPermission("mcmmo.ability.taming.gore");
  52. }
  53. public boolean callOfTheWild(Player player) {
  54. return player.hasPermission("mcmmo.ability.taming.callofthewild");
  55. }
  56. public boolean environmentallyAware(Player player) {
  57. return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
  58. }
  59. public boolean thickFur(Player player) {
  60. return player.hasPermission("mcmmo.ability.taming.thickfur");
  61. }
  62. public boolean shockProof(Player player) {
  63. return player.hasPermission("mcmmo.ability.taming.shockproof");
  64. }
  65. public boolean beastLore(Player player) {
  66. return player.hasPermission("mcmmo.ability.taming.beastlore");
  67. }
  68. /*
  69. * MCMMO.ABILITY.FISHING.*
  70. */
  71. public boolean shakeMob(Player player) {
  72. return player.hasPermission("mcmmo.ability.fishing.shakemob");
  73. }
  74. /*
  75. * MCMMO.ABILITY.MINING.*
  76. */
  77. public boolean superBreaker(Player player) {
  78. return player.hasPermission("mcmmo.ability.mining.superbreaker");
  79. }
  80. public boolean miningDoubleDrops(Player player) {
  81. return player.hasPermission("mcmmo.ability.mining.doubledrops");
  82. }
  83. /*
  84. * MCMMO.ABILITY.WOODCUTTING.*
  85. */
  86. public boolean treeFeller(Player player) {
  87. return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
  88. }
  89. public boolean leafBlower(Player player) {
  90. return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
  91. }
  92. public boolean woodcuttingDoubleDrops(Player player) {
  93. return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
  94. }
  95. /*
  96. * MCMMO.ABILITY.REPAIR.*
  97. */
  98. public boolean repairBonus(Player player) {
  99. return player.hasPermission("mcmmo.ability.repair.repairbonus");
  100. }
  101. public boolean arcaneForging(Player player) {
  102. return player.hasPermission("mcmmo.ability.repair.arcaneforging");
  103. }
  104. public boolean stoneRepair(Player player) {
  105. return player.hasPermission("mcmmo.ability.repair.stonerepair");
  106. }
  107. public boolean ironRepair(Player player) {
  108. return player.hasPermission("mcmmo.ability.repair.ironrepair");
  109. }
  110. public boolean goldRepair(Player player) {
  111. return player.hasPermission("mcmmo.ability.repair.goldrepair");
  112. }
  113. public boolean diamondRepair(Player player) {
  114. return player.hasPermission("mcmmo.ability.repair.diamondrepair");
  115. }
  116. public boolean armorRepair(Player player) {
  117. return player.hasPermission("mcmmo.ability.repair.armorrepair");
  118. }
  119. public boolean toolRepair(Player player) {
  120. return player.hasPermission("mcmmo.ability.repair.toolrepair");
  121. }
  122. /*
  123. * MCMMO.ABILITY.UNARMED.*
  124. */
  125. public boolean unarmedBonus(Player player) {
  126. return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
  127. }
  128. public boolean disarm(Player player) {
  129. return player.hasPermission("mcmmo.ability.unarmed.disarm");
  130. }
  131. public boolean berserk(Player player) {
  132. return player.hasPermission("mcmmo.ability.unarmed.berserk");
  133. }
  134. public boolean deflect(Player player) {
  135. return player.hasPermission("mcmmo.ability.unarmed.deflect");
  136. }
  137. /*
  138. * MCMMO.ABILITY.ARCHERY.*
  139. */
  140. public boolean trackArrows(Player player) {
  141. return player.hasPermission("mcmmo.ability.archery.trackarrows");
  142. }
  143. public boolean ignition(Player player) {
  144. return player.hasPermission("mcmmo.ability.archery.ignition");
  145. }
  146. public boolean daze(Player player) {
  147. return player.hasPermission("mcmmo.ability.archery.daze");
  148. }
  149. /*
  150. * MCMMO.ABILITY.HERBALISM.*
  151. */
  152. public boolean herbalismDoubleDrops(Player player) {
  153. return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
  154. }
  155. public boolean greenTerra(Player player) {
  156. return player.hasPermission("mcmmo.ability.herbalism.greenterra");
  157. }
  158. public boolean greenThumbBlocks(Player player) {
  159. return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
  160. }
  161. public boolean greenThumbWheat(Player player) {
  162. return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
  163. }
  164. /*
  165. * MCMMO.ABILITY.EXCAVATION.*
  166. */
  167. public boolean gigaDrillBreaker(Player player) {
  168. return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
  169. }
  170. public boolean excavationTreasures(Player player) {
  171. return player.hasPermission("mcmmo.ability.excavation.treasures");
  172. }
  173. /*
  174. * MCMMO.ABILITY.SWORDS.*
  175. */
  176. public boolean swordsBleed(Player player) {
  177. return player.hasPermission("mcmmo.ability.swords.bleed");
  178. }
  179. public boolean serratedStrikes(Player player) {
  180. return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
  181. }
  182. public boolean counterAttack(Player player) {
  183. return player.hasPermission("mcmmo.ability.swords.counterattack");
  184. }
  185. /*
  186. * MCMMO.ABILITY.AXES.*
  187. */
  188. public boolean skullSplitter(Player player) {
  189. return player.hasPermission("mcmmo.ability.axes.skullsplitter");
  190. }
  191. public boolean axeBonus(Player player) {
  192. return player.hasPermission("mcmmo.ability.axes.bonusdamage");
  193. }
  194. public boolean criticalHit(Player player) {
  195. return player.hasPermission("mcmmo.ability.axes.criticalhit");
  196. }
  197. public boolean impact(Player player) {
  198. return player.hasPermission("mcmmo.ability.axes.impact");
  199. }
  200. /*
  201. * MCMMO.ABILITY.ACROBATICS.*
  202. */
  203. public boolean roll(Player player) {
  204. return player.hasPermission("mcmmo.ability.acrobatics.roll");
  205. }
  206. public boolean gracefulRoll(Player player) {
  207. return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
  208. }
  209. public boolean dodge(Player player) {
  210. return player.hasPermission("mcmmo.ability.acrobatics.dodge");
  211. }
  212. /*
  213. * MCMMO.ABILITY.BLASTMINING.*
  214. */
  215. public boolean biggerBombs(Player player) {
  216. return player.hasPermission("mcmmo.ability.blastmining.biggerbombs");
  217. }
  218. public boolean demolitionsExpertise(Player player) {
  219. return player.hasPermission("mcmmo.ability.blastmining.demolitionsexpertise");
  220. }
  221. /*
  222. * MCMMO.ITEM.*
  223. */
  224. public boolean chimaeraWing(Player player) {
  225. return player.hasPermission("mcmmo.item.chimaerawing");
  226. }
  227. /*
  228. * MCMMO.COMMANDS.*
  229. */
  230. public boolean mcAbility(Player player) {
  231. return player.hasPermission("mcmmo.commands.ability");
  232. }
  233. public boolean partyTeleport(Player player) {
  234. return player.hasPermission("mcmmo.commands.ptp");
  235. }
  236. public boolean inspect(Player player) {
  237. return player.hasPermission("mcmmo.commands.inspect");
  238. }
  239. public boolean party(Player player) {
  240. return player.hasPermission("mcmmo.commands.party");
  241. }
  242. /*
  243. * MCMMO.CHAT.*
  244. */
  245. public boolean partyChat(Player player) {
  246. return player.hasPermission("mcmmo.chat.partychat");
  247. }
  248. public boolean partyLock(Player player) {
  249. return player.hasPermission("mcmmo.chat.partylock");
  250. }
  251. public boolean adminChat(Player player) {
  252. return player.hasPermission("mcmmo.chat.adminchat");
  253. }
  254. /*
  255. * MCMMO.SKILLS.*
  256. */
  257. public boolean taming(Player player) {
  258. return player.hasPermission("mcmmo.skills.taming");
  259. }
  260. public boolean mining(Player player) {
  261. return player.hasPermission("mcmmo.skills.mining");
  262. }
  263. public boolean blastMining(Player player) {
  264. return player.hasPermission("mcmmo.skills.blastmining");
  265. }
  266. public boolean fishing(Player player) {
  267. return player.hasPermission("mcmmo.skills.fishing");
  268. }
  269. public boolean woodcutting(Player player) {
  270. return player.hasPermission("mcmmo.skills.woodcutting");
  271. }
  272. public boolean repair(Player player) {
  273. return player.hasPermission("mcmmo.skills.repair");
  274. }
  275. public boolean unarmed(Player player) {
  276. return player.hasPermission("mcmmo.skills.unarmed");
  277. }
  278. public boolean archery(Player player) {
  279. return player.hasPermission("mcmmo.skills.archery");
  280. }
  281. public boolean herbalism(Player player) {
  282. return player.hasPermission("mcmmo.skills.herbalism");
  283. }
  284. public boolean excavation(Player player) {
  285. return player.hasPermission("mcmmo.skills.excavation");
  286. }
  287. public boolean swords(Player player) {
  288. return player.hasPermission("mcmmo.skills.swords");
  289. }
  290. public boolean axes(Player player) {
  291. return player.hasPermission("mcmmo.skills.axes");
  292. }
  293. public boolean acrobatics(Player player) {
  294. return player.hasPermission("mcmmo.skills.acrobatics");
  295. }
  296. }