mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Change how we handle players not being able to pick up items while using
Berserk.
This commit is contained in:
@ -178,6 +178,10 @@ public class Skills {
|
||||
|
||||
if (ability.getPermissions(player)) {
|
||||
if (profile.getAbilityMode(ability) && (profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR) <= curTime) {
|
||||
if (ability == AbilityType.BERSERK) {
|
||||
player.setCanPickupItems(true);
|
||||
}
|
||||
|
||||
profile.setAbilityMode(ability, false);
|
||||
profile.setAbilityInformed(ability, false);
|
||||
player.sendMessage(ability.getAbilityOff());
|
||||
@ -442,6 +446,9 @@ public class Skills {
|
||||
|
||||
profile.setSkillDATS(ability, System.currentTimeMillis() + (ticks * Misc.TIME_CONVERSION_FACTOR));
|
||||
profile.setAbilityMode(ability, true);
|
||||
if (ability == AbilityType.BERSERK) {
|
||||
player.setCanPickupItems(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user