mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 20:45:28 +02:00
Add some combat processing logic for Tridents/Xbows
This commit is contained in:
@@ -52,7 +52,7 @@ public class ArcheryManager extends SkillManager {
|
||||
* @param target The {@link LivingEntity} damaged by the arrow
|
||||
* @param arrow The {@link Entity} who shot the arrow
|
||||
*/
|
||||
public double distanceXpBonusMultiplier(LivingEntity target, Entity arrow) {
|
||||
public static double distanceXpBonusMultiplier(LivingEntity target, Entity arrow) {
|
||||
//Hacky Fix - some plugins spawn arrows and assign them to players after the ProjectileLaunchEvent fires
|
||||
if(!arrow.hasMetadata(MetadataConstants.METADATA_KEY_ARROW_DISTANCE))
|
||||
return 1;
|
||||
|
@@ -2,10 +2,20 @@ package com.gmail.nossr50.skills.tridents;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class TridentsManager extends SkillManager {
|
||||
public TridentsManager(McMMOPlayer mmoPlayer) {
|
||||
super(mmoPlayer, PrimarySkillType.TRIDENTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player can activate the Super Ability for Tridents
|
||||
* @return true if the player can activate the Super Ability, false otherwise
|
||||
*/
|
||||
public boolean canActivateAbility() {
|
||||
return mmoPlayer.getToolPreparationMode(ToolType.TRIDENTS) && Permissions.tridentsSuper(getPlayer());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user