mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +01:00
Functions >> copy-paste code.
This commit is contained in:
parent
1055186e86
commit
00e1521d46
@ -192,11 +192,7 @@ public class Skills {
|
|||||||
profile.setAbilityInformed(ability, false);
|
profile.setAbilityInformed(ability, false);
|
||||||
player.sendMessage(ability.getAbilityOff());
|
player.sendMessage(ability.getAbilityOff());
|
||||||
|
|
||||||
for (Player nearbyPlayer : player.getWorld().getPlayers()) {
|
Misc.sendSkillMessage(player, ability.getAbilityPlayerOff(player));
|
||||||
if (nearbyPlayer != player && Misc.isNear(player.getLocation(), nearbyPlayer.getLocation(), MAX_DISTANCE_AWAY)) {
|
|
||||||
nearbyPlayer.sendMessage(ability.getAbilityPlayerOff(player));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,11 +455,7 @@ public class Skills {
|
|||||||
if (!profile.getAbilityMode(ability) && cooldownOver(profile.getSkillDATS(ability), ability.getCooldown(), player)) {
|
if (!profile.getAbilityMode(ability) && cooldownOver(profile.getSkillDATS(ability), ability.getCooldown(), player)) {
|
||||||
player.sendMessage(ability.getAbilityOn());
|
player.sendMessage(ability.getAbilityOn());
|
||||||
|
|
||||||
for (Player y : player.getWorld().getPlayers()) {
|
Misc.sendSkillMessage(player, ability.getAbilityPlayer(player));
|
||||||
if (y != player && Misc.isNear(player.getLocation(), y.getLocation(), MAX_DISTANCE_AWAY)) {
|
|
||||||
y.sendMessage(ability.getAbilityPlayer(player));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
profile.setSkillDATS(ability, System.currentTimeMillis() + (ticks * TIME_CONVERSION_FACTOR));
|
profile.setSkillDATS(ability, System.currentTimeMillis() + (ticks * TIME_CONVERSION_FACTOR));
|
||||||
profile.setAbilityMode(ability, true);
|
profile.setAbilityMode(ability, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user