More locale updates.

This commit is contained in:
GJ 2012-04-24 09:21:21 -04:00
parent c97fff320b
commit ef17da48c7
27 changed files with 411 additions and 356 deletions

View File

@ -352,10 +352,10 @@ public class Combat {
String message = ""; String message = "";
if (type.equals(SkillType.AXES)) { if (type.equals(SkillType.AXES)) {
message = mcLocale.getString("Axes.HitByCleave"); message = mcLocale.getString("Axes.Combat.Cleave.Struck");
} }
else if (type.equals(SkillType.SWORDS)) { else if (type.equals(SkillType.SWORDS)) {
message = mcLocale.getString("Swords.HitBySerratedStrikes"); message = mcLocale.getString("Swords.Combat.SS.Struck");
} }
dealDamage(defender, damageAmount, attacker); dealDamage(defender, damageAmount, attacker);

View File

@ -38,7 +38,7 @@ public class Item {
for (int y = 0; block.getY() + y < player.getWorld().getMaxHeight(); y++) { for (int y = 0; block.getY() + y < player.getWorld().getMaxHeight(); y++) {
if (!block.getRelative(0, y, 0).getType().equals(Material.AIR)) { if (!block.getRelative(0, y, 0).getType().equals(Material.AIR)) {
player.sendMessage(mcLocale.getString("Item.ChimaeraWingFail")); player.sendMessage(mcLocale.getString("Item.ChimaeraWing.Fail"));
player.teleport(block.getRelative(0, y - 1, 0).getLocation()); player.teleport(block.getRelative(0, y - 1, 0).getLocation());
return; return;
} }
@ -51,10 +51,10 @@ public class Item {
player.teleport(player.getWorld().getSpawnLocation()); player.teleport(player.getWorld().getSpawnLocation());
} }
player.sendMessage(mcLocale.getString("Item.ChimaeraWingPass")); player.sendMessage(mcLocale.getString("Item.ChimaeraWing.Pass"));
} }
else if (!Skills.cooldownOver(PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing) { else if (!Skills.cooldownOver(PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing) {
player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(PP.getRecentlyHurt(), 60)})); player.sendMessage(mcLocale.getString("Item.Injured.Wait", new Object[] {Skills.calculateTimeLeft(PP.getRecentlyHurt(), 60)}));
} }
else if (is.getAmount() <= LoadProperties.feathersConsumedByChimaeraWing) { else if (is.getAmount() <= LoadProperties.feathersConsumedByChimaeraWing) {
player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.chimaeraId)); player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.chimaeraId));

View File

@ -48,7 +48,7 @@ public class InspectCommand implements CommandExecutor {
CommandHelper.printGatheringSkills(player, sender); CommandHelper.printGatheringSkills(player, sender);
CommandHelper.printCombatSkills(player, sender); CommandHelper.printCombatSkills(player, sender);
CommandHelper.printMiscSkills(player, sender); CommandHelper.printMiscSkills(player, sender);
sender.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevel", new Object[] { PP.getPowerLevel() })); sender.sendMessage(mcLocale.getString("Commands.PowerLevel", new Object[] { PP.getPowerLevel() }));
return true; return true;
} }

View File

@ -57,33 +57,28 @@ public class AxesCommand implements CommandExecutor {
} }
private void dataCalculations(float skillValue) { private void dataCalculations(float skillValue) {
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
if (skillValue >= 1000) { if (skillValue >= 1000) {
critChance = "37.5"; critChance = "37.5";
bonusDamage = "4"; bonusDamage = "4";
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
greaterImpactDamage = "2"; greaterImpactDamage = "2";
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
} }
else if (skillValue >= 750) { else if (skillValue >= 750) {
critChance = "37.5"; critChance = "37.5";
bonusDamage = "4"; bonusDamage = "4";
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
greaterImpactDamage = "2"; greaterImpactDamage = "2";
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
} }
else if (skillValue >= 200) { else if (skillValue >= 200) {
critChance = String.valueOf(skillValue / 20); critChance = String.valueOf(skillValue / 20);
bonusDamage = "4"; bonusDamage = "4";
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
greaterImpactDamage = "2"; greaterImpactDamage = "2";
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
} }
else { else {
critChance = String.valueOf(skillValue / 20); critChance = String.valueOf(skillValue / 20);
bonusDamage = String.valueOf((int) skillValue / 50); bonusDamage = String.valueOf((int) skillValue / 50);
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
greaterImpactDamage = "2"; greaterImpactDamage = "2";
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
} }
} }
} }

View File

@ -6,7 +6,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.Users; import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.commands.CommandHelper; import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
@ -14,41 +13,42 @@ import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.util.Page; import com.gmail.nossr50.util.Page;
public class ExcavationCommand implements CommandExecutor { public class ExcavationCommand implements CommandExecutor {
@Override private float skillValue;
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { private String gigaDrillBreakerLength;
if (!(sender instanceof Player)) {
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale. @Override
return true; public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
} if (CommandHelper.noConsoleUsage(sender)) {
return true;
}
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.excavation")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.excavation")) {
return true; return true;
} }
Player player = (Player) sender;
PlayerProfile PP = Users.getProfile(player);
int ticks = 2; Player player = (Player) sender;
int x = PP.getSkillLevel(SkillType.EXCAVATION); PlayerProfile PP = Users.getProfile(player);
while (x >= 50) {
x -= 50;
ticks++;
}
player.sendMessage(""); skillValue = (float) PP.getSkillLevel(SkillType.EXCAVATION);
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Excavation.SkillName") })); dataCalculations(skillValue);
player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Excavation") }));
if (mcPermissions.getInstance().excavation(player)) player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Excavation.SkillName") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.EXCAVATION), PP.getSkillXpLevel(SkillType.EXCAVATION), PP.getXpToLevel(SkillType.EXCAVATION) })); player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Excavation") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.EXCAVATION), PP.getSkillXpLevel(SkillType.EXCAVATION), PP.getXpToLevel(SkillType.EXCAVATION) }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsExcavation1_0"), mcLocale.getString("m.EffectsExcavation1_1") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Excavation.Effect.0"), mcLocale.getString("Excavation.Effect.1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsExcavation2_0"), mcLocale.getString("m.EffectsExcavation2_1") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Excavation.Effect.2"), mcLocale.getString("Excavation.Effect.3") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("m.ExcavationGigaDrillBreakerLength", new Object[] { ticks }));
Page.grabGuidePageForSkill(SkillType.EXCAVATION, player, args); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }));
return true;
} Page.grabGuidePageForSkill(SkillType.EXCAVATION, player, args);
return true;
}
private void dataCalculations(float skillValue) {
gigaDrillBreakerLength = String.valueOf(2 + ((int) skillValue / 50));
}
} }

View File

@ -6,7 +6,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.Users; import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.commands.CommandHelper; import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
@ -15,41 +14,42 @@ import com.gmail.nossr50.skills.Fishing;
import com.gmail.nossr50.util.Page; import com.gmail.nossr50.util.Page;
public class FishingCommand implements CommandExecutor { public class FishingCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) { if (CommandHelper.noConsoleUsage(sender)) {
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale. return true;
return true; }
}
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.fishing")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.fishing")) {
return true; return true;
} }
Player player = (Player) sender; Player player = (Player) sender;
PlayerProfile PP = Users.getProfile(player); PlayerProfile PP = Users.getProfile(player);
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Fishing.SkillName") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Fishing.SkillName") }));
player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Fishing") })); player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Fishing") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.FISHING), PP.getSkillXpLevel(SkillType.FISHING), PP.getXpToLevel(SkillType.FISHING) }));
if (mcPermissions.getInstance().fishing(player)) player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.FISHING), PP.getSkillXpLevel(SkillType.FISHING), PP.getXpToLevel(SkillType.FISHING) })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Fishing.Effect.0"), mcLocale.getString("Fishing.Effect.1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Fishing.Effect.2"), mcLocale.getString("Fishing.Effect.3") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Fishing.Effect.4"), mcLocale.getString("Fishing.Effect.5") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsFishing1_0"), mcLocale.getString("m.EffectsFishing1_1") })); player.sendMessage(mcLocale.getString("Fishing.Ability.Rank", new Object[] { Fishing.getFishingLootTier(PP) }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsFishing2_0"), mcLocale.getString("m.EffectsFishing2_1") })); player.sendMessage(mcLocale.getString("Fishing.Ability.Info"));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsFishing3_0"), mcLocale.getString("m.EffectsFishing3_1") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("m.FishingRank", new Object[] { Fishing.getFishingLootTier(PP) }));
player.sendMessage(mcLocale.getString("m.FishingMagicInfo"));
if (PP.getSkillLevel(SkillType.FISHING) < 150) //TODO: Do we really need to display this twice? Not like there are any associated stats.
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockFishing1") })); if (PP.getSkillLevel(SkillType.FISHING) < 150) {
else player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("Fishing.Ability.Locked.0") }));
player.sendMessage(mcLocale.getString("m.ShakeInfo", new Object[] { Fishing.getFishingLootTier(PP) })); }
else {
Page.grabGuidePageForSkill(SkillType.FISHING, player, args); player.sendMessage(mcLocale.getString("Fishing.Ability.Shake"));
}
return true; Page.grabGuidePageForSkill(SkillType.FISHING, player, args);
}
return true;
}
} }

View File

@ -6,7 +6,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.Users; import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.commands.CommandHelper; import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
@ -14,64 +13,96 @@ import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.util.Page; import com.gmail.nossr50.util.Page;
public class HerbalismCommand implements CommandExecutor { public class HerbalismCommand implements CommandExecutor {
@Override private float skillValue;
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { private String greenTerraLength;
if (!(sender instanceof Player)) { private String greenThumbChance;
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale. private String greenThumbStage;
return true; private String farmersDietRank;
} private String doubleDropChance;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (CommandHelper.noConsoleUsage(sender)) {
return true;
}
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.herbalism")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.herbalism")) {
return true; return true;
} }
Player player = (Player) sender;
PlayerProfile PP = Users.getProfile(player);
int bonus = 0; Player player = (Player) sender;
if (PP.getSkillLevel(SkillType.HERBALISM) >= 200) PlayerProfile PP = Users.getProfile(player);
bonus++;
if (PP.getSkillLevel(SkillType.HERBALISM) >= 400)
bonus++;
if (PP.getSkillLevel(SkillType.HERBALISM) >= 600)
bonus++;
if (PP.getSkillLevel(SkillType.HERBALISM) >= 800)
bonus++;
if (PP.getSkillLevel(SkillType.HERBALISM) >= 1000)
bonus++;
int ticks = 2; skillValue = (float) PP.getSkillLevel(SkillType.HERBALISM);
int x = PP.getSkillLevel(SkillType.HERBALISM); dataCalculations(skillValue);
while (x >= 50) {
x -= 50;
ticks++;
}
float skillvalue = (float) PP.getSkillLevel(SkillType.HERBALISM); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Herbalism.SkillName") }));
player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Herbalism") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.HERBALISM), PP.getSkillXpLevel(SkillType.HERBALISM), PP.getXpToLevel(SkillType.HERBALISM) }));
String percentage = String.valueOf((skillvalue / 1000) * 100); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") }));
String gpercentage = String.valueOf((skillvalue / 1500) * 100); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Herbalism.Effect.0"), mcLocale.getString("Herbalism.Effect.1") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Herbalism.SkillName") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Herbalism.Effect.2"), mcLocale.getString("Herbalism.Effect.3") }));
player.sendMessage(mcLocale.getString("Commands.XPGain", new Object[] { mcLocale.getString("Commands.XPGain.Herbalism") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Herbalism.Effect.4"), mcLocale.getString("Herbalism.Effect.5") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Herbalism.Effect.6"), mcLocale.getString("Herbalism.Effect.7") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Herbalism.Effect.8"), mcLocale.getString("Herbalism.Effect.9") }));
if (mcPermissions.getInstance().herbalism(player)) player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("Effects.Level", new Object[] { PP.getSkillLevel(SkillType.HERBALISM), PP.getSkillXpLevel(SkillType.HERBALISM), PP.getXpToLevel(SkillType.HERBALISM) })); player.sendMessage(mcLocale.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength }));
player.sendMessage(mcLocale.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }));
player.sendMessage(mcLocale.getString("Herbalism.Ability.GTh.Stage", new Object[] { greenThumbStage }));
player.sendMessage(mcLocale.getString("Herbalism.Ability.FD", new Object[] { farmersDietRank } ));
player.sendMessage(mcLocale.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Effects.Effects") })); Page.grabGuidePageForSkill(SkillType.HERBALISM, player, args);
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsHerbalism1_0"), mcLocale.getString("m.EffectsHerbalism1_1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsHerbalism2_0"), mcLocale.getString("m.EffectsHerbalism2_1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsHerbalism3_0"), mcLocale.getString("m.EffectsHerbalism3_1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsHerbalism4_0"), mcLocale.getString("m.EffectsHerbalism4_1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("m.EffectsHerbalism5_0"), mcLocale.getString("m.EffectsHerbalism5_1") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
player.sendMessage(mcLocale.getString("m.HerbalismGreenTerraLength", new Object[] { ticks }));
player.sendMessage(mcLocale.getString("m.HerbalismGreenThumbChance", new Object[] { gpercentage }));
player.sendMessage(mcLocale.getString("m.HerbalismGreenThumbStage", new Object[] { bonus }));
player.sendMessage(mcLocale.getString("m.HerbalismFoodPlus", new Object[] { bonus } ));
player.sendMessage(mcLocale.getString("m.HerbalismDoubleDropChance", new Object[] { percentage }));
Page.grabGuidePageForSkill(SkillType.HERBALISM, player, args);
return true; return true;
} }
private void dataCalculations(float skillValue) {
greenTerraLength = String.valueOf(2 + ((int) skillValue / 50));
if (skillValue >= 1500) {
greenThumbChance = "100";
greenThumbStage = "4";
farmersDietRank = "5";
doubleDropChance = "100";
}
else if (skillValue >= 1000) {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "4";
farmersDietRank = "5";
doubleDropChance = "100";
}
else if (skillValue >= 800) {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "4";
farmersDietRank = "4";
doubleDropChance = String.valueOf(skillValue / 10);
}
else if (skillValue >= 600) {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "4";
farmersDietRank = "3";
doubleDropChance = String.valueOf(skillValue / 10);
}
else if (skillValue >= 400) {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "3";
farmersDietRank = "2";
doubleDropChance = String.valueOf(skillValue / 10);
}
else if (skillValue >= 200) {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "2";
farmersDietRank = "1";
doubleDropChance = String.valueOf(skillValue / 10);
}
else {
greenThumbChance = String.valueOf(skillValue / 15);
greenThumbStage = "1";
farmersDietRank = "1";
doubleDropChance = String.valueOf(skillValue / 10);
}
}
} }

View File

@ -92,7 +92,7 @@ public class MiningCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("m.MiningDoubleDropChance", new Object[] { percentage })); player.sendMessage(mcLocale.getString("m.MiningDoubleDropChance", new Object[] { percentage }));
player.sendMessage(mcLocale.getString("m.MiningSuperBreakerLength", new Object[] { ticks })); player.sendMessage(mcLocale.getString("m.MiningSuperBreakerLength", new Object[] { ticks }));
if (PP.getSkillLevel(SkillType.MINING) < 125) if (PP.getSkillLevel(SkillType.MINING) < 125)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockMining1") }));
else{ else{
switch (rank){ switch (rank){
case 1: case 1:
@ -122,11 +122,11 @@ public class MiningCommand implements CommandExecutor {
} }
} }
if (PP.getSkillLevel(SkillType.MINING) < 250) if (PP.getSkillLevel(SkillType.MINING) < 250)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining2") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockMining2") }));
else else
player.sendMessage(mcLocale.getString("m.MiningBiggerBombs", new Object[] { radius })); player.sendMessage(mcLocale.getString("m.MiningBiggerBombs", new Object[] { radius }));
if (PP.getSkillLevel(SkillType.MINING) < 500) if (PP.getSkillLevel(SkillType.MINING) < 500)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining3") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockMining3") }));
else else
player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage })); player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage }));

View File

@ -50,26 +50,26 @@ public class TamingCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
if (PP.getSkillLevel(SkillType.TAMING) < 100) if (PP.getSkillLevel(SkillType.TAMING) < 100)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockTaming1") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming1_0"), mcLocale.getString("m.AbilBonusTaming1_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming1_0"), mcLocale.getString("m.AbilBonusTaming1_1") }));
if (PP.getSkillLevel(SkillType.TAMING) < 250) if (PP.getSkillLevel(SkillType.TAMING) < 250)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming2") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockTaming2") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming2_0"), mcLocale.getString("m.AbilBonusTaming2_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming2_0"), mcLocale.getString("m.AbilBonusTaming2_1") }));
if (PP.getSkillLevel(SkillType.TAMING) < 500) if (PP.getSkillLevel(SkillType.TAMING) < 500)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming3") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockTaming3") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming3_0"), mcLocale.getString("m.AbilBonusTaming3_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming3_0"), mcLocale.getString("m.AbilBonusTaming3_1") }));
if (PP.getSkillLevel(SkillType.TAMING) < 750) if (PP.getSkillLevel(SkillType.TAMING) < 750)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming4") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockTaming4") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming4_0"), mcLocale.getString("m.AbilBonusTaming4_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming4_0"), mcLocale.getString("m.AbilBonusTaming4_1") }));
if (PP.getSkillLevel(SkillType.TAMING) < 50) if (PP.getSkillLevel(SkillType.TAMING) < 50)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming5") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockTaming5") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming5_0"), mcLocale.getString("m.AbilBonusTaming5_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusTaming5_0"), mcLocale.getString("m.AbilBonusTaming5_1") }));

View File

@ -49,7 +49,7 @@ public class WoodcuttingCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));
if (PP.getSkillLevel(SkillType.WOODCUTTING) < 100) if (PP.getSkillLevel(SkillType.WOODCUTTING) < 100)
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockWoodCutting1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template.Lock", new Object[] { mcLocale.getString("m.AbilLockWoodCutting1") }));
else else
player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusWoodCutting1_0"), mcLocale.getString("m.AbilBonusWoodCutting1_1") })); player.sendMessage(mcLocale.getString("Ability.Generic.Template", new Object[] { mcLocale.getString("m.AbilBonusWoodCutting1_0"), mcLocale.getString("m.AbilBonusWoodCutting1_1") }));

View File

@ -1,134 +1,196 @@
package com.gmail.nossr50.datatypes; package com.gmail.nossr50.datatypes;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.mcPermissions; import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties; import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.skills.Excavation; import com.gmail.nossr50.skills.Excavation;
import com.gmail.nossr50.skills.Herbalism; import com.gmail.nossr50.skills.Herbalism;
import com.gmail.nossr50.skills.Mining; import com.gmail.nossr50.skills.Mining;
public enum AbilityType { public enum AbilityType {
BERSERK(LoadProperties.berserkCooldown, mcLocale.getString("Skills.BerserkOn"), mcLocale.getString("Skills.BerserkOff"), "Skills.BerserkPlayer", mcLocale.getString("Skills.YourBerserk"), "Skills.BerserkPlayerOff"), BERSERK(
SUPER_BREAKER(LoadProperties.superBreakerCooldown, mcLocale.getString("Skills.SuperBreakerOn"), mcLocale.getString("Skills.SuperBreakerOff"), "Skills.SuperBreakerPlayer", mcLocale.getString("Skills.YourSuperBreaker"), "Skills.SuperBreakerPlayerOff"), LoadProperties.berserkCooldown,
GIGA_DRILL_BREAKER(LoadProperties.gigaDrillBreakerCooldown, mcLocale.getString("Skills.GigaDrillBreakerOn"), mcLocale.getString("Skills.GigaDrillBreakerOff"), "Skills.GigaDrillBreakerPlayer", mcLocale.getString("Skills.YourGigaDrillBreaker"), "Skills.GigaDrillBreakerPlayerOff"), "Unarmed.Skills.Berserk.On",
GREEN_TERRA(LoadProperties.greenTerraCooldown, mcLocale.getString("Skills.GreenTerraOn"), mcLocale.getString("Skills.GreenTerraOff"), "Skills.GreenTerraPlayer", mcLocale.getString("Skills.YourGreenTerra"), mcLocale.getString("Skills.GreenTerraPlayerOff")), "Unarmed.Skills.Berserk.Off",
SKULL_SPLIITER(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SkullSplitterOn"), mcLocale.getString("Skills.SkullSplitterOff"), "Skills.SkullSplitterPlayer", mcLocale.getString("Skills.YourSkullSplitter"), "Skills.SkullSplitterPlayerOff"), "Unarmed.Skills.Berserk.Other.On",
TREE_FELLER(LoadProperties.treeFellerCooldown, mcLocale.getString("Skills.TreeFellerOn"), mcLocale.getString("Skills.TreeFellerOff"), "Skills.TreeFellerPlayer", mcLocale.getString("Skills.YourTreeFeller"), "Skills.TreeFellerPlayerOff"), "Unarmed.Skills.Berserk.Refresh",
SERRATED_STRIKES(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SerratedStrikesOn"), mcLocale.getString("Skills.SerratedStrikesOff"), "Skills.SerratedStrikesPlayer", mcLocale.getString("Skills.YourSerratedStrikes"), "Skills.SerratedStrikesPlayerOff"), "Unarmed.Skills.Berserk.Other.Off"),
BLAST_MINING(LoadProperties.blastMiningCooldown, null, null, "Skills.BlastMiningPlayer", mcLocale.getString("Skills.YourBlastMining"), null),
LEAF_BLOWER(0, null, null, null, null, null); SUPER_BREAKER(
LoadProperties.superBreakerCooldown,
private int cooldown; "Mining.Skills.SuperBreaker.On",
private String abilityOn; "Mining.Skills.SuperBreaker.Off",
private String abilityOff; "Mining.Skills.SuperBreaker.Other.On",
private String abilityPlayer; "Mining.Skills.SuperBreaker.Refresh",
private String abilityRefresh; "Mining.Skills.SuperBreaker.Other.Off"),
private String abilityPlayerOff;
GIGA_DRILL_BREAKER(
private AbilityType(int cooldown, String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff) { LoadProperties.gigaDrillBreakerCooldown,
this.cooldown = cooldown; "Excavation.Skills.GigaDrillBreaker.On",
this.abilityOn = abilityOn; "Excavation.Skills.GigaDrillBreaker.Off",
this.abilityOff = abilityOff; "Excavation.Skills.GigaDrillBreaker.Other.On",
this.abilityPlayer = abilityPlayer; "Excavation.Skills.GigaDrillBreaker.Refresh",
this.abilityRefresh = abilityRefresh; "Excavation.Skills.GigaDrillBreaker.Other.Off"),
this.abilityPlayerOff = abilityPlayerOff;
} GREEN_TERRA(
LoadProperties.greenTerraCooldown,
public int getCooldown() { "Herbalism.Skills.GTe.On",
return this.cooldown; "Herbalism.Skills.GTe.Off",
} "Herbalism.Skills.GTe.Other.On",
"Herbalism.Skills.GTe.Refresh",
public String getAbilityOn() { "Herbalism.Skills.GTe.Other.Off"),
return this.abilityOn;
} SKULL_SPLIITER(
LoadProperties.skullSplitterCooldown,
public String getAbilityOff() { "Axes.Skills.SS.On",
return this.abilityOff; "Axes.Skills.SS.Off",
} "Axes.Skills.SS.Other.On",
"Axes.Skills.SS.Refresh",
public String getAbilityPlayer(Player player) { "Axes.Skills.SS.Other.Off"),
return mcLocale.getString(this.abilityPlayer, new Object[] {player.getName()});
} TREE_FELLER(
LoadProperties.treeFellerCooldown,
public String getAbilityPlayerOff(Player player) { "Woodcutting.Skills.TreeFeller.On",
return mcLocale.getString(this.abilityPlayerOff, new Object[] {player.getName()}); "Woodcutting.Skills.TreeFeller.Off",
} "Woodcutting.Skills.TreeFeller.Other.On",
"Woodcutting.Skills.TreeFeller.Refresh",
public String getAbilityRefresh() { "Woodcutting.Skills.TreeFeller.Other.Off"),
return this.abilityRefresh;
} SERRATED_STRIKES(
LoadProperties.serratedStrikeCooldown,
/** "Swords.Skills.SS.On",
* Get the permissions for this ability. "Swords.Skills.SS.Off",
* "Swords.Skills.SS.Other.On",
* @param player Player to check permissions for "Swords.Skills.SS.Refresh",
* @return true if the player has permissions, false otherwise "Swords.Skills.SS.Other.Off"),
*/
public boolean getPermissions(Player player) { BLAST_MINING(
switch (this) { LoadProperties.blastMiningCooldown,
case BERSERK: null,
return mcPermissions.getInstance().berserk(player); null,
"Mining.Blast.Other.On",
case BLAST_MINING: "Mining.Blast.Refresh",
return mcPermissions.getInstance().blastMining(player); null),
case GIGA_DRILL_BREAKER: LEAF_BLOWER(
return mcPermissions.getInstance().gigaDrillBreaker(player); 0,
null,
case GREEN_TERRA: null,
return mcPermissions.getInstance().greenTerra(player); null,
null,
case LEAF_BLOWER: null);
return mcPermissions.getInstance().leafBlower(player);
private int cooldown;
case SERRATED_STRIKES: private String abilityOn;
return mcPermissions.getInstance().serratedStrikes(player); private String abilityOff;
private String abilityPlayer;
case SKULL_SPLIITER: private String abilityRefresh;
return mcPermissions.getInstance().skullSplitter(player); private String abilityPlayerOff;
case SUPER_BREAKER: private AbilityType(int cooldown, String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff) {
return mcPermissions.getInstance().superBreaker(player); this.cooldown = cooldown;
this.abilityOn = abilityOn;
case TREE_FELLER: this.abilityOff = abilityOff;
return mcPermissions.getInstance().treeFeller(player); this.abilityPlayer = abilityPlayer;
this.abilityRefresh = abilityRefresh;
default: this.abilityPlayerOff = abilityPlayerOff;
return false; }
}
} public int getCooldown() {
return this.cooldown;
/** }
* Check if a block is affected by this ability.
* public String getAbilityOn() {
* @param material The block type to check return mcLocale.getString(this.abilityOn);
* @return true if the block is affected by this ability, false otherwise }
*/
public boolean blockCheck(Material material) { public String getAbilityOff() {
switch (this) { return mcLocale.getString(this.abilityOff);
case BERSERK: }
return (Excavation.canBeGigaDrillBroken(material) || material.equals(Material.SNOW));
public String getAbilityPlayer(Player player) {
case GIGA_DRILL_BREAKER: return mcLocale.getString(this.abilityPlayer, new Object[] {player.getName()});
return Excavation.canBeGigaDrillBroken(material); }
case GREEN_TERRA: public String getAbilityPlayerOff(Player player) {
return Herbalism.makeMossy(material); return mcLocale.getString(this.abilityPlayerOff, new Object[] {player.getName()});
}
case LEAF_BLOWER:
return material.equals(Material.LEAVES); public String getAbilityRefresh() {
return mcLocale.getString(this.abilityRefresh);
case SUPER_BREAKER: }
return Mining.canBeSuperBroken(material);
/**
case TREE_FELLER: * Get the permissions for this ability.
return material.equals(Material.LOG); *
* @param player Player to check permissions for
default: * @return true if the player has permissions, false otherwise
return false; */
} public boolean getPermissions(Player player) {
} switch (this) {
} case BERSERK:
return mcPermissions.getInstance().berserk(player);
case BLAST_MINING:
return mcPermissions.getInstance().blastMining(player);
case GIGA_DRILL_BREAKER:
return mcPermissions.getInstance().gigaDrillBreaker(player);
case GREEN_TERRA:
return mcPermissions.getInstance().greenTerra(player);
case LEAF_BLOWER:
return mcPermissions.getInstance().leafBlower(player);
case SERRATED_STRIKES:
return mcPermissions.getInstance().serratedStrikes(player);
case SKULL_SPLIITER:
return mcPermissions.getInstance().skullSplitter(player);
case SUPER_BREAKER:
return mcPermissions.getInstance().superBreaker(player);
case TREE_FELLER:
return mcPermissions.getInstance().treeFeller(player);
default:
return false;
}
}
/**
* Check if a block is affected by this ability.
*
* @param material The block type to check
* @return true if the block is affected by this ability, false otherwise
*/
public boolean blockCheck(Material material) {
switch (this) {
case BERSERK:
return (Excavation.canBeGigaDrillBroken(material) || material.equals(Material.SNOW));
case GIGA_DRILL_BREAKER:
return Excavation.canBeGigaDrillBroken(material);
case GREEN_TERRA:
return Herbalism.makeMossy(material);
case LEAF_BLOWER:
return material.equals(Material.LEAVES);
case SUPER_BREAKER:
return Mining.canBeSuperBroken(material);
case TREE_FELLER:
return material.equals(Material.LOG);
default:
return false;
}
}
}

View File

@ -7,12 +7,12 @@ import com.gmail.nossr50.ItemChecks;
import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.locale.mcLocale;
public enum ToolType { public enum ToolType {
AXE(mcLocale.getString("Skills.LowerAxe"), mcLocale.getString("Skills.ReadyAxe")), AXE(mcLocale.getString("Axes.Ability.Lower"), mcLocale.getString("Axes.Ability.Ready")),
FISTS(mcLocale.getString("Skills.LowerFists"), mcLocale.getString("Skills.ReadyFists")), FISTS(mcLocale.getString("Unarmed.Ability.Lower"), mcLocale.getString("Unarmed.Ability.Ready")),
HOE(mcLocale.getString("Skills.LowerHoe"), mcLocale.getString("Skills.ReadyHoe")), HOE(mcLocale.getString("Herbalism.Ability.Lower"), mcLocale.getString("Herbalism.Ability.Ready")),
PICKAXE(mcLocale.getString("Skills.LowerPickAxe"), mcLocale.getString("Skills.ReadyPickAxe")), PICKAXE(mcLocale.getString("Mining.Ability.Lower"), mcLocale.getString("Mining.Ability.Ready")),
SHOVEL(mcLocale.getString("Skills.LowerShovel"), mcLocale.getString("Skills.ReadyShovel")), SHOVEL(mcLocale.getString("Excavation.Ability.Lower"), mcLocale.getString("Excavation.Ability.Ready")),
SWORD(mcLocale.getString("Skills.LowerSword"), mcLocale.getString("Skills.ReadySword")); SWORD(mcLocale.getString("Swords.Ability.Lower"), mcLocale.getString("Swords.Ability.Ready"));
private String lowerTool; private String lowerTool;
private String raiseTool; private String raiseTool;

View File

@ -226,7 +226,8 @@ public class mcEntityListener implements Listener {
int currentFoodLevel = player.getFoodLevel(); int currentFoodLevel = player.getFoodLevel();
int newFoodLevel = event.getFoodLevel(); int newFoodLevel = event.getFoodLevel();
/* Some foods have 3 ranks /*
* Some foods have 3 ranks
* Some foods have 5 ranks * Some foods have 5 ranks
* The number of ranks is based on how 'common' the item is * The number of ranks is based on how 'common' the item is
* We can adjust this quite easily if we find something is giving too much of a bonus * We can adjust this quite easily if we find something is giving too much of a bonus

View File

@ -169,7 +169,7 @@ public class mcPlayerListener implements Listener {
if (mcPermissions.getInstance().motd(player) && LoadProperties.enableMotd) { if (mcPermissions.getInstance().motd(player) && LoadProperties.enableMotd) {
player.sendMessage(mcLocale.getString("mcMMO.MOTD", new Object[] {plugin.getDescription().getVersion()})); player.sendMessage(mcLocale.getString("mcMMO.MOTD", new Object[] {plugin.getDescription().getVersion()}));
player.sendMessage(mcLocale.getString("McMMO.Wiki")); player.sendMessage(mcLocale.getString("mcMMO.Wiki"));
} }
//THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY //THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY

View File

@ -54,7 +54,7 @@ public class mcBleedTimer implements Runnable {
PP.decreaseBleedTicks(); PP.decreaseBleedTicks();
if (PP.getBleedTicks() == 0) { if (PP.getBleedTicks() == 0) {
player.sendMessage(mcLocale.getString("Swords.StoppedBleeding")); player.sendMessage(mcLocale.getString("Swords.Combat.Bleeding.Stopped"));
} }
} }
} }

View File

@ -34,25 +34,20 @@ public class mcTimer implements Runnable {
/* /*
* MONITOR SKILLS * MONITOR SKILLS
*/ */
Skills.monitorSkill(player, PP, curTime, SkillType.AXES); for (SkillType skill : SkillType.values()) {
Skills.monitorSkill(player, PP, curTime, SkillType.EXCAVATION); if (skill.getTool() != null && skill.getAbility() != null) {
Skills.monitorSkill(player, PP, curTime, SkillType.HERBALISM); Skills.monitorSkill(player, PP, curTime, skill);
Skills.monitorSkill(player, PP, curTime, SkillType.MINING); }
Skills.monitorSkill(player, PP, curTime, SkillType.SWORDS); }
Skills.monitorSkill(player, PP, curTime, SkillType.UNARMED);
Skills.monitorSkill(player, PP, curTime, SkillType.WOODCUTTING);
/* /*
* COOLDOWN MONITORING * COOLDOWN MONITORING
*/ */
Skills.watchCooldown(player, PP, curTime, AbilityType.SKULL_SPLIITER); for (AbilityType ability : AbilityType.values()) {
Skills.watchCooldown(player, PP, curTime, AbilityType.GIGA_DRILL_BREAKER); if (ability.getCooldown() > 0 ) {
Skills.watchCooldown(player, PP, curTime, AbilityType.GREEN_TERRA); Skills.watchCooldown(player, PP, curTime, ability);
Skills.watchCooldown(player, PP, curTime, AbilityType.SUPER_BREAKER); }
Skills.watchCooldown(player, PP, curTime, AbilityType.SERRATED_STRIKES); }
Skills.watchCooldown(player, PP, curTime, AbilityType.BERSERK);
Skills.watchCooldown(player, PP, curTime, AbilityType.TREE_FELLER);
Skills.watchCooldown(player, PP, curTime, AbilityType.BLAST_MINING);
} }
} }
} }

View File

@ -68,10 +68,10 @@ public class Acrobatics {
} }
if (gracefulRoll) { if (gracefulRoll) {
player.sendMessage(mcLocale.getString("Acrobatics.GracefulRoll")); player.sendMessage(mcLocale.getString("Acrobatics.Ability.Proc"));
} }
else { else {
player.sendMessage(mcLocale.getString("Acrobatics.Roll")); player.sendMessage(mcLocale.getString("Acrobatics.Roll.Text"));
} }
} }
} }
@ -108,7 +108,7 @@ public class Acrobatics {
int skillCheck = m.skillCheck(skillLevel, MAX_BONUS_LEVEL); int skillCheck = m.skillCheck(skillLevel, MAX_BONUS_LEVEL);
if (random.nextInt(4000) <= skillCheck && mcPermissions.getInstance().dodge(defender)) { if (random.nextInt(4000) <= skillCheck && mcPermissions.getInstance().dodge(defender)) {
defender.sendMessage(mcLocale.getString("Acrobatics.Dodge")); defender.sendMessage(mcLocale.getString("Acrobatics.Combat.Proc"));
if (System.currentTimeMillis() >= (5000 + PPd.getRespawnATS()) && defender.getHealth() >= 1) { if (System.currentTimeMillis() >= (5000 + PPd.getRespawnATS()) && defender.getHealth() >= 1) {
PPd.addXP(SkillType.ACROBATICS, damage * DODGE_MODIFIER); PPd.addXP(SkillType.ACROBATICS, damage * DODGE_MODIFIER);

View File

@ -80,12 +80,12 @@ public class Axes {
if (entity instanceof Player){ if (entity instanceof Player){
event.setDamage((int) (damage * PVP_MODIFIER)); event.setDamage((int) (damage * PVP_MODIFIER));
Player player = (Player) entity; Player player = (Player) entity;
player.sendMessage(mcLocale.getString("Axes.HitCritically")); player.sendMessage(mcLocale.getString("Axes.Combat.CritStruck"));
} }
else { else {
event.setDamage(damage * PVE_MODIFIER); event.setDamage(damage * PVE_MODIFIER);
} }
attacker.sendMessage(mcLocale.getString("Axes.CriticalHit")); attacker.sendMessage(mcLocale.getString("Axes.Combat.CriticalHit"));
} }
} }
@ -138,7 +138,7 @@ public class Axes {
if (random.nextInt(100) <= GREATER_IMPACT_CHANCE) { if (random.nextInt(100) <= GREATER_IMPACT_CHANCE) {
event.setDamage(event.getDamage() + 2); event.setDamage(event.getDamage() + 2);
target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(GREATER_IMPACT_MULTIPLIER)); target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(GREATER_IMPACT_MULTIPLIER));
attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy")); attacker.sendMessage(mcLocale.getString("Axes.Combat.GI.Proc"));
} }
} }

View File

@ -273,7 +273,7 @@ public class BlastMining {
} }
} }
player.sendMessage(mcLocale.getString("BlastMining.Boom")); player.sendMessage(mcLocale.getString("Mining.Blast.Boom"));
/* Create the TNT entity */ /* Create the TNT entity */
TNTPrimed tnt = player.getWorld().spawn(block.getLocation(), TNTPrimed.class); TNTPrimed tnt = player.getWorld().spawn(block.getLocation(), TNTPrimed.class);

View File

@ -97,14 +97,12 @@ public class Fishing {
break; break;
} }
if (LoadProperties.fishingDrops) { if (LoadProperties.fishingDrops && rewards.size() > 0) {
if (rewards.size() > 0) { FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
if (random.nextDouble() * 100 <= treasure.getDropChance()) { if (random.nextDouble() * 100 <= treasure.getDropChance()) {
Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp()); Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp());
theCatch.setItemStack(treasure.getDrop()); theCatch.setItemStack(treasure.getDrop());
}
} }
} }
else { else {

View File

@ -103,7 +103,7 @@ public class Repair {
} }
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.FullDurability")); player.sendMessage(mcLocale.getString("Repair.Skills.FullDurability"));
} }
} }
@ -190,7 +190,7 @@ public class Repair {
for (Enchantment x : enchants.keySet()) { for (Enchantment x : enchants.keySet()) {
is.removeEnchantment(x); is.removeEnchantment(x);
} }
player.sendMessage(mcLocale.getString("Repair.LostEnchants")); player.sendMessage(mcLocale.getString("Repair.Arcane.Lost"));
return; return;
} }
@ -217,13 +217,13 @@ public class Repair {
Map<Enchantment, Integer> newEnchants = is.getEnchantments(); Map<Enchantment, Integer> newEnchants = is.getEnchantments();
if (newEnchants.isEmpty()) { if (newEnchants.isEmpty()) {
player.sendMessage(mcLocale.getString("Repair.ArcaneFailed")); player.sendMessage(mcLocale.getString("Repair.Arcane.Fail"));
} }
else if (downgraded || newEnchants.size() < enchants.size()) { else if (downgraded || newEnchants.size() < enchants.size()) {
player.sendMessage(mcLocale.getString("Repair.Downgraded")); player.sendMessage(mcLocale.getString("Repair.Arcane.Downgrade"));
} }
else { else {
player.sendMessage(mcLocale.getString("Repair.ArcanePerfect")); player.sendMessage(mcLocale.getString("Repair.Arcane.Perfect"));
} }
} }
@ -350,12 +350,12 @@ public class Repair {
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR); int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
if (is.getAmount() != 1) { if (is.getAmount() != 1) {
player.sendMessage(mcLocale.getString("Skills.StackedItems")); player.sendMessage(mcLocale.getString("Repair.Skills.StackedItems"));
} }
else { else {
if (ItemChecks.isDiamondTool(is) || ItemChecks.isDiamondArmor(is)) { if (ItemChecks.isDiamondTool(is) || ItemChecks.isDiamondArmor(is)) {
if (skillLevel < LoadProperties.repairDiamondLevel) { if (skillLevel < LoadProperties.repairDiamondLevel) {
player.sendMessage(mcLocale.getString("Skills.AdeptDiamond")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptDiamond"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.BLUE + m.prettyItemString(LoadProperties.rDiamond)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.BLUE + m.prettyItemString(LoadProperties.rDiamond));
@ -363,7 +363,7 @@ public class Repair {
} }
else if (ItemChecks.isIronTool(is) || ItemChecks.isIronArmor(is)) { else if (ItemChecks.isIronTool(is) || ItemChecks.isIronArmor(is)) {
if (skillLevel < LoadProperties.repairIronLevel) { if (skillLevel < LoadProperties.repairIronLevel) {
player.sendMessage(mcLocale.getString("Skills.AdeptIron")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptIron"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.rIron)); player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.rIron));
@ -371,7 +371,7 @@ public class Repair {
} }
else if (ItemChecks.isGoldTool(is) || ItemChecks.isGoldArmor(is)) { else if (ItemChecks.isGoldTool(is) || ItemChecks.isGoldArmor(is)) {
if (skillLevel < LoadProperties.repairGoldLevel) { if (skillLevel < LoadProperties.repairGoldLevel) {
player.sendMessage(mcLocale.getString("Skills.AdeptGold")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptGold"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GOLD + m.prettyItemString(LoadProperties.rGold)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GOLD + m.prettyItemString(LoadProperties.rGold));
@ -379,7 +379,7 @@ public class Repair {
} }
else if (ItemChecks.isStoneTool(is)) { else if (ItemChecks.isStoneTool(is)) {
if (skillLevel < LoadProperties.repairStoneLevel) { if (skillLevel < LoadProperties.repairStoneLevel) {
player.sendMessage(mcLocale.getString("Skills.AdeptStone")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptStone"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.rStone)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GRAY + m.prettyItemString(LoadProperties.rStone));
@ -409,7 +409,7 @@ public class Repair {
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR); int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
if ((skillLevel > MAX_BONUS_LEVEL || random.nextInt(1000) <= skillLevel) && mcPermissions.getInstance().repairBonus(player)) { if ((skillLevel > MAX_BONUS_LEVEL || random.nextInt(1000) <= skillLevel) && mcPermissions.getInstance().repairBonus(player)) {
player.sendMessage(mcLocale.getString("Skills.FeltEasy")); player.sendMessage(mcLocale.getString("Repair.Skills.FeltEasy"));
return true; return true;
} }
@ -468,7 +468,7 @@ public class Repair {
} }
} }
else { else {
player.sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); player.sendMessage(mcLocale.getString("Repair.Listener.Anvil"));
} }
PP.togglePlacedAnvil(); PP.togglePlacedAnvil();

View File

@ -220,16 +220,16 @@ public class Skills {
SpoutStuff.levelUpNotification(skillType, sPlayer); SpoutStuff.levelUpNotification(skillType, sPlayer);
/* Update custom titles */ /* Update custom titles */
if(LoadProperties.showPowerLevel) { if (LoadProperties.showPowerLevel) {
sPlayer.setTitle(sPlayer.getName()+ "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl" + ChatColor.WHITE + "." + ChatColor.GREEN + String.valueOf(PP.getPowerLevel())); sPlayer.setTitle(sPlayer.getName()+ "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl" + ChatColor.WHITE + "." + ChatColor.GREEN + String.valueOf(PP.getPowerLevel()));
} }
} }
else { else {
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)})); player.sendMessage(mcLocale.getString(capitalized + "Skillup", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
} }
} }
else { else {
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)})); player.sendMessage(mcLocale.getString(capitalized + "Skillup", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
} }
} }

View File

@ -73,7 +73,7 @@ public class Swords {
else { else {
mcBleedTimer.add(entity); mcBleedTimer.add(entity);
} }
attacker.sendMessage(mcLocale.getString("Swords.EnemyBleeding")); attacker.sendMessage(mcLocale.getString("Swords.Combat.Bleeding"));
} }
} }
@ -104,10 +104,10 @@ public class Swords {
if (random.nextInt(2000) <= skillCheck) { if (random.nextInt(2000) <= skillCheck) {
Combat.dealDamage((LivingEntity) attacker, event.getDamage() / COUNTER_ATTACK_MODIFIER); Combat.dealDamage((LivingEntity) attacker, event.getDamage() / COUNTER_ATTACK_MODIFIER);
defender.sendMessage(mcLocale.getString("Swords.CounterAttacked")); defender.sendMessage(mcLocale.getString("Swords.Combat.Countered"));
if (attacker instanceof Player) { if (attacker instanceof Player) {
((Player) attacker).sendMessage(mcLocale.getString("Swords.HitByCounterAttack")); ((Player) attacker).sendMessage(mcLocale.getString("Swords.Combat.Counter.Hit"));
} }
} }
} }

View File

@ -154,7 +154,7 @@ public class Taming {
} }
wolf.teleport(master.getLocation()); wolf.teleport(master.getLocation());
master.sendMessage(mcLocale.getString("mcEntityListener.WolfComesBack")); master.sendMessage(mcLocale.getString("Taming.Listener.Wolf"));
} }
} }
break; break;
@ -232,11 +232,11 @@ public class Taming {
if (x.getType().equals(type)) { if (x.getType().equals(type)) {
switch (type) { switch (type) {
case WOLF: case WOLF:
player.sendMessage(mcLocale.getString("m.TamingSummonWolfFailed")); player.sendMessage(mcLocale.getString("Taming.Summon.Fail.Wolf"));
return; return;
case OCELOT: case OCELOT:
player.sendMessage(mcLocale.getString("m.TamingSummonOcelotFailed")); player.sendMessage(mcLocale.getString("Taming.Summon.Fail.Ocelot"));
return; return;
default: default:
@ -258,7 +258,7 @@ public class Taming {
} }
player.setItemInHand(new ItemStack(summonItem, item.getAmount() - summonAmount)); player.setItemInHand(new ItemStack(summonItem, item.getAmount() - summonAmount));
player.sendMessage(mcLocale.getString("m.TamingSummon")); player.sendMessage(mcLocale.getString("Taming.Summon.Complete"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(summonItem.getId())); player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(summonItem.getId()));

View File

@ -54,7 +54,7 @@ public class WoodCutting {
*/ */
private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, PlayerProfile PP) { private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, PlayerProfile PP) {
if (toBeFelled.size() >= LoadProperties.treeFellerThreshold) { if (toBeFelled.size() >= LoadProperties.treeFellerThreshold) {
player.sendMessage(mcLocale.getString("Skills.Woodcutting.TreeFellerThreshold")); player.sendMessage(mcLocale.getString("Woodcutting.Skills.TreeFellerThreshold"));
return; return;
} }
@ -67,7 +67,7 @@ public class WoodCutting {
/* This is to prevent using wood axes everytime you tree fell */ /* This is to prevent using wood axes everytime you tree fell */
if ((inHand.getDurability() + durabilityLoss >= inHand.getType().getMaxDurability()) || inHand.getType().equals(Material.AIR)) { if ((inHand.getDurability() + durabilityLoss >= inHand.getType().getMaxDurability()) || inHand.getType().equals(Material.AIR)) {
player.sendMessage(mcLocale.getString("TreeFeller.AxeSplinters")); player.sendMessage(mcLocale.getString("Woodcutting.Skills.TreeFeller.Splinter"));
int health = player.getHealth(); int health = player.getHealth();

View File

@ -128,9 +128,9 @@ Herbalism.Ability.8=Double Drops (All Herbs)
Herbalism.Ability.9=Double the normal loot Herbalism.Ability.9=Double the normal loot
Herbalism.Ability.DoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}% Herbalism.Ability.DoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}%
Herbalism.Ability.FD=[[RED]]Farmers Diet: [[YELLOW]]Rank {0} Herbalism.Ability.FD=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
Herbalism.Ability.GTe.Length=[[RED]]Green Terra Length: [[YELLOW]]{0}s
Herbalism.Ability.GTh.Chance=[[RED]]Green Thumb Chance: [[YELLOW]]{0}% Herbalism.Ability.GTh.Chance=[[RED]]Green Thumb Chance: [[YELLOW]]{0}%
Herbalism.Ability.GTh.Fail=[[RED]]**GREEN THUMB FAIL** Herbalism.Ability.GTh.Fail=[[RED]]**GREEN THUMB FAIL**
Herbalism.Ability.GTh.Length=[[RED]]Green Terra Length: [[YELLOW]]{0}s
Herbalism.Ability.GTh.Stage=[[RED]]Green Thumb Stage: [[YELLOW]] Wheat grows in stage {0} Herbalism.Ability.GTh.Stage=[[RED]]Green Thumb Stage: [[YELLOW]] Wheat grows in stage {0}
Herbalism.Ability.GTh=[[GREEN]]**GREEN THUMB** Herbalism.Ability.GTh=[[GREEN]]**GREEN THUMB**
Herbalism.Ability.Lower=[[GRAY]]**YOU LOWER YOUR HOE** Herbalism.Ability.Lower=[[GRAY]]**YOU LOWER YOUR HOE**

View File

@ -31,113 +31,86 @@ commands:
addxp: addxp:
aliases: [] aliases: []
description: Add XP to a user description: Add XP to a user
permission: mcmmo.tools.mmoedit
addlevels: addlevels:
aliases: [] aliases: []
description: Add levels to a user description: Add levels to a user
permission: mcmmo.tools.mmoedit
mcability: mcability:
aliases: [] aliases: []
description: Toggle whether or not abilities get readied on right click description: Toggle whether or not abilities get readied on right click
permission: mcmmo.commands.ability
mcrefresh: mcrefresh:
aliases: [] aliases: []
description: Refresh all cooldowns for mcMMO description: Refresh all cooldowns for mcMMO
permission: mcmmo.tools.mcrefresh
mcgod: mcgod:
aliases: [] aliases: []
description: Make yourself invulnerable description: Make yourself invulnerable
permission: mcmmo.tools.mcgod
mcstats: mcstats:
aliases: [] aliases: []
description: Shows your mcMMO stats and xp description: Shows your mcMMO stats and xp
mcremove: mcremove:
aliases: [] aliases: []
description: Remove a user from the database description: Remove a user from the database
permission: mcmmo.tools.mcremove
mmoedit: mmoedit:
aliases: [] aliases: []
description: Edit the skill values for a user description: Edit the skill values for a user
permission: mcmmo.tools.mmoedit
ptp: ptp:
aliases: [] aliases: []
description: Teleport to a party member description: Teleport to a party member
permission: mcmmo.commands.ptp
party: party:
aliases: [] aliases: []
description: Create/join a party description: Create/join a party
permission: mcmmo.commands.party
inspect: inspect:
aliases: [] aliases: []
description: View mcMMO stats of another player
invite: invite:
aliases: [] aliases: []
description: Invite a player into your party description: Invite a player into your party
permission: mcmmo.chat.partychat
accept: accept:
aliases: [] aliases: []
description: Accept a party invite description: Accept a party invite
permission: mcmmo.chat.partychat
mmoupdate: mmoupdate:
aliases: [] aliases: []
description: Convert from Flat File to MySQL description: Convert from Flat File to MySQL
permission: mcmmo.admin
p: p:
aliases: [pc] aliases: [pc]
description: Toggle Party chat or send party chat messages description: Toggle Party chat or send party chat messages
permission: mcmmo.chat.partychat
excavation: excavation:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.excavation
herbalism: herbalism:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.herbalism
mining: mining:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.mining
woodcutting: woodcutting:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.woodcutting
axes: axes:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.axes
archery: archery:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.archery
swords: swords:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.swords
taming: taming:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.taming
unarmed: unarmed:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.unarmed
acrobatics: acrobatics:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.acrobatics
repair: repair:
aliases: [] aliases: [mcrepair]
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.repair
fishing: fishing:
aliases: [] aliases: []
description: Detailed skill info description: Detailed skill info
permission: mcmmo.skills.fishing
a: a:
aliases: [ac] aliases: [ac]
description: Toggle Admin chat or send admin chat messages description: Toggle Admin chat or send admin chat messages
permission: mcmmo.chat.adminchat
permissions: permissions:
mcmmo.*: mcmmo.*:
description: Implies all mcmmo permissions. description: Implies all mcmmo permissions.
@ -165,7 +138,7 @@ permissions:
mcmmo.admin: true mcmmo.admin: true
mcmmo.tools.*: true mcmmo.tools.*: true
mcmmo.admin: mcmmo.admin:
description: All ows access to mmoupdate and other sensitive commands description: Allows access to mmoupdate and other sensitive commands
mcmmo.bypass.arcanebypass: mcmmo.bypass.arcanebypass:
description: Allows user to bypass Arcane Repair so he will never lose enchantments description: Allows user to bypass Arcane Repair so he will never lose enchantments
mcmmo.tools.*: mcmmo.tools.*: