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,10 +65,15 @@ public class ACommand implements CommandExecutor {
Player player = (Player) sender; Player player = (Player) sender;
PP = Users.getProfile(player); PP = Users.getProfile(player);
if (PP.getAdminChatMode()) {
player.chat(message);
}
else {
PP.toggleAdminChat(); PP.toggleAdminChat();
player.chat(message); player.chat(message);
PP.toggleAdminChat(); PP.toggleAdminChat();
} }
}
else { else {
McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent("Console", message); McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent("Console", message);
plugin.getServer().getPluginManager().callEvent(chatEvent); plugin.getServer().getPluginManager().callEvent(chatEvent);

View File

@ -23,7 +23,6 @@ public class AcceptCommand 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 (CommandHelper.noConsoleUsage(sender)) { if (CommandHelper.noConsoleUsage(sender)) {
return true; return true;
} }

View File

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

View File

@ -16,9 +16,7 @@ import com.gmail.nossr50.util.Page;
public class AcrobaticsCommand implements CommandExecutor { public class AcrobaticsCommand 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;
} }
@ -34,10 +32,12 @@ public class AcrobaticsCommand implements CommandExecutor {
String percentage = String.valueOf((skillvalue / 1000) * 100); String percentage = String.valueOf((skillvalue / 1000) * 100);
String gracepercentage = String.valueOf(((skillvalue / 1000) * 100) * 2); String gracepercentage = String.valueOf(((skillvalue / 1000) * 100) * 2);
if (PP.getSkillLevel(SkillType.ACROBATICS) <= 800) if (PP.getSkillLevel(SkillType.ACROBATICS) <= 800) {
dodgepercentage = String.valueOf((skillvalue / 4000 * 100)); dodgepercentage = String.valueOf((skillvalue / 4000 * 100));
else }
else {
dodgepercentage = "20"; dodgepercentage = "20";
}
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAcrobatics") })); player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAcrobatics") }));
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAcrobatics") })); player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAcrobatics") }));

View File

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