command tweaks for xbow

This commit is contained in:
nossr50
2020-07-29 10:42:38 -07:00
parent 93eba8da2b
commit 2c64eadafa
3 changed files with 9 additions and 8 deletions

View File

@ -34,7 +34,7 @@ public class CrossbowsCommand extends SkillCommand {
if(canUseSubskill(player, SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) {
String additionalArrowCount = String.valueOf(crossbowManager.getSuperShotgunAdditionalArrowCount());
messages.add(getStatMessage(SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK, additionalArrowCount));
messages.add(getStatMessage(SubSkillType.CROSSBOWS_SUPER_SHOTGUN, additionalArrowCount));
}
return messages;

View File

@ -51,20 +51,20 @@ public class CrossbowManager extends SkillManager {
* @param projectileLaunchEvent target event
*/
public void processProjectileLaunchEvent(ProjectileLaunchEvent projectileLaunchEvent) {
mcMMOPlayer.getPlayer().sendMessage("Pew pew!");
//Testing
if(Permissions.isSubSkillEnabled(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) {
coneOfDeathProcessing(projectileLaunchEvent);
if(RankUtils.hasUnlockedSubskill(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) {
superShotgunProcessing(projectileLaunchEvent);
}
}
}
private void coneOfDeathProcessing(ProjectileLaunchEvent projectileLaunchEvent) {
spawnConeArrows(projectileLaunchEvent.getEntity());
private void superShotgunProcessing(ProjectileLaunchEvent projectileLaunchEvent) {
spawnSuperShotgunArrows(projectileLaunchEvent.getEntity());
}
private void spawnConeArrows(@NotNull Projectile originProjectile) {
private void spawnSuperShotgunArrows(@NotNull Projectile originProjectile) {
World world = originProjectile.getWorld();
Vector originVector = originProjectile.getVelocity().clone();