-
-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
entity-armor-stand-destroy flag is added. #1913
base: master
Are you sure you want to change the base?
entity-armor-stand-destroy flag is added. #1913
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an issue with adding that flag to WorldGuard.
To add the flag please target the version/7.0.x branch.
import org.bukkit.entity.Player; | ||
import org.bukkit.entity.Tameable; | ||
import org.bukkit.entity.ThrownPotion; | ||
import org.bukkit.entity.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use wildcard imports
* @param defender armor stand being damaged | ||
* @return true if the event should be cancelled | ||
*/ | ||
private boolean checkArmorStandProtection(Entity attacker, ArmorStand defender) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can generalize the checkItemFrameProctection
method and pass a flag to that method.
That way you don't need double methods.
import org.bukkit.entity.Painting; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.entity.Projectile; | ||
import org.bukkit.entity.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use wildcard imports
entity-armor-stand-destroy flag can be changed by a player so that the player can protect armer stand again explosion.
Evidence: https://youtu.be/xHLtpaDZ3po