Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chacho4
Copy link

@chacho4 chacho4 commented May 15, 2022

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

Copy link
Collaborator

@Joo200 Joo200 left a 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.*;
Copy link
Collaborator

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) {
Copy link
Collaborator

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.*;
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants