Target Validation Issue (PvE vs PvP Restriction)
Description
I have discovered that attackEffect and attackHelpEffect work perfectly when the victim is a Mob (Zombie, Skeleton, etc.), but they are completely ignored when the victim is another Player. This hardcoded restriction prevents the creation of interesting RPG mechanics like "Support/Healer" items or specialized PvP weapons.
Technical Cause
In the EventListener class, specifically in the onEntityAttack event, the code explicitly checks if the victim is NOT a player multiple times:
if ((attacker instanceof Player) && (!(victim instanceof Player)))
This check exists in both melee and projectile logic, making it impossible for custom loot items to interact with other players during combat or support scenarios.
Use Case: The Healing Staff
I want to create a "Healing Staff" (Item ID 160) using a Stick that behaves differently depending on the target:
- In PvP / Ally Support: When hitting another player, it should apply
INSTANT_HEALTH to heal them.
- In PvE: When hitting an Undead Mob (Zombie, Skeleton),
INSTANT_HEALTH would naturally deal damage to them.
Currently, this is impossible because the plugin cancels the doEffect logic the moment it detects the target is a player, even if the intent is to heal/help.
Feature Request / Suggestion
Instead of a global hardcoded block, it would be much better to have granular control.
- New Toggle per Effect:
Add an option like allowPvP or allowPlayers within each effect in the potionEffects section:
'13':
potion: INSTANT_HEALTH
level: 1
attackEffect: target
allowPvP: true # <--- Suggested toggle to bypass the Player check
requiredItems:
- 160
Target Validation Issue (PvE vs PvP Restriction)
Description
I have discovered that
attackEffectandattackHelpEffectwork perfectly when the victim is a Mob (Zombie, Skeleton, etc.), but they are completely ignored when the victim is another Player. This hardcoded restriction prevents the creation of interesting RPG mechanics like "Support/Healer" items or specialized PvP weapons.Technical Cause
In the
EventListenerclass, specifically in theonEntityAttackevent, the code explicitly checks if the victim is NOT a player multiple times:if ((attacker instanceof Player) && (!(victim instanceof Player)))This check exists in both melee and projectile logic, making it impossible for custom loot items to interact with other players during combat or support scenarios.
Use Case: The Healing Staff
I want to create a "Healing Staff" (Item ID 160) using a Stick that behaves differently depending on the target:
INSTANT_HEALTHto heal them.INSTANT_HEALTHwould naturally deal damage to them.Currently, this is impossible because the plugin cancels the
doEffectlogic the moment it detects the target is a player, even if the intent is to heal/help.Feature Request / Suggestion
Instead of a global hardcoded block, it would be much better to have granular control.
Add an option like
allowPvPorallowPlayerswithin each effect in thepotionEffectssection: