This commit is contained in:
nossr50 2011-04-10 07:56:44 -07:00
parent f058923b73
commit 77680df7a4
7 changed files with 33 additions and 45 deletions

View File

@ -1,5 +1,12 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code# #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 Version 0.9.19
Fixed Anti-Exploit XP stuff not working Fixed Anti-Exploit XP stuff not working

View File

@ -359,18 +359,7 @@ public class mcPlayerListener extends PlayerListener {
player.sendMessage(ChatColor.YELLOW + "Acrobatics Skill: " + ChatColor.GREEN + mcUsers.getProfile(target).getAcrobatics()+ChatColor.DARK_AQUA player.sendMessage(ChatColor.YELLOW + "Acrobatics Skill: " + ChatColor.GREEN + mcUsers.getProfile(target).getAcrobatics()+ChatColor.DARK_AQUA
+ " XP("+mcUsers.getProfile(target).getAcrobaticsGather() + " XP("+mcUsers.getProfile(target).getAcrobaticsGather()
+"/"+mcUsers.getProfile(target).getXpToLevel("acrobatics")+")"); +"/"+mcUsers.getProfile(target).getXpToLevel("acrobatics")+")");
player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+ player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+(mcUsers.getProfile(target).getPowerLevel()));
(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.GREEN+"~~COORDINATES~~"); player.sendMessage(ChatColor.GREEN+"~~COORDINATES~~");
player.sendMessage("X: "+x); player.sendMessage("X: "+x);
player.sendMessage("Y: "+y); 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 player.sendMessage(ChatColor.YELLOW + "Acrobatics Skill: " + ChatColor.GREEN + mcUsers.getProfile(player).getAcrobatics()+ChatColor.DARK_AQUA
+ " XP("+mcUsers.getProfile(player).getAcrobaticsGather() + " XP("+mcUsers.getProfile(player).getAcrobaticsGather()
+"/"+mcUsers.getProfile(player).getXpToLevel("acrobatics")+")"); +"/"+mcUsers.getProfile(player).getXpToLevel("acrobatics")+")");
player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+ player.sendMessage(ChatColor.DARK_RED+"POWER LEVEL: "+ChatColor.GREEN+(mcUsers.getProfile(player).getPowerLevel()));
(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())
);
} }
//Invite Command //Invite Command
if(mcPermissions.getInstance().party(player) && split[0].equalsIgnoreCase("/"+mcLoadProperties.invite)){ if(mcPermissions.getInstance().party(player) && split[0].equalsIgnoreCase("/"+mcLoadProperties.invite)){
@ -572,8 +550,11 @@ public class mcPlayerListener extends PlayerListener {
player.teleportTo(mySpawn); 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. //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("mcMMO DEBUG CODE 4");
player.sendMessage("Inventory cleared & health restored"); if(mcLoadProperties.myspawnclearsinventory)
}else{ 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"); player.sendMessage(ChatColor.RED+"Configure your myspawn first with /setmyspawn");
} }
} }

View File

@ -222,7 +222,7 @@ public class mcSkills {
if(PP.getAxesInt() >= 750) if(PP.getAxesInt() >= 750)
ticks++; ticks++;
if(!PP.getSkullSplitterMode() && PP.getSkullSplitterCooldown() == 0){ if(!PP.getSkullSplitterMode() && cooldownOver(player, PP.getSkullSplitterDeactivatedTimeStamp(), mcLoadProperties.skullSplitterCooldown)){
player.sendMessage(ChatColor.GREEN+"**SKULL SPLITTER ACTIVATED**"); player.sendMessage(ChatColor.GREEN+"**SKULL SPLITTER ACTIVATED**");
PP.setSkullSplitterTicks(ticks * 1000); PP.setSkullSplitterTicks(ticks * 1000);
PP.setSkullSplitterActivatedTimeStamp(System.currentTimeMillis()); PP.setSkullSplitterActivatedTimeStamp(System.currentTimeMillis());
@ -259,7 +259,7 @@ public class mcSkills {
} }
if(PP.getShovelPreparationMode() && System.currentTimeMillis() - PP.getShovelPreparationATS() >= 4000){ if(PP.getShovelPreparationMode() && System.currentTimeMillis() - PP.getShovelPreparationATS() >= 4000){
PP.setShovelPreparationMode(false); PP.setShovelPreparationMode(false);
player.sendMessage(ChatColor.GRAY+"**YOU LOWER YOUR AXE**"); player.sendMessage(ChatColor.GRAY+"**YOU LOWER YOUR SHOVEL**");
} }
/* /*
* AXES ABILITY * AXES ABILITY

View File

@ -42,22 +42,22 @@ public class mcTimer extends TimerTask{
if(thecount == 10 || thecount == 20 || thecount == 30 || thecount == 40){ if(thecount == 10 || thecount == 20 || thecount == 30 || thecount == 40){
if(player != null && if(player != null &&
player.getHealth() > 0 && player.getHealth() < 20 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)); player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1));
} }
} }
if(thecount == 20 || thecount == 40){ if(thecount == 20 || thecount == 40){
if(player != null && if(player != null &&
player.getHealth() > 0 && player.getHealth() < 20 player.getHealth() > 0 && player.getHealth() < 20
&& mcUsers.getProfile(player).getPowerLevel(player) >= 500 && mcUsers.getProfile(player).getPowerLevel() >= 500
&& mcUsers.getProfile(player).getPowerLevel(player) < 1000){ && mcUsers.getProfile(player).getPowerLevel() < 1000){
player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1)); player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1));
} }
} }
if(thecount == 40){ if(thecount == 40){
if(player != null && if(player != null &&
player.getHealth() > 0 && player.getHealth() < 20 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)); player.setHealth(mcm.getInstance().calculateHealth(player.getHealth(), 1));
} }
} }

View File

@ -1553,27 +1553,27 @@ class PlayerList
return 0; return 0;
} }
} }
public int getPowerLevel(Player player){ public int getPowerLevel(){
int x = 0; int x = 0;
if(mcPermissions.getInstance().mining(player)) if(mcPermissions.getInstance().mining(thisplayer))
x+=getMiningInt(); x+=getMiningInt();
if(mcPermissions.getInstance().woodcutting(player)) if(mcPermissions.getInstance().woodcutting(thisplayer))
x+=getWoodCuttingInt(); x+=getWoodCuttingInt();
if(mcPermissions.getInstance().unarmed(player)) if(mcPermissions.getInstance().unarmed(thisplayer))
x+=getUnarmedInt(); x+=getUnarmedInt();
if(mcPermissions.getInstance().herbalism(player)) if(mcPermissions.getInstance().herbalism(thisplayer))
x+=getHerbalismInt(); x+=getHerbalismInt();
if(mcPermissions.getInstance().excavation(player)) if(mcPermissions.getInstance().excavation(thisplayer))
x+=getExcavationInt(); x+=getExcavationInt();
if(mcPermissions.getInstance().archery(player)) if(mcPermissions.getInstance().archery(thisplayer))
x+=getArcheryInt(); x+=getArcheryInt();
if(mcPermissions.getInstance().swords(player)) if(mcPermissions.getInstance().swords(thisplayer))
x+=getSwordsInt(); x+=getSwordsInt();
if(mcPermissions.getInstance().axes(player)) if(mcPermissions.getInstance().axes(thisplayer))
x+=getAxesInt(); x+=getAxesInt();
if(mcPermissions.getInstance().acrobatics(player)) if(mcPermissions.getInstance().acrobatics(thisplayer))
x+=getAcrobaticsInt(); x+=getAcrobaticsInt();
if(mcPermissions.getInstance().repair(player)) if(mcPermissions.getInstance().repair(thisplayer))
x+=getRepairInt(); x+=getRepairInt();
return x; return x;
} }

View File

@ -67,7 +67,7 @@ public class mcWoodCutting {
if(PP.getWoodCuttingInt() >= 750) if(PP.getWoodCuttingInt() >= 750)
ticks++; 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**"); player.sendMessage(ChatColor.GREEN+"**TREE FELLING ACTIVATED**");
PP.setTreeFellerTicks(ticks * 1000); PP.setTreeFellerTicks(ticks * 1000);
PP.setTreeFellerActivatedTimeStamp(System.currentTimeMillis()); PP.setTreeFellerActivatedTimeStamp(System.currentTimeMillis());

View File

@ -1,3 +1,3 @@
name: mcMMO name: mcMMO
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO
version: 0.9.19 version: 0.9.20