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

Not checking Towny protected entities in AntigriefTowny #90

Open
bloctown opened this issue Feb 12, 2022 · 0 comments
Open

Not checking Towny protected entities in AntigriefTowny #90

bloctown opened this issue Feb 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@bloctown
Copy link

Describe the bug
EcoEnchants enchantment affect NPC entities inside Towny claims.

To Reproduce
Steps to reproduce the behavior:

  1. Load EcoEnchants 8.39.1 and Eco 6.24.2, plus dependencies, and Towny 0.97.5.16 - Recentish versions, exact version number isn't important
  2. Get a sword with Quake, and enter a default (or any other than Farm) Towny claim that isn't yours and you don't have permissions in
  3. Use quake near villagers/animals that should be protected in towny/settings/config protection.mob_types
  4. They get hurt/die

Expected behavior
Mobs in Towny protection.mob_types shouldn't be affected.

If AntigriefTowny.kt@canInjure checks for this using com.palmergames.bukkit.towny.utils.EntityTypeUtil;
and checks EntityTypeUtil.isInstanceOfAny(TownySettings.getProtectedEntityTypes(), victim) then it should resolve the issue.

There is also a newer method called isProtectedEntity but the version of Towny that's included in Eco doesn't have it yet.

Server Information (please complete the following information):

This server is running Paper version git-Paper-186 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 6df4641)
You are 11 version(s) behind
Download the new version at: https://papermc.io/downloads
Previous version: git-Paper-177 (MC: 1.18.1)
eco version 6.24.2
Website: willfp.com
Author: Auxilor
EcoEnchants version 8.39.1
Website: willfp.com
Author: Auxilor

Additional context
Sorry, I have enough knowledge to debug the issue but not to implement/PR the fix. I tried and can't get my version of Eco into EcoEnchants so it doesn't seem to have any effect

@bloctown bloctown added the bug Something isn't working label Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant