mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
More updates. ALMOST DONE.
This commit is contained in:
parent
c18b3e9114
commit
3c748bca39
@ -65,9 +65,14 @@ public class ACommand implements CommandExecutor {
|
|||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
PP = Users.getProfile(player);
|
PP = Users.getProfile(player);
|
||||||
|
|
||||||
PP.toggleAdminChat();
|
if (PP.getAdminChatMode()) {
|
||||||
player.chat(message);
|
player.chat(message);
|
||||||
PP.toggleAdminChat();
|
}
|
||||||
|
else {
|
||||||
|
PP.toggleAdminChat();
|
||||||
|
player.chat(message);
|
||||||
|
PP.toggleAdminChat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent("Console", message);
|
McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent("Console", message);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,14 @@ public class PCommand implements CommandExecutor {
|
|||||||
message = message + " " + args [i];
|
message = message + " " + args [i];
|
||||||
}
|
}
|
||||||
|
|
||||||
PP.togglePartyChat();
|
if (PP.getPartyChatMode()) {
|
||||||
player.chat(message);
|
player.chat(message);
|
||||||
PP.togglePartyChat();
|
}
|
||||||
|
else {
|
||||||
|
PP.togglePartyChat();
|
||||||
|
player.chat(message);
|
||||||
|
PP.togglePartyChat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
|
@ -14,48 +14,48 @@ import com.gmail.nossr50.locale.mcLocale;
|
|||||||
import com.gmail.nossr50.util.Page;
|
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)) {
|
||||||
{
|
return true;
|
||||||
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale.
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.acrobatics")) {
|
if (CommandHelper.noCommandPermissions(sender, "mcmmo.skills.acrobatics")) {
|
||||||
return true;
|
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;
|
Page.grabGuidePageForSkill(SkillType.ACROBATICS, player, args);
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
return true;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user