mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
All changes up to 0.8.11 - Memory leak fixed!
This commit is contained in:
parent
2ed3d65ed1
commit
ffd71c42a7
@ -36,6 +36,9 @@ public class mcCombat {
|
||||
return;
|
||||
}
|
||||
Player defender = (Player)x;
|
||||
//This may help compatability with NPC mods
|
||||
if(mcUsers.getProfile(defender) == null)
|
||||
mcUsers.addUser(defender);
|
||||
if(mcUsers.getProfile(attacker).inParty() && mcUsers.getProfile(defender).inParty()){
|
||||
if(mcParty.getInstance().inSameParty(defender, attacker)){
|
||||
event.setCancelled(true);
|
||||
@ -833,10 +836,10 @@ public class mcCombat {
|
||||
}
|
||||
}
|
||||
public void parryCheck(Player defender, EntityDamageByEntityEvent event, Entity y){
|
||||
if(mcm.getInstance().isSwords(defender.getItemInHand())
|
||||
if(defender != null && mcm.getInstance().isSwords(defender.getItemInHand())
|
||||
&& event.getDamage() > 0
|
||||
&& mcPermissions.getInstance().swords(defender)){
|
||||
if(mcUsers.getProfile(defender).getSwordsInt() >= 50 && mcUsers.getProfile(defender).getSwordsInt() < 250){
|
||||
if(defender != null && mcUsers.getProfile(defender).getSwordsInt() >= 50 && mcUsers.getProfile(defender).getSwordsInt() < 250){
|
||||
if(Math.random() * 100 > 95){
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(ChatColor.YELLOW+"*CLANG* SUCCESSFUL PARRY *CLANG*");
|
||||
@ -848,7 +851,7 @@ public class mcCombat {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(mcUsers.getProfile(defender).getSwordsInt() >= 250 && mcUsers.getProfile(defender).getSwordsInt() < 450){
|
||||
if(defender != null && mcUsers.getProfile(defender).getSwordsInt() >= 250 && mcUsers.getProfile(defender).getSwordsInt() < 450){
|
||||
if(Math.random() * 100 > 90){
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(ChatColor.YELLOW+"*CLANG* SUCCESSFUL PARRY *CLANG*");
|
||||
@ -860,7 +863,7 @@ public class mcCombat {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(mcUsers.getProfile(defender).getSwordsInt() >= 450 && mcUsers.getProfile(defender).getSwordsInt() < 775){
|
||||
if(defender != null && mcUsers.getProfile(defender).getSwordsInt() >= 450 && mcUsers.getProfile(defender).getSwordsInt() < 775){
|
||||
if(Math.random() * 100 > 85){
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(ChatColor.YELLOW+"*CLANG* SUCCESSFUL PARRY *CLANG*");
|
||||
@ -872,7 +875,7 @@ public class mcCombat {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(mcUsers.getProfile(defender).getSwordsInt() >= 775){
|
||||
if(defender != null && mcUsers.getProfile(defender).getSwordsInt() >= 775){
|
||||
if(Math.random() * 100 > 80){
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(ChatColor.YELLOW+"*CLANG* SUCCESSFUL PARRY *CLANG*");
|
||||
|
@ -57,6 +57,6 @@ public class mcTimer extends TimerTask{
|
||||
} else {
|
||||
thecount = 1;
|
||||
}
|
||||
//mcCombat.getInstance().bleedSimulate();
|
||||
mcCombat.getInstance().bleedSimulate();
|
||||
}
|
||||
}
|
||||
|
@ -321,6 +321,7 @@ public class mcm {
|
||||
if(split[0].equalsIgnoreCase("/"+mcLoadProperties.mcc)){
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED+"---[]"+ChatColor.YELLOW+"mcMMO Commands"+ChatColor.RED+"[]---");
|
||||
player.sendMessage("/"+mcLoadProperties.stats+ChatColor.RED+" - View your mcMMO stats");
|
||||
if(mcPermissions.getInstance().party(player)){
|
||||
player.sendMessage(ChatColor.GREEN+"--PARTY COMMANDS--");
|
||||
player.sendMessage("/"+mcLoadProperties.party+" [party name] "+ChatColor.RED+"- Create/Join designated party");
|
||||
@ -346,7 +347,7 @@ public class mcm {
|
||||
if(mcPermissions.getInstance().whois(player))
|
||||
player.sendMessage("/"+mcLoadProperties.whois+" [playername] "+ChatColor.RED+"- View detailed player info");
|
||||
if(mcPermissions.getInstance().mmoedit(player)){
|
||||
player.sendMessage("/"+mcLoadProperties.mmoedit+" [skill] [newvalue] "+ChatColor.RED+"Modify the designated skill value");
|
||||
//player.sendMessage("/"+mcLoadProperties.mmoedit+" [skill] [newvalue] "+ChatColor.RED+"Modify the designated skill value");
|
||||
player.sendMessage("/"+mcLoadProperties.mmoedit+" [playername] [skill] [newvalue] "+ChatColor.RED+"- Modify target");
|
||||
}
|
||||
if(mcPermissions.getInstance().mcgod(player))
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: mcMMO
|
||||
main: com.gmail.nossr50.mcMMO
|
||||
version: 0.8.11 WIP B16
|
||||
version: 0.8.11
|
Loading…
Reference in New Issue
Block a user