mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-05 07:04:44 +02:00
Fixed a major problem where the hashmap wasn't initialized on
PlayerProfile creation. However there is still a big bug with abilities instantly wearing off and refreshing.
This commit is contained in:
src/main/java/com/gmail/nossr50
@ -60,7 +60,7 @@ public class Axes {
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SkullSplitterPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.SKULL_SPLIITER, ticks);
|
||||
PP.setSkillDATS(AbilityType.SKULL_SPLIITER, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setSkullSplitterMode(true);
|
||||
}
|
||||
if(!PP.getSkullSplitterMode() && !Skills.cooldownOver(player, (PP.getSkillDATS(AbilityType.SKULL_SPLIITER)*1000), LoadProperties.skullSplitterCooldown)){
|
||||
|
@ -69,7 +69,7 @@ public class Excavation
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.GigaDrillBreakerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.GIGA_DRILL_BREAKER, ticks);
|
||||
PP.setSkillDATS(AbilityType.GIGA_DRILL_BREAKER, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setGigaDrillBreakerMode(true);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class Herbalism
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.GreenTerraPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.GREEN_TERRA, ticks);
|
||||
PP.setSkillDATS(AbilityType.GREEN_TERRA, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setGreenTerraMode(true);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class Mining
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SuperBreakerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.SUPER_BREAKER, ticks);
|
||||
PP.setSkillDATS(AbilityType.SUPER_BREAKER, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setSuperBreakerMode(true);
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class Swords
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SerratedStrikesPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.SERRATED_STRIKES, ticks);
|
||||
PP.setSkillDATS(AbilityType.SERRATED_STRIKES, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setSerratedStrikesMode(true);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@ public class Unarmed {
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.BerserkPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.BERSERK, ticks);
|
||||
PP.setSkillDATS(AbilityType.BERSERK, System.currentTimeMillis()+(ticks*1000));
|
||||
System.out.println("getSkillDATS(): "+PP.getSkillDATS(AbilityType.BERSERK));
|
||||
PP.setBerserkMode(true);
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class WoodCutting
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.TreeFellerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkillATS(AbilityType.TREE_FELLER, ticks);
|
||||
PP.setSkillDATS(AbilityType.TREE_FELLER, System.currentTimeMillis()+(ticks*1000));
|
||||
PP.setTreeFellerMode(true);
|
||||
}
|
||||
if(!PP.getTreeFellerMode() && !Skills.cooldownOver(player, (PP.getSkillDATS(AbilityType.TREE_FELLER)*1000), LoadProperties.treeFellerCooldown)){
|
||||
|
Reference in New Issue
Block a user