mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Tweaked a few things
This commit is contained in:
@ -38,7 +38,7 @@ public class AcrobaticsManager {
|
||||
eventHandler.sendAbilityMessage();
|
||||
eventHandler.processXPGain(eventHandler.damage * Acrobatics.ROLL_XP_MODIFIER);
|
||||
}
|
||||
else if (!eventHandler.isFatal(event.getDamage())){
|
||||
else if (!eventHandler.isFatal(event.getDamage()) && permHandler.canGainXP()){
|
||||
eventHandler.processXPGain(eventHandler.damage * Acrobatics.FALL_XP_MODIFIER);
|
||||
}
|
||||
}
|
||||
@ -59,7 +59,7 @@ public class AcrobaticsManager {
|
||||
eventHandler.modifyEventDamage();
|
||||
eventHandler.sendAbilityMessage();
|
||||
|
||||
if (System.currentTimeMillis() >= profile.getRespawnATS() + 5) {
|
||||
if (System.currentTimeMillis() >= profile.getRespawnATS() + 5 && permHandler.canGainXP()) {
|
||||
eventHandler.processXPGain(eventHandler.damage * Acrobatics.DODGE_XP_MODIFIER);
|
||||
}
|
||||
}
|
||||
|
@ -38,8 +38,6 @@ public class DodgeEventHandler extends AcrobaticsEventHandler{
|
||||
}
|
||||
|
||||
protected void processXPGain(int xp) {
|
||||
if (manager.getPermissionsHandler().canGainXP()) {
|
||||
Skills.xpProcessing(player, manager.getProfile(), SkillType.ACROBATICS, xp);
|
||||
}
|
||||
Skills.xpProcessing(player, manager.getProfile(), SkillType.ACROBATICS, xp);
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,11 @@ import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Skills;
|
||||
|
||||
public class RollEventHandler extends AcrobaticsEventHandler{
|
||||
private AcrobaticsPermissionsHandler permHandler;
|
||||
private boolean isGraceful;
|
||||
private int damageThreshold;
|
||||
|
||||
protected RollEventHandler(AcrobaticsManager manager, EntityDamageEvent event) {
|
||||
super(manager, event);
|
||||
this.permHandler = manager.getPermissionsHandler();
|
||||
|
||||
isGracefulRoll();
|
||||
calculateSkillModifier();
|
||||
@ -63,16 +61,14 @@ public class RollEventHandler extends AcrobaticsEventHandler{
|
||||
|
||||
|
||||
protected void processXPGain(int xpGain) {
|
||||
if (permHandler.canGainXP()) {
|
||||
Skills.xpProcessing(player, manager.getProfile(), SkillType.ACROBATICS, xpGain);
|
||||
}
|
||||
Skills.xpProcessing(player, manager.getProfile(), SkillType.ACROBATICS, xpGain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this is a graceful roll.
|
||||
*/
|
||||
private void isGracefulRoll() {
|
||||
if (permHandler.canGracefulRoll()) {
|
||||
if (manager.getPermissionsHandler().canGracefulRoll()) {
|
||||
this.isGraceful = player.isSneaking();
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user