mcmonkeyprojects / Sentinel

Combat NPCs for Spigot!
MIT License
165 stars 85 forks source link

Archer bug #95

Closed Blamo27 closed 7 years ago

Blamo27 commented 7 years ago

Hello me again,

When an NPC yields a bow and shoots at a player, the player does not take any damage if the area or the world does not allow PVP. That means that, even though close combat NPCs can damage players in PVE-only areas, long distance NPCs can't. So in order to put some archers, we would have to put the area as PVP allowed, which is obviously a massive problem on a PVE server.

mcmonkey4eva commented 7 years ago

You can make the archers be non-player NPCs. Alternately, you can switch to a different plugin for PvP protection. Denizen - https://wiki.citizensnpcs.co/Denizen - is capable of doing this via some scriptwork, and won't cause issues with NPCs. There's even a WG replacement script - http://one.denizenscript.com/denizen/repo/entry/23 - that you could use if you don't feel like doing any hand scripting.

If none of that works for you, you'd have to bug the devs of your anti-PVP plugin to make it not screw with NPCs.

Blamo27 commented 7 years ago

Is it a bug from Sentinel though ? We didn't have that problem with Sentry...

mcmonkey4eva commented 7 years ago

Sentry had a tendency to enforce damage beyond all logic. It is the stance of Sentinel that plugins that block damage are perfectly in their right to do so. The, of course, negative side effect is this means plugins can accidentally block it as well. We have a config option to force it through for fist damage, it'd be more complex for ranged damage.

If absolutely nothing works for you, I could look into a config option to enforce damage for ranged weapons, but I very strongly encourage you to try other things first!

Blamo27 commented 7 years ago

Well obviously we can't change all of our archers to non human creatures. As for Denizen, frankly we don't want to install yet another plugin as we have already far too many ; also, we have too much dependancies, and if you could make Sentinel self sufficient on that specific matter at least, that would be of great help (because I doubt we will soon have a solution from World Guard for this).

mcmonkey4eva commented 7 years ago

Added a new config option: https://github.com/mcmonkey4eva/Sentinel/blob/master/src/main/resources/config.yml#L51 Available in build 68: http://ci.citizensnpcs.co/job/Sentinel/68/ No promises it'll work in your situation, but try it out...

Blamo27 commented 7 years ago

Thanks, it's now working.

Blamo27 commented 7 years ago

@mcmonkey4eva Not working, that was an error.

mcmonkey4eva commented 7 years ago

How'd it look like it was working for 2 days but not actually be?

Blamo27 commented 7 years ago

Sorry, we made a mistake in our testings : the fix actually never worked, we tested it wrong.

mcmonkey4eva commented 7 years ago

I don't know what to do if that was blocked :/

It adds a high-priority event listener for the arrow hitting, and forces the damage through if it finds it...

Blamo27 commented 7 years ago

Did you take a look at what Sentry did to achieve that ? Maybe you might find some ideas about a fix for this issue...? It would be nice to have it directly integrated to the plugin ; also, most users of a plugin such as yours have roleplay servers, which block PVP, so this will most likely be a common issue... By the way, have you tried to set the priority to monitor ?

mcmonkey4eva commented 7 years ago

Oops! I always get the Bukkit priority list backwards for some reason >.>

Meant that to be a low-priority listener. http://ci.citizensnpcs.co/job/Sentinel/69/ try the new build.

Blamo27 commented 7 years ago

Yes it's working, thanks ! c: