mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Added ability to repair Fishing Rods
This commit is contained in:
parent
825bc87ca3
commit
bf8649c0a7
@ -1,380 +1,399 @@
|
|||||||
package com.gmail.nossr50;
|
package com.gmail.nossr50;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ItemChecks {
|
public class ItemChecks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a sword.
|
* Checks if the item is a sword.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a sword, false otherwise
|
* @return true if the item is a sword, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isSword(ItemStack is) {
|
public static boolean isSword(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_SWORD:
|
case DIAMOND_SWORD:
|
||||||
case GOLD_SWORD:
|
case GOLD_SWORD:
|
||||||
case IRON_SWORD:
|
case IRON_SWORD:
|
||||||
case STONE_SWORD:
|
case STONE_SWORD:
|
||||||
case WOOD_SWORD:
|
case WOOD_SWORD:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a hoe.
|
* Checks if the item is a hoe.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a hoe, false otherwise
|
* @return true if the item is a hoe, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isHoe(ItemStack is) {
|
public static boolean isHoe(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_HOE:
|
case DIAMOND_HOE:
|
||||||
case GOLD_HOE:
|
case GOLD_HOE:
|
||||||
case IRON_HOE:
|
case IRON_HOE:
|
||||||
case STONE_HOE:
|
case STONE_HOE:
|
||||||
case WOOD_HOE:
|
case WOOD_HOE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a shovel.
|
* Checks if the item is a shovel.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a shovel, false otherwise
|
* @return true if the item is a shovel, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isShovel(ItemStack is) {
|
public static boolean isShovel(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_SPADE:
|
case DIAMOND_SPADE:
|
||||||
case GOLD_SPADE:
|
case GOLD_SPADE:
|
||||||
case IRON_SPADE:
|
case IRON_SPADE:
|
||||||
case STONE_SPADE:
|
case STONE_SPADE:
|
||||||
case WOOD_SPADE:
|
case WOOD_SPADE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is an axe.
|
* Checks if the item is an axe.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is an axe, false otherwise
|
* @return true if the item is an axe, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isAxe(ItemStack is) {
|
public static boolean isAxe(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_AXE:
|
case DIAMOND_AXE:
|
||||||
case GOLD_AXE:
|
case GOLD_AXE:
|
||||||
case IRON_AXE:
|
case IRON_AXE:
|
||||||
case STONE_AXE:
|
case STONE_AXE:
|
||||||
case WOOD_AXE:
|
case WOOD_AXE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a pickaxe.
|
* Checks if the item is a pickaxe.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a pickaxe, false otherwise
|
* @return true if the item is a pickaxe, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isMiningPick(ItemStack is) {
|
public static boolean isMiningPick(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_PICKAXE:
|
case DIAMOND_PICKAXE:
|
||||||
case GOLD_PICKAXE:
|
case GOLD_PICKAXE:
|
||||||
case IRON_PICKAXE:
|
case IRON_PICKAXE:
|
||||||
case STONE_PICKAXE:
|
case STONE_PICKAXE:
|
||||||
case WOOD_PICKAXE:
|
case WOOD_PICKAXE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a helmet.
|
* Checks if the item is a helmet.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a helmet, false otherwise
|
* @return true if the item is a helmet, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isHelmet(ItemStack is) {
|
public static boolean isHelmet(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_HELMET:
|
case DIAMOND_HELMET:
|
||||||
case GOLD_HELMET:
|
case GOLD_HELMET:
|
||||||
case IRON_HELMET:
|
case IRON_HELMET:
|
||||||
case LEATHER_HELMET:
|
case LEATHER_HELMET:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a chestplate.
|
* Checks if the item is a chestplate.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a chestplate, false otherwise
|
* @return true if the item is a chestplate, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isChestplate(ItemStack is) {
|
public static boolean isChestplate(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_CHESTPLATE:
|
case DIAMOND_CHESTPLATE:
|
||||||
case GOLD_CHESTPLATE:
|
case GOLD_CHESTPLATE:
|
||||||
case IRON_CHESTPLATE:
|
case IRON_CHESTPLATE:
|
||||||
case LEATHER_CHESTPLATE:
|
case LEATHER_CHESTPLATE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a pair of pants.
|
* Checks if the item is a pair of pants.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a pair of pants, false otherwise
|
* @return true if the item is a pair of pants, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isPants(ItemStack is) {
|
public static boolean isPants(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_LEGGINGS:
|
case DIAMOND_LEGGINGS:
|
||||||
case GOLD_LEGGINGS:
|
case GOLD_LEGGINGS:
|
||||||
case IRON_LEGGINGS:
|
case IRON_LEGGINGS:
|
||||||
case LEATHER_LEGGINGS:
|
case LEATHER_LEGGINGS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the item is a pair of boots.
|
* Checks if the item is a pair of boots.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a pair of boots, false otherwise
|
* @return true if the item is a pair of boots, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isBoots(ItemStack is) {
|
public static boolean isBoots(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_BOOTS:
|
case DIAMOND_BOOTS:
|
||||||
case GOLD_BOOTS:
|
case GOLD_BOOTS:
|
||||||
case IRON_BOOTS:
|
case IRON_BOOTS:
|
||||||
case LEATHER_BOOTS:
|
case LEATHER_BOOTS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a wearable armor piece.
|
* Checks to see if an item is a wearable armor piece.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is armor, false otherwise
|
* @return true if the item is armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isArmor(ItemStack is) {
|
public static boolean isArmor(ItemStack is) {
|
||||||
return isLeatherArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is);
|
return isLeatherArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a leather armor piece.
|
* Checks to see if an item is a leather armor piece.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is leather armor, false otherwise
|
* @return true if the item is leather armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isLeatherArmor(ItemStack is) {
|
public static boolean isLeatherArmor(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case LEATHER_BOOTS:
|
case LEATHER_BOOTS:
|
||||||
case LEATHER_CHESTPLATE:
|
case LEATHER_CHESTPLATE:
|
||||||
case LEATHER_HELMET:
|
case LEATHER_HELMET:
|
||||||
case LEATHER_LEGGINGS:
|
case LEATHER_LEGGINGS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a gold armor piece.
|
* Checks to see if an item is a gold armor piece.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is gold armor, false otherwise
|
* @return true if the item is gold armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isGoldArmor(ItemStack is) {
|
public static boolean isGoldArmor(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case GOLD_BOOTS:
|
case GOLD_BOOTS:
|
||||||
case GOLD_CHESTPLATE:
|
case GOLD_CHESTPLATE:
|
||||||
case GOLD_HELMET:
|
case GOLD_HELMET:
|
||||||
case GOLD_LEGGINGS:
|
case GOLD_LEGGINGS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is an iron armor piece.
|
* Checks to see if an item is an iron armor piece.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is iron armor, false otherwise
|
* @return true if the item is iron armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isIronArmor(ItemStack is) {
|
public static boolean isIronArmor(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case IRON_BOOTS:
|
case IRON_BOOTS:
|
||||||
case IRON_CHESTPLATE:
|
case IRON_CHESTPLATE:
|
||||||
case IRON_HELMET:
|
case IRON_HELMET:
|
||||||
case IRON_LEGGINGS:
|
case IRON_LEGGINGS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a diamond armor piece.
|
* Checks to see if an item is a diamond armor piece.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is diamond armor, false otherwise
|
* @return true if the item is diamond armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isDiamondArmor(ItemStack is) {
|
public static boolean isDiamondArmor(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case DIAMOND_BOOTS:
|
case DIAMOND_BOOTS:
|
||||||
case DIAMOND_CHESTPLATE:
|
case DIAMOND_CHESTPLATE:
|
||||||
case DIAMOND_HELMET:
|
case DIAMOND_HELMET:
|
||||||
case DIAMOND_LEGGINGS:
|
case DIAMOND_LEGGINGS:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a tool.
|
* Checks to see if an item is a tool.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a tool, false otherwise
|
* @return true if the item is a tool, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isTool(ItemStack is) {
|
public static boolean isTool(ItemStack is) {
|
||||||
return isStoneTool(is) || isWoodTool(is) || isGoldTool(is) || isIronTool(is) || isDiamondTool(is) || is.getType().equals(Material.BOW);
|
return isStoneTool(is) || isWoodTool(is) || isGoldTool(is) || isIronTool(is) || isDiamondTool(is) || isStringTool(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a stone tool.
|
* Checks to see if an item is a stone tool.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a stone tool, false otherwise
|
* @return true if the item is a stone tool, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isStoneTool(ItemStack is) {
|
public static boolean isStoneTool(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case STONE_AXE:
|
case STONE_AXE:
|
||||||
case STONE_HOE:
|
case STONE_HOE:
|
||||||
case STONE_PICKAXE:
|
case STONE_PICKAXE:
|
||||||
case STONE_SPADE:
|
case STONE_SPADE:
|
||||||
case STONE_SWORD:
|
case STONE_SWORD:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a wooden tool.
|
* Checks to see if an item is a wooden tool.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a wooden tool, false otherwise
|
* @return true if the item is a wooden tool, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isWoodTool(ItemStack is) {
|
public static boolean isWoodTool(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case WOOD_AXE:
|
case WOOD_AXE:
|
||||||
case WOOD_HOE:
|
case WOOD_HOE:
|
||||||
case WOOD_PICKAXE:
|
case WOOD_PICKAXE:
|
||||||
case WOOD_SPADE:
|
case WOOD_SPADE:
|
||||||
case WOOD_SWORD:
|
case WOOD_SWORD:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if an item is a gold tool.
|
* Checks to see if an item is a gold tool.
|
||||||
*
|
*
|
||||||
* @param is Item to check
|
* @param is Item to check
|
||||||
* @return true if the item is a stone tool, false otherwise
|
* @return true if the item is a stone tool, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isGoldTool(ItemStack is) {
|
public static boolean isGoldTool(ItemStack is) {
|
||||||
switch (is.getType()) {
|
switch (is.getType()) {
|
||||||
case GOLD_AXE:
|
case GOLD_AXE:
|
||||||
case GOLD_HOE:
|
case GOLD_HOE:
|
||||||
case GOLD_PICKAXE:
|
case GOLD_PICKAXE:
|
||||||
case GOLD_SPADE:
|
case GOLD_SPADE:
|
||||||
case GOLD_SWORD:
|
case GOLD_SWORD:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks to see if an item is an iron tool.
|
/**
|
||||||
*
|
* Checks to see if an item is a string tool.
|
||||||
* @param is Item to check
|
*
|
||||||
* @return true if the item is an iron tool, false otherwise
|
* @param is Item to check
|
||||||
*/
|
* @return true if the item is a string tool, false otherwise
|
||||||
public static boolean isIronTool(ItemStack is) {
|
*/
|
||||||
switch (is.getType()) {
|
public static boolean isStringTool(ItemStack is) {
|
||||||
case IRON_AXE:
|
switch (is.getType()) {
|
||||||
case IRON_HOE:
|
case BOW:
|
||||||
case IRON_PICKAXE:
|
case FISHING_ROD:
|
||||||
case IRON_SPADE:
|
return true;
|
||||||
case IRON_SWORD:
|
|
||||||
case SHEARS:
|
default:
|
||||||
return true;
|
return false;
|
||||||
|
}
|
||||||
default:
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* Checks to see if an item is an iron tool.
|
||||||
/**
|
*
|
||||||
* Checks to see if an item is a diamond tool.
|
* @param is Item to check
|
||||||
*
|
* @return true if the item is an iron tool, false otherwise
|
||||||
* @param is Item to check
|
*/
|
||||||
* @return true if the item is a diamond tool, false otherwise
|
public static boolean isIronTool(ItemStack is) {
|
||||||
*/
|
switch (is.getType()) {
|
||||||
public static boolean isDiamondTool(ItemStack is) {
|
case IRON_AXE:
|
||||||
switch (is.getType()) {
|
case IRON_HOE:
|
||||||
case DIAMOND_AXE:
|
case IRON_PICKAXE:
|
||||||
case DIAMOND_HOE:
|
case IRON_SPADE:
|
||||||
case DIAMOND_PICKAXE:
|
case IRON_SWORD:
|
||||||
case DIAMOND_SPADE:
|
case SHEARS:
|
||||||
case DIAMOND_SWORD:
|
return true;
|
||||||
return true;
|
|
||||||
|
default:
|
||||||
default:
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* Checks to see if an item is a diamond tool.
|
||||||
|
*
|
||||||
|
* @param is Item to check
|
||||||
|
* @return true if the item is a diamond tool, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isDiamondTool(ItemStack is) {
|
||||||
|
switch (is.getType()) {
|
||||||
|
case DIAMOND_AXE:
|
||||||
|
case DIAMOND_HOE:
|
||||||
|
case DIAMOND_PICKAXE:
|
||||||
|
case DIAMOND_SPADE:
|
||||||
|
case DIAMOND_SWORD:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -87,7 +87,7 @@ public class LoadProperties extends ConfigLoader{
|
|||||||
public static Boolean anvilmessages;
|
public static Boolean anvilmessages;
|
||||||
public static int rWood, rStone, rIron, rGold, rDiamond, rString, rLeather;
|
public static int rWood, rStone, rIron, rGold, rDiamond, rString, rLeather;
|
||||||
public static int anvilID;
|
public static int anvilID;
|
||||||
public static int repairStoneLevel, repairIronLevel, repairGoldLevel, repairdiamondlevel, repairBowLevel;
|
public static int repairStoneLevel, repairIronLevel, repairGoldLevel, repairdiamondlevel, repairStringLevel;
|
||||||
|
|
||||||
/* Taming */
|
/* Taming */
|
||||||
public static int mtameWolf, mtameOcelot;
|
public static int mtameWolf, mtameOcelot;
|
||||||
@ -377,7 +377,7 @@ public class LoadProperties extends ConfigLoader{
|
|||||||
repairIronLevel = config.getInt("Skills.Repair.Iron.Level_Required", 0);
|
repairIronLevel = config.getInt("Skills.Repair.Iron.Level_Required", 0);
|
||||||
repairGoldLevel = config.getInt("Skills.Repair.Gold.Level_Required", 0);
|
repairGoldLevel = config.getInt("Skills.Repair.Gold.Level_Required", 0);
|
||||||
repairStoneLevel = config.getInt("Skills.Repair.Stone.Level_Required", 0);
|
repairStoneLevel = config.getInt("Skills.Repair.Stone.Level_Required", 0);
|
||||||
repairBowLevel = config.getInt("Skills.Repair.String.Level_Required", 0);
|
repairStringLevel = config.getInt("Skills.Repair.String.Level_Required", 0);
|
||||||
|
|
||||||
tamingxpmodifier = config.getDouble("Experience.Formula.Multiplier.Taming", 1.0);
|
tamingxpmodifier = config.getDouble("Experience.Formula.Multiplier.Taming", 1.0);
|
||||||
miningxpmodifier = config.getDouble("Experience.Formula.Multiplier.Mining", 1.0);
|
miningxpmodifier = config.getDouble("Experience.Formula.Multiplier.Mining", 1.0);
|
||||||
|
@ -50,6 +50,7 @@ public class mcLocale {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
catch (MissingResourceException e) {
|
catch (MissingResourceException e) {
|
||||||
|
e.printStackTrace();
|
||||||
return '!' + key + '!';
|
return '!' + key + '!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,407 +1,407 @@
|
|||||||
package com.gmail.nossr50;
|
package com.gmail.nossr50;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class mcPermissions {
|
public class mcPermissions {
|
||||||
private static volatile mcPermissions instance;
|
private static volatile mcPermissions instance;
|
||||||
|
|
||||||
public boolean permission(Player player, String perm) {
|
public boolean permission(Player player, String perm) {
|
||||||
return player.hasPermission(perm);
|
return player.hasPermission(perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static mcPermissions getInstance() {
|
public static mcPermissions getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = new mcPermissions();
|
instance = new mcPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GENERIC PERMISSIONS
|
* GENERIC PERMISSIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean motd(Player player) {
|
public boolean motd(Player player) {
|
||||||
return player.hasPermission("mcmmo.motd");
|
return player.hasPermission("mcmmo.motd");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean admin(Player player) {
|
public boolean admin(Player player) {
|
||||||
return player.hasPermission("mcmmo.admin");
|
return player.hasPermission("mcmmo.admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean arcaneBypass(Player player) {
|
public boolean arcaneBypass(Player player) {
|
||||||
return player.hasPermission("mcmmo.bypass.arcanebypass");
|
return player.hasPermission("mcmmo.bypass.arcanebypass");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.TOOLS.*
|
* MCMMO.TOOLS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean mcrefresh(Player player) {
|
public boolean mcrefresh(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcrefresh");
|
return player.hasPermission("mcmmo.tools.mcrefresh");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mcremove(Player player) {
|
public boolean mcremove(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcremove");
|
return player.hasPermission("mcmmo.tools.mcremove");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mmoedit(Player player) {
|
public boolean mmoedit(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mmoedit");
|
return player.hasPermission("mcmmo.tools.mmoedit");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mcgod(Player player) {
|
public boolean mcgod(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcgod");
|
return player.hasPermission("mcmmo.tools.mcgod");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.TAMING.*
|
* MCMMO.ABILITY.TAMING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean fastFoodService(Player player) {
|
public boolean fastFoodService(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
|
return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sharpenedclaws(Player player) {
|
public boolean sharpenedclaws(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
|
return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean gore(Player player) {
|
public boolean gore(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.gore");
|
return player.hasPermission("mcmmo.ability.taming.gore");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean callOfTheWild(Player player) {
|
public boolean callOfTheWild(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.callofthewild");
|
return player.hasPermission("mcmmo.ability.taming.callofthewild");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean environmentallyAware(Player player) {
|
public boolean environmentallyAware(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
|
return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean thickFur(Player player) {
|
public boolean thickFur(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.thickfur");
|
return player.hasPermission("mcmmo.ability.taming.thickfur");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shockProof(Player player) {
|
public boolean shockProof(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.shockproof");
|
return player.hasPermission("mcmmo.ability.taming.shockproof");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean beastLore(Player player) {
|
public boolean beastLore(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.beastlore");
|
return player.hasPermission("mcmmo.ability.taming.beastlore");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.FISHING.*
|
* MCMMO.ABILITY.FISHING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean shakeMob(Player player) {
|
public boolean shakeMob(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.fishing.shakemob");
|
return player.hasPermission("mcmmo.ability.fishing.shakemob");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.MINING.*
|
* MCMMO.ABILITY.MINING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean superBreaker(Player player) {
|
public boolean superBreaker(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.mining.superbreaker");
|
return player.hasPermission("mcmmo.ability.mining.superbreaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean miningDoubleDrops(Player player) {
|
public boolean miningDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.mining.doubledrops");
|
return player.hasPermission("mcmmo.ability.mining.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.WOODCUTTING.*
|
* MCMMO.ABILITY.WOODCUTTING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean treeFeller(Player player) {
|
public boolean treeFeller(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
|
return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean leafBlower(Player player) {
|
public boolean leafBlower(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
|
return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodcuttingDoubleDrops(Player player) {
|
public boolean woodcuttingDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
|
return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.REPAIR.*
|
* MCMMO.ABILITY.REPAIR.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean repairBonus(Player player) {
|
public boolean repairBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.repairbonus");
|
return player.hasPermission("mcmmo.ability.repair.repairbonus");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean arcaneForging(Player player) {
|
public boolean arcaneForging(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.arcaneforging");
|
return player.hasPermission("mcmmo.ability.repair.arcaneforging");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodRepair(Player player) {
|
public boolean woodRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.woodrepair");
|
return player.hasPermission("mcmmo.ability.repair.woodrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean stoneRepair(Player player) {
|
public boolean stoneRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.stonerepair");
|
return player.hasPermission("mcmmo.ability.repair.stonerepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean leatherRepair(Player player) {
|
public boolean leatherRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.leatherrepair");
|
return player.hasPermission("mcmmo.ability.repair.leatherrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean ironRepair(Player player) {
|
public boolean ironRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.ironrepair");
|
return player.hasPermission("mcmmo.ability.repair.ironrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean goldRepair(Player player) {
|
public boolean goldRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.goldrepair");
|
return player.hasPermission("mcmmo.ability.repair.goldrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean diamondRepair(Player player) {
|
public boolean diamondRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.diamondrepair");
|
return player.hasPermission("mcmmo.ability.repair.diamondrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean armorRepair(Player player) {
|
public boolean armorRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.armorrepair");
|
return player.hasPermission("mcmmo.ability.repair.armorrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean toolRepair(Player player) {
|
public boolean toolRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.toolrepair");
|
return player.hasPermission("mcmmo.ability.repair.toolrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bowRepair(Player player) {
|
public boolean stringRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.bowrepair");
|
return player.hasPermission("mcmmo.ability.repair.stringrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.UNARMED.*
|
* MCMMO.ABILITY.UNARMED.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean unarmedBonus(Player player) {
|
public boolean unarmedBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
|
return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean disarm(Player player) {
|
public boolean disarm(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.disarm");
|
return player.hasPermission("mcmmo.ability.unarmed.disarm");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean berserk(Player player) {
|
public boolean berserk(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.berserk");
|
return player.hasPermission("mcmmo.ability.unarmed.berserk");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean deflect(Player player) {
|
public boolean deflect(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.deflect");
|
return player.hasPermission("mcmmo.ability.unarmed.deflect");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.ARCHERY.*
|
* MCMMO.ABILITY.ARCHERY.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean trackArrows(Player player) {
|
public boolean trackArrows(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.trackarrows");
|
return player.hasPermission("mcmmo.ability.archery.trackarrows");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean ignition(Player player) {
|
public boolean ignition(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.ignition");
|
return player.hasPermission("mcmmo.ability.archery.ignition");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean daze(Player player) {
|
public boolean daze(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.daze");
|
return player.hasPermission("mcmmo.ability.archery.daze");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.HERBALISM.*
|
* MCMMO.ABILITY.HERBALISM.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean herbalismDoubleDrops(Player player) {
|
public boolean herbalismDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
|
return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenTerra(Player player) {
|
public boolean greenTerra(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenterra");
|
return player.hasPermission("mcmmo.ability.herbalism.greenterra");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbBlocks(Player player) {
|
public boolean greenThumbBlocks(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbWheat(Player player) {
|
public boolean greenThumbWheat(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
|
return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.EXCAVATION.*
|
* MCMMO.ABILITY.EXCAVATION.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean gigaDrillBreaker(Player player) {
|
public boolean gigaDrillBreaker(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
|
return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean excavationTreasures(Player player) {
|
public boolean excavationTreasures(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.excavation.treasures");
|
return player.hasPermission("mcmmo.ability.excavation.treasures");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.SWORDS.*
|
* MCMMO.ABILITY.SWORDS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean swordsBleed(Player player) {
|
public boolean swordsBleed(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.bleed");
|
return player.hasPermission("mcmmo.ability.swords.bleed");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean serratedStrikes(Player player) {
|
public boolean serratedStrikes(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
|
return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean counterAttack(Player player) {
|
public boolean counterAttack(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.counterattack");
|
return player.hasPermission("mcmmo.ability.swords.counterattack");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.AXES.*
|
* MCMMO.ABILITY.AXES.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean skullSplitter(Player player) {
|
public boolean skullSplitter(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.skullsplitter");
|
return player.hasPermission("mcmmo.ability.axes.skullsplitter");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean axeBonus(Player player) {
|
public boolean axeBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.bonusdamage");
|
return player.hasPermission("mcmmo.ability.axes.bonusdamage");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean criticalHit(Player player) {
|
public boolean criticalHit(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.criticalhit");
|
return player.hasPermission("mcmmo.ability.axes.criticalhit");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean impact(Player player) {
|
public boolean impact(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.impact");
|
return player.hasPermission("mcmmo.ability.axes.impact");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.ACROBATICS.*
|
* MCMMO.ABILITY.ACROBATICS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean roll(Player player) {
|
public boolean roll(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.roll");
|
return player.hasPermission("mcmmo.ability.acrobatics.roll");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean gracefulRoll(Player player) {
|
public boolean gracefulRoll(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
|
return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean dodge(Player player) {
|
public boolean dodge(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.dodge");
|
return player.hasPermission("mcmmo.ability.acrobatics.dodge");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.BLASTMINING.*
|
* MCMMO.ABILITY.BLASTMINING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean biggerBombs(Player player) {
|
public boolean biggerBombs(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.blastmining.biggerbombs");
|
return player.hasPermission("mcmmo.ability.blastmining.biggerbombs");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean demolitionsExpertise(Player player) {
|
public boolean demolitionsExpertise(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.blastmining.demolitionsexpertise");
|
return player.hasPermission("mcmmo.ability.blastmining.demolitionsexpertise");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ITEM.*
|
* MCMMO.ITEM.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean chimaeraWing(Player player) {
|
public boolean chimaeraWing(Player player) {
|
||||||
return player.hasPermission("mcmmo.item.chimaerawing");
|
return player.hasPermission("mcmmo.item.chimaerawing");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.COMMANDS.*
|
* MCMMO.COMMANDS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean mcAbility(Player player) {
|
public boolean mcAbility(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.ability");
|
return player.hasPermission("mcmmo.commands.ability");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean partyTeleport(Player player) {
|
public boolean partyTeleport(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.ptp");
|
return player.hasPermission("mcmmo.commands.ptp");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inspect(Player player) {
|
public boolean inspect(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.inspect");
|
return player.hasPermission("mcmmo.commands.inspect");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean party(Player player) {
|
public boolean party(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.party");
|
return player.hasPermission("mcmmo.commands.party");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.CHAT.*
|
* MCMMO.CHAT.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean partyChat(Player player) {
|
public boolean partyChat(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.partychat");
|
return player.hasPermission("mcmmo.chat.partychat");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean partyLock(Player player) {
|
public boolean partyLock(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.partylock");
|
return player.hasPermission("mcmmo.chat.partylock");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean adminChat(Player player) {
|
public boolean adminChat(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.adminchat");
|
return player.hasPermission("mcmmo.chat.adminchat");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.SKILLS.*
|
* MCMMO.SKILLS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean taming(Player player) {
|
public boolean taming(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.taming");
|
return player.hasPermission("mcmmo.skills.taming");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mining(Player player) {
|
public boolean mining(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.mining");
|
return player.hasPermission("mcmmo.skills.mining");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean blastMining(Player player) {
|
public boolean blastMining(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.blastmining");
|
return player.hasPermission("mcmmo.skills.blastmining");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fishing(Player player) {
|
public boolean fishing(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.fishing");
|
return player.hasPermission("mcmmo.skills.fishing");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodcutting(Player player) {
|
public boolean woodcutting(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.woodcutting");
|
return player.hasPermission("mcmmo.skills.woodcutting");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean repair(Player player) {
|
public boolean repair(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.repair");
|
return player.hasPermission("mcmmo.skills.repair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean unarmed(Player player) {
|
public boolean unarmed(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.unarmed");
|
return player.hasPermission("mcmmo.skills.unarmed");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean archery(Player player) {
|
public boolean archery(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.archery");
|
return player.hasPermission("mcmmo.skills.archery");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean herbalism(Player player) {
|
public boolean herbalism(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.herbalism");
|
return player.hasPermission("mcmmo.skills.herbalism");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean excavation(Player player) {
|
public boolean excavation(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.excavation");
|
return player.hasPermission("mcmmo.skills.excavation");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean swords(Player player) {
|
public boolean swords(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.swords");
|
return player.hasPermission("mcmmo.skills.swords");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean axes(Player player) {
|
public boolean axes(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.axes");
|
return player.hasPermission("mcmmo.skills.axes");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean acrobatics(Player player) {
|
public boolean acrobatics(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.acrobatics");
|
return player.hasPermission("mcmmo.skills.acrobatics");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -93,7 +93,7 @@ public class Repair {
|
|||||||
repairItem(player, is, new ItemStack(LoadProperties.rGold));
|
repairItem(player, is, new ItemStack(LoadProperties.rGold));
|
||||||
xpHandler(player, PP, is, durabilityBefore, 8, true);
|
xpHandler(player, PP, is, durabilityBefore, 8, true);
|
||||||
}
|
}
|
||||||
else if (is.getType().equals(Material.BOW) && inventory.contains(LoadProperties.rString) && skillLevel >= LoadProperties.repairBowLevel && mcPermissions.getInstance().bowRepair(player)){
|
else if (ItemChecks.isStringTool(is) && inventory.contains(LoadProperties.rString) && skillLevel >= LoadProperties.repairStringLevel && mcPermissions.getInstance().stringRepair(player)){
|
||||||
repairItem(player, is, new ItemStack(LoadProperties.rString));
|
repairItem(player, is, new ItemStack(LoadProperties.rString));
|
||||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ public class Repair {
|
|||||||
PP.addXP(SkillType.REPAIR, dif * 10);
|
PP.addXP(SkillType.REPAIR, dif * 10);
|
||||||
Skills.XpCheckSkill(SkillType.REPAIR, player);
|
Skills.XpCheckSkill(SkillType.REPAIR, player);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG (scary noise)
|
||||||
if (LoadProperties.spoutEnabled) {
|
if (LoadProperties.spoutEnabled) {
|
||||||
SpoutSounds.playRepairNoise(player);
|
SpoutSounds.playRepairNoise(player);
|
||||||
}
|
}
|
||||||
@ -321,7 +321,7 @@ public class Repair {
|
|||||||
else if (ItemChecks.isHoe(is) || ItemChecks.isSword(is) || is.getType().equals(Material.SHEARS)) {
|
else if (ItemChecks.isHoe(is) || ItemChecks.isSword(is) || is.getType().equals(Material.SHEARS)) {
|
||||||
ramt = maxDurability / 2;
|
ramt = maxDurability / 2;
|
||||||
}
|
}
|
||||||
else if (ItemChecks.isAxe(is) || ItemChecks.isMiningPick(is) || is.getType().equals(Material.BOW)) {
|
else if (ItemChecks.isAxe(is) || ItemChecks.isMiningPick(is) || ItemChecks.isStringTool(is)) {
|
||||||
ramt = maxDurability / 3;
|
ramt = maxDurability / 3;
|
||||||
}
|
}
|
||||||
else if (ItemChecks.isBoots(is)) {
|
else if (ItemChecks.isBoots(is)) {
|
||||||
@ -391,7 +391,7 @@ public class Repair {
|
|||||||
else if (ItemChecks.isLeatherArmor(is)) {
|
else if (ItemChecks.isLeatherArmor(is)) {
|
||||||
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(LoadProperties.rLeather));
|
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(LoadProperties.rLeather));
|
||||||
}
|
}
|
||||||
else if (is.getType().equals(Material.BOW)) {
|
else if (ItemChecks.isStringTool(is)) {
|
||||||
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(LoadProperties.rString));
|
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(LoadProperties.rString));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,8 +239,8 @@ permissions:
|
|||||||
description: Allows ability to repair armor
|
description: Allows ability to repair armor
|
||||||
mcmmo.ability.repair.toolrepair:
|
mcmmo.ability.repair.toolrepair:
|
||||||
description: Allows ability to repair tools
|
description: Allows ability to repair tools
|
||||||
mcmmo.ability.repair.bowrepair:
|
mcmmo.ability.repair.stringrepair:
|
||||||
description: Allows ability to repair bows
|
description: Allows ability to repair bows and fishing rods
|
||||||
mcmmo.ability.unarmed.*:
|
mcmmo.ability.unarmed.*:
|
||||||
description: Allows access to all Unarmed abilities
|
description: Allows access to all Unarmed abilities
|
||||||
children:
|
children:
|
||||||
|
Loading…
Reference in New Issue
Block a user