OldCombatMechanics

OldCombatMechanics

46.1k Downloads

Area Damage On Swords

AhmetDS opened this issue · 40 comments

commented

Info

  • Server version: 1.12
  • OldCombatMechanics version:1.6.6
  • Server log file:
  • OldCombatMechanics config file:

Problem Description

The area damage added in 1.9 is still not removed pls remove it

commented

Are you sure that actual damage is being done, instead of simply just showing the particle effect? Additionally, we will need your log file and config file.

commented

no errors in logs and I didn't change the config file. sweep attack damages other enemies 1 heart not main enemy main enemy damages by 7 heart if im holding diamond sword but other enemies can take damage

commented

2018-09-01_10 18 21

commented

Do the other mobs move at all, or flash red?

commented

no knock back at other mobs

commented

Do they flash red, like the mob being hit does?

commented

no

commented

Do they actually die? Try it with a chicken, that has only a few hearts. If not, the damage indicator plugin is wrong. Can you link it?

commented

Could this be because OCM has the listener set on HIGHEST priority and thus only cancels the event after the damage indicator plugin has gotten the info?

commented

Yes, that sounds right. Checking the source, that damage indicator plugin listens on priority NORMAL, although it should really listen on MONITOR. Not sure if we should adjust OCM, but listening on LOWEST sounds nicer than HIGHEST to me - I don't think a plugin would un-cancel the event.

In summary we can either change this to LOWEST or nag the plugin author to use MONITOR. The latter is a bit unlikely to help:
grafik

commented

Or find a similar plugin with the same features or even modify the plugin for him?

commented

Why did you initially put the OCM listener to highest and not lowest? Lowest sounds like it would better fit what it does, as no other plugin will notice those unless it really wants to.

commented

Almost all of OCM's listeners are on HIGHEST to avoid messing up other plugin's functionality.

In this case, since all the module really does is cancel an event, it may be fine to set it to LOWEST.

commented

It would be my preferred solution here, unless it causes some other conflicts. Not sure which ones that would be here. Some plugin would need to un-cancel damage events to reinstate the sweep damage. I don't know who would do that, but somebody might.

It really is the fault of the DamageIndicator plugin, but we could maybe be a bit more friendly to it unless you know a plugin that does un-cancel damage events.

commented

Alright, I have made this change. @AhmetDS please try this test build and see if the DamageIndicator plugin still tells you other entities are being damaged.

commented

can you use this damage indicator damage indicator doesnt supports 1.12.2 but this support
Yeni WinRAR arşivi.zip

commented

That plugin looks like it will have the exact same problem. Can somebody tell me why none of these plugins seem (Maybe I missed something in the one Ahmet posted?) to check whether the damage event is actually cancelled? That should also break with things like WorldGuard, Protection zones and whatever else.

Apart from the plugin you (leon) posted should work just fine on 1.12 (it does, as you've seen) and my patch should make it work correctly (i.e. ignore cancelled events).

@AhmetDS I would ask the author of that plugin you posted (if you know him) to stop spawning ArmorStands for cancelled events. It also might remove other ArmorStands if they are very close to the player/mob being damaged, if I followed that code correctly.

commented

damage indicator needs this plugin to work "https://dev.bukkit.org/projects/holoapi" but me posted damage indicator is dont need holoapi

commented

i dont know who is author holoapi is supports CB 1.7.2 or down versions

commented

In his screenshots HoloAPI seemed to work just fine in 1.12.2, the bug was that too much was displayed due to some programming errors in the DamageIndicator plugin.

It hasn't been updated in 4 years, but the compatibility layer by bukkit + ProtocolLib seem to be able to still keep it compatible. Quite impressive IMHO

commented

:/ nevermind i think this problem not causing oldcombatmechanics so how to delete sword sweep attack effect?

commented

The effect on the client side? So the particles?

The answer is "you can't" as that is purely client side. OCM can disable the damage, but not the client side particles sadly.

commented

:/

commented

I was wrong, after some experimenting you can actually cancel the sent packet. I will see if I can PR that in.

Can you try this build?
@AhmetDS

commented

okey

commented

[OldCombatMechanics] Config file config.yml generated [13:46:08 ERROR]: Error occurred while enabling OldCombatMechanics v1.7.0 (Is it up to date?) java.lang.IllegalArgumentException: No enum constant org.bukkit.potion.PotionType.F¦RE_RES¦STANCE at java.lang.Enum.valueOf(Unknown Source) ~[?:1.8.0_141] at org.bukkit.potion.PotionType.valueOf(PotionType.java:1) ~[spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at gvlfm78.plugin.OldCombatMechanics.utilities.ConfigUtils.loadPotionDurationsList(ConfigUtils.java:73) ~[?:?] at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldPotionEffects.reload(ModuleOldPotionEffects.java:44) ~[?:?] at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldPotionEffects.<init>(ModuleOldPotionEffects.java:39) ~[?:?] at gvlfm78.plugin.OldCombatMechanics.OCMMain.registerModules(OCMMain.java:117) ~[?:?] at gvlfm78.plugin.OldCombatMechanics.OCMMain.onEnable(OCMMain.java:47) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-2cf50f0-2b93d83]

commented

Can you post your config.yml please?

commented

Where are you from? Can you please tell me the language your server uses? I am in germany, so mine is de_DE, what is yours? I suspect a locale problem when upper casing the potion type as he gvlfm doesn't seem to have taken that into account.

If you do not want to tell me that, can you tell me what your upper case i/I looks like?

commented

im from turkey :/

commented
jshell> "hey you there i am nice".toUpperCase($1);
$2 ==> "HEY YOU THERE İ AM NİCE"

Yea, that seems to be the problem. Languages are mean.

Can you try this this please?

commented

image
:/

commented

no error on console

commented

Makes sense as the author did not set ignoreCancelled to true and doesn't check himself. That plugin is really broken.

You are likely better off finding another plugin, but if you insist you can try this patch I made.

commented

@AhmetDS Any update? Have you tried the build I posted?

commented

thx man

commented

yep it worked

commented

@AhmetDS No worries :) Have you found a working damage indicator plugin now (or tried the patch I made?).
If you did and everything seems to be fine, consider closing this issue. If not, please just shout :)

commented

everything is fine I tried to code the damage indicator myself everything is fine