More updates. ALMOST DONE.

This commit is contained in:
GJ 2012-04-22 20:00:31 -04:00
parent c18b3e9114
commit 3c748bca39
5 changed files with 56 additions and 55 deletions

View File

@ -65,9 +65,14 @@ public class ACommand implements CommandExecutor {
Player player = (Player) sender;
PP = Users.getProfile(player);
PP.toggleAdminChat();
player.chat(message);
PP.toggleAdminChat();
if (PP.getAdminChatMode()) {
player.chat(message);
}
else {
PP.toggleAdminChat();
player.chat(message);
PP.toggleAdminChat();
}
}
else {
McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent("Console", message);

View File

@ -23,7 +23,6 @@ public class AcceptCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (CommandHelper.noConsoleUsage(sender)) {
return true;
}

View File

@ -71,9 +71,14 @@ public class PCommand implements CommandExecutor {
message = message + " " + args [i];
}
PP.togglePartyChat();
player.chat(message);
PP.togglePartyChat();
if (PP.getPartyChatMode()) {
player.chat(message);
}
else {
PP.togglePartyChat();
player.chat(message);
PP.togglePartyChat();
}
}
else {
if (args.length < 2) {

View File

@ -14,48 +14,48 @@ import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.util.Page;
public class AcrobaticsCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player))
{
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale.
return true;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (CommandHelper.noConsoleUsage(sender)) {
return true;
}
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.acrobatics")) {
return true;
}
Player player = (Player) sender;
PlayerProfile PP = Users.getProfile(player);
String dodgepercentage;
float skillvalue = (float) PP.getSkillLevel(SkillType.ACROBATICS);
String percentage = String.valueOf((skillvalue / 1000) * 100);
String gracepercentage = String.valueOf(((skillvalue / 1000) * 100) * 2);
if (PP.getSkillLevel(SkillType.ACROBATICS) <= 800) {
dodgepercentage = String.valueOf((skillvalue / 4000 * 100));
}
else {
dodgepercentage = "20";
}
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAcrobatics") }));
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAcrobatics") }));
if (mcPermissions.getInstance().acrobatics(player))
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS) }));
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics1_0"), mcLocale.getString("m.EffectsAcrobatics1_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics2_0"), mcLocale.getString("m.EffectsAcrobatics2_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics3_0"), mcLocale.getString("m.EffectsAcrobatics3_1") }));
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
player.sendMessage(mcLocale.getString("m.AcrobaticsRollChance", new Object[] { percentage }));
player.sendMessage(mcLocale.getString("m.AcrobaticsGracefulRollChance", new Object[] { gracepercentage }));
player.sendMessage(mcLocale.getString("m.AcrobaticsDodgeChance", new Object[] { dodgepercentage }));
Player player = (Player) sender;
PlayerProfile PP = Users.getProfile(player);
String dodgepercentage;
float skillvalue = (float) PP.getSkillLevel(SkillType.ACROBATICS);
String percentage = String.valueOf((skillvalue / 1000) * 100);
String gracepercentage = String.valueOf(((skillvalue / 1000) * 100) * 2);
if (PP.getSkillLevel(SkillType.ACROBATICS) <= 800)
dodgepercentage = String.valueOf((skillvalue / 4000 * 100));
else
dodgepercentage = "20";
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAcrobatics") }));
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAcrobatics") }));
if (mcPermissions.getInstance().acrobatics(player))
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS) }));
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics1_0"), mcLocale.getString("m.EffectsAcrobatics1_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics2_0"), mcLocale.getString("m.EffectsAcrobatics2_1") }));
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics3_0"), mcLocale.getString("m.EffectsAcrobatics3_1") }));
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
player.sendMessage(mcLocale.getString("m.AcrobaticsRollChance", new Object[] { percentage }));
player.sendMessage(mcLocale.getString("m.AcrobaticsGracefulRollChance", new Object[] { gracepercentage }));
player.sendMessage(mcLocale.getString("m.AcrobaticsDodgeChance", new Object[] { dodgepercentage }));
Page.grabGuidePageForSkill(SkillType.ACROBATICS, player, args);
return true;
}
Page.grabGuidePageForSkill(SkillType.ACROBATICS, player, args);
return true;
}
}

View File

@ -35,7 +35,7 @@ public class PlayerProfile {
private boolean loaded = false;
private boolean partyhud = true, spoutcraft = false, xpbarlocked = false;
private boolean placedAnvil = false;
private boolean partyChatMode = false, partyChatOnly = false, adminChatMode = false;
private boolean partyChatMode = false, adminChatMode = false;
private boolean godMode = false;
private boolean greenTerraMode, treeFellerMode, superBreakerMode, gigaDrillBreakerMode, serratedStrikesMode, skullSplitterMode, berserkMode;
private boolean greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true,
@ -611,14 +611,6 @@ public class PlayerProfile {
partyChatMode = !partyChatMode;
}
public boolean getPartyChatOnlyToggle() {
return partyChatOnly;
}
public void togglePartyChatOnly() {
partyChatOnly = !partyChatOnly;
}
/*
* Bleed Stuff
*/