diff --git a/mcMMO/Changelog.txt b/mcMMO/Changelog.txt index 69799a966..0e361677d 100644 --- a/mcMMO/Changelog.txt +++ b/mcMMO/Changelog.txt @@ -1,5 +1,12 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code# +Version 0.9.20 +Fixed Tree Feller not checking if their cooldown was refreshed and always activating +/stats and /whois will now show the powerlevel based on permissions +Shovels will no longer say you've lowered your axe +/myspawn will no longer say your inventory has been cleared if the server settings disable this feature + + Version 0.9.19 Fixed Anti-Exploit XP stuff not working diff --git a/mcMMO/com/gmail/nossr50/mcPlayerListener.java b/mcMMO/com/gmail/nossr50/mcPlayerListener.java index 45374966a..c9a0ee993 100644 --- a/mcMMO/com/gmail/nossr50/mcPlayerListener.java +++ b/mcMMO/com/gmail/nossr50/mcPlayerListener.java @@ -359,18 +359,7 @@ public class mcPlayerListener extends PlayerListener { player.sendMessage(ChatColor.YELLOW + "Acrobatics Skill: " + ChatColor.GREEN + mcUsers.getProfile(target).getAcrobatics()+ChatColor.DARK_AQUA + " XP("+mcUsers.getProfile(target).getAcrobaticsGather() +"/"+mcUsers.getProfile(target).getXpToLevel("acrobatics")+")"); - player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+ - (mcUsers.getProfile(target).getAcrobaticsInt()+ - mcUsers.getProfile(target).getArcheryInt()+ - mcUsers.getProfile(target).getAxesInt()+ - mcUsers.getProfile(target).getExcavationInt()+ - mcUsers.getProfile(target).getHerbalismInt()+ - mcUsers.getProfile(target).getMiningInt()+ - mcUsers.getProfile(target).getRepairInt()+ - mcUsers.getProfile(target).getSwordsInt()+ - mcUsers.getProfile(target).getUnarmedInt()+ - mcUsers.getProfile(target).getWoodCuttingInt()) - ); + player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+(mcUsers.getProfile(target).getPowerLevel())); player.sendMessage(ChatColor.GREEN+"~~COORDINATES~~"); player.sendMessage("X: "+x); player.sendMessage("Y: "+y); @@ -425,18 +414,7 @@ public class mcPlayerListener extends PlayerListener { player.sendMessage(ChatColor.YELLOW + "Acrobatics Skill: " + ChatColor.GREEN + mcUsers.getProfile(player).getAcrobatics()+ChatColor.DARK_AQUA + " XP("+mcUsers.getProfile(player).getAcrobaticsGather() +"/"+mcUsers.getProfile(player).getXpToLevel("acrobatics")+")"); - player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+ - (mcUsers.getProfile(player).getAcrobaticsInt()+ - mcUsers.getProfile(player).getArcheryInt()+ - mcUsers.getProfile(player).getAxesInt()+ - mcUsers.getProfile(player).getExcavationInt()+ - mcUsers.getProfile(player).getHerbalismInt()+ - mcUsers.getProfile(player).getMiningInt()+ - mcUsers.getProfile(player).getRepairInt()+ - mcUsers.getProfile(player).getSwordsInt()+ - mcUsers.getProfile(player).getUnarmedInt()+ - mcUsers.getProfile(player).getWoodCuttingInt()) - ); + player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+(mcUsers.getProfile(player).getPowerLevel())); } //Invite Command if(mcPermissions.getInstance().party(player) && split[0].equalsIgnoreCase("/"+mcLoadProperties.invite)){ @@ -572,8 +550,11 @@ public class mcPlayerListener extends PlayerListener { player.teleportTo(mySpawn); //Two lines of teleporting to prevent a bug when players try teleporting from one world to another bringing them to that worlds spawn at first. //player.sendMessage("mcMMO DEBUG CODE 4"); - player.sendMessage("Inventory cleared & health restored"); - }else{ + if(mcLoadProperties.myspawnclearsinventory) + player.sendMessage("Traveled to your MySpawn, Inventory cleared & health restored"); + else + player.sendMessage("Traveled to your MySpawn, Health has been restored."); + } else { player.sendMessage(ChatColor.RED+"Configure your myspawn first with /setmyspawn"); } } diff --git a/mcMMO/com/gmail/nossr50/mcSkills.java b/mcMMO/com/gmail/nossr50/mcSkills.java index a227f49ce..c46a89782 100644 --- a/mcMMO/com/gmail/nossr50/mcSkills.java +++ b/mcMMO/com/gmail/nossr50/mcSkills.java @@ -222,7 +222,7 @@ public class mcSkills { if(PP.getAxesInt() >= 750) ticks++; - if(!PP.getSkullSplitterMode() && PP.getSkullSplitterCooldown() == 0){ + if(!PP.getSkullSplitterMode() && cooldownOver(player, PP.getSkullSplitterDeactivatedTimeStamp(), mcLoadProperties.skullSplitterCooldown)){ player.sendMessage(ChatColor.GREEN+"**SKULL SPLITTER ACTIVATED**"); PP.setSkullSplitterTicks(ticks * 1000); PP.setSkullSplitterActivatedTimeStamp(System.currentTimeMillis()); @@ -259,7 +259,7 @@ public class mcSkills { } if(PP.getShovelPreparationMode() && System.currentTimeMillis() - PP.getShovelPreparationATS() >= 4000){ PP.setShovelPreparationMode(false); - player.sendMessage(ChatColor.GRAY+"**YOU LOWER YOUR AXE**"); + player.sendMessage(ChatColor.GRAY+"**YOU LOWER YOUR SHOVEL**"); } /* * AXES ABILITY diff --git a/mcMMO/com/gmail/nossr50/mcTimer.java b/mcMMO/com/gmail/nossr50/mcTimer.java index bcd76d3e5..c4318e304 100644 --- a/mcMMO/com/gmail/nossr50/mcTimer.java +++ b/mcMMO/com/gmail/nossr50/mcTimer.java @@ -42,22 +42,22 @@ public class mcTimer extends TimerTask{ if(thecount == 10 || thecount == 20 || thecount == 30 || thecount == 40){ if(player != null && player.getHealth() > 0 && player.getHealth() < 20 - && mcUsers.getProfile(player).getPowerLevel(player) >= 1000){ + && mcUsers.getProfile(player).getPowerLevel() >= 1000){ player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1)); } } if(thecount == 20 || thecount == 40){ if(player != null && player.getHealth() > 0 && player.getHealth() < 20 - && mcUsers.getProfile(player).getPowerLevel(player) >= 500 - && mcUsers.getProfile(player).getPowerLevel(player) < 1000){ + && mcUsers.getProfile(player).getPowerLevel() >= 500 + && mcUsers.getProfile(player).getPowerLevel() < 1000){ player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1)); } } if(thecount == 40){ if(player != null && player.getHealth() > 0 && player.getHealth() < 20 - && mcUsers.getProfile(player).getPowerLevel(player) < 500){ + && mcUsers.getProfile(player).getPowerLevel() < 500){ player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1)); } } diff --git a/mcMMO/com/gmail/nossr50/mcUsers.java b/mcMMO/com/gmail/nossr50/mcUsers.java index cb3c22068..576f8b0e7 100644 --- a/mcMMO/com/gmail/nossr50/mcUsers.java +++ b/mcMMO/com/gmail/nossr50/mcUsers.java @@ -1553,27 +1553,27 @@ class PlayerList return 0; } } - public int getPowerLevel(Player player){ + public int getPowerLevel(){ int x = 0; - if(mcPermissions.getInstance().mining(player)) + if(mcPermissions.getInstance().mining(thisplayer)) x+=getMiningInt(); - if(mcPermissions.getInstance().woodcutting(player)) + if(mcPermissions.getInstance().woodcutting(thisplayer)) x+=getWoodCuttingInt(); - if(mcPermissions.getInstance().unarmed(player)) + if(mcPermissions.getInstance().unarmed(thisplayer)) x+=getUnarmedInt(); - if(mcPermissions.getInstance().herbalism(player)) + if(mcPermissions.getInstance().herbalism(thisplayer)) x+=getHerbalismInt(); - if(mcPermissions.getInstance().excavation(player)) + if(mcPermissions.getInstance().excavation(thisplayer)) x+=getExcavationInt(); - if(mcPermissions.getInstance().archery(player)) + if(mcPermissions.getInstance().archery(thisplayer)) x+=getArcheryInt(); - if(mcPermissions.getInstance().swords(player)) + if(mcPermissions.getInstance().swords(thisplayer)) x+=getSwordsInt(); - if(mcPermissions.getInstance().axes(player)) + if(mcPermissions.getInstance().axes(thisplayer)) x+=getAxesInt(); - if(mcPermissions.getInstance().acrobatics(player)) + if(mcPermissions.getInstance().acrobatics(thisplayer)) x+=getAcrobaticsInt(); - if(mcPermissions.getInstance().repair(player)) + if(mcPermissions.getInstance().repair(thisplayer)) x+=getRepairInt(); return x; } diff --git a/mcMMO/com/gmail/nossr50/mcWoodCutting.java b/mcMMO/com/gmail/nossr50/mcWoodCutting.java index 33e122141..f6b37fe78 100644 --- a/mcMMO/com/gmail/nossr50/mcWoodCutting.java +++ b/mcMMO/com/gmail/nossr50/mcWoodCutting.java @@ -67,7 +67,7 @@ public class mcWoodCutting { if(PP.getWoodCuttingInt() >= 750) ticks++; - if(!PP.getTreeFellerMode() && PP.getTreeFellerCooldown() == 0){ + if(!PP.getTreeFellerMode() && mcSkills.getInstance().cooldownOver(player, PP.getTreeFellerDeactivatedTimeStamp(), mcLoadProperties.treeFellerCooldown)){ player.sendMessage(ChatColor.GREEN+"**TREE FELLING ACTIVATED**"); PP.setTreeFellerTicks(ticks * 1000); PP.setTreeFellerActivatedTimeStamp(System.currentTimeMillis()); diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index d08c6df2a..d224feb4b 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 0.9.19 \ No newline at end of file +version: 0.9.20 \ No newline at end of file