Fixed typo in regards to repair materials. Added option to configure

Anvil block ID.
This commit is contained in:
gmcferrin 2012-02-05 12:38:06 -05:00
parent cc9a6aa9b9
commit 6cfd81faf9
5 changed files with 8 additions and 7 deletions

View File

@ -69,7 +69,8 @@ public class LoadProperties {
mvines, mlilypad, mnetherbrick, mendstone, mmossstone, mstonebrick, mvines, mlilypad, mnetherbrick, mendstone, mmossstone, mstonebrick,
levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation, levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation,
levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair, levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair,
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting; levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting,
anvilID;
public static double xpbackground_r, xpbackground_g, xpbackground_b, public static double xpbackground_r, xpbackground_g, xpbackground_b,
xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g,
@ -327,6 +328,7 @@ public class LoadProperties {
acrobaticsxpmodifier = readDouble("Experience.Formula.Multiplier.Acrobatics", 1.0); acrobaticsxpmodifier = readDouble("Experience.Formula.Multiplier.Acrobatics", 1.0);
anvilmessages = readBoolean("Skills.Repair.Anvil_Messages", true); anvilmessages = readBoolean("Skills.Repair.Anvil_Messages", true);
anvilID = readInteger("Skills.Repair.Anvil_ID", 42);
rGold = readInteger("Skills.Repair.Gold.ID", 266); rGold = readInteger("Skills.Repair.Gold.ID", 266);
nGold = readString("Skills.Repair.Gold.Name", "Gold Bars"); nGold = readString("Skills.Repair.Gold.Name", "Gold Bars");
@ -341,7 +343,7 @@ public class LoadProperties {
rString = readInteger("Skills.Repair.String.ID", 287); rString = readInteger("Skills.Repair.String.ID", 287);
nString = readString("Skills.Repair.String.Name", "String"); nString = readString("Skills.Repair.String.Name", "String");
rLeather = readInteger("Skills.Repair.Leather.ID", 334); rLeather = readInteger("Skills.Repair.Leather.ID", 334);
nLeather = readString("Skills.Repair.String.Name", "Leather"); nLeather = readString("Skills.Repair.Leather.Name", "Leather");
levelCapAcrobatics = readInteger("Skills.Acrobatics.Level_Cap", 0); levelCapAcrobatics = readInteger("Skills.Acrobatics.Level_Cap", 0);
levelCapArchery = readInteger("Skills.Archery.Level_Cap", 0); levelCapArchery = readInteger("Skills.Archery.Level_Cap", 0);

View File

@ -92,7 +92,7 @@ public class mcBlockListener implements Listener
} }
} }
if(block.getTypeId() == 42 && LoadProperties.anvilmessages) if(block.getTypeId() == LoadProperties.anvilID && LoadProperties.anvilmessages)
{ {
PlayerProfile PP = Users.getProfile(player); PlayerProfile PP = Users.getProfile(player);
if(LoadProperties.spoutEnabled) if(LoadProperties.spoutEnabled)

View File

@ -199,7 +199,7 @@ public class mcPlayerListener implements Listener
} }
if(block != null && player != null && mcPermissions.getInstance().repair(player) if(block != null && player != null && mcPermissions.getInstance().repair(player)
&& event.getClickedBlock().getTypeId() == 42 && (Repair.isTools(player.getItemInHand()) || Repair.isArmor(player.getItemInHand()))) && event.getClickedBlock().getTypeId() == LoadProperties.anvilID && (Repair.isTools(player.getItemInHand()) || Repair.isArmor(player.getItemInHand())))
{ {
Repair.repairCheck(player, is, event.getClickedBlock()); Repair.repairCheck(player, is, event.getClickedBlock());
event.setCancelled(true); event.setCancelled(true);

View File

@ -95,7 +95,7 @@ public class m
return id == 2 || id == 3 || id == 12 || id == 13 || id == 82 || //Excavation return id == 2 || id == 3 || id == 12 || id == 13 || id == 82 || //Excavation
id == 1 || id == 14 || id == 15 || id == 16 || id == 21 || id == 24 || id == 49 || id == 56 || id == 73 || id == 74 || id == 87 || id == 89 || id == 112 || id == 121 || id == 48 || id == 98 || //Mining id == 1 || id == 14 || id == 15 || id == 16 || id == 21 || id == 24 || id == 49 || id == 56 || id == 73 || id == 74 || id == 87 || id == 89 || id == 112 || id == 121 || id == 48 || id == 98 || //Mining
id == 17 || id == 37 || id == 38 || id == 39 || id == 40 || id == 81 || id == 83 || id == 86 || id == 91 || id == 103 || id == 106 || id == 111 || //Woodcutting & Herbalism id == 17 || id == 37 || id == 38 || id == 39 || id == 40 || id == 81 || id == 83 || id == 86 || id == 91 || id == 103 || id == 106 || id == 111 || //Woodcutting & Herbalism
id == 42; //Anvil id == LoadProperties.anvilID; //Anvil
} }
public static int getPowerLevel(Player player) public static int getPowerLevel(Player player)
@ -210,7 +210,7 @@ public class m
public static boolean abilityBlockCheck(Block block) public static boolean abilityBlockCheck(Block block)
{ {
int i = block.getTypeId(); int i = block.getTypeId();
if(i == 107 ||i == 117 || i == 116 || i == 96 || i == 68 || i == 355 || i == 26 || i == 323 || i == 25 || i == 54 || i == 69 || i == 92 || i == 77 || i == 58 || i == 61 || i == 62 || i == 42 || i == 71 || i == 64 || i == 84 || i == 324 || i == 330){ if(i == 107 ||i == 117 || i == 116 || i == 96 || i == 68 || i == 355 || i == 26 || i == 323 || i == 25 || i == 54 || i == 69 || i == 92 || i == 77 || i == 58 || i == 61 || i == 62 || i == LoadProperties.anvilID || i == 71 || i == 64 || i == 84 || i == 324 || i == 330){
return false; return false;
} else { } else {
return true; return true;

View File

@ -32,7 +32,6 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import org.getspout.spoutapi.sound.SoundEffect; import org.getspout.spoutapi.sound.SoundEffect;
public class Excavation public class Excavation
{ {
public static void gigaDrillBreakerActivationCheck(Player player, Block block) public static void gigaDrillBreakerActivationCheck(Player player, Block block)