Hit Detection/Hit Delay Plugin

Status
This thread has been locked.

RowinHere

Banned
Feedback score
10
Posts
276
Reactions
179
Resources
0
Warning: This doesn't only affect pvp. You will also get faster burn/drown damage etc.

The default hit delay is 20 ticks (1000ms) but because of plugins this delay will be higher. You can use this plugin to put the hit delay on 19 ticks (950ms) to get a better hit detection.

https://www.spigotmc.org/resources/simplenohitdelay.33809/

There's no need for async hit detection or custom edited optimized versions :)

FAQ:
Does this work on ...?
It should work with every version.

Can you put it on ... milliseconds?
The hit delay must be in ticks. 1 tick is 50 milliseconds.
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0
Incredibly useful and clean plugin, definitely going to use, saves me from creating one myself.
 

Spenser

That guy!
Premium
Feedback score
38
Posts
3,427
Reactions
1,074
Resources
0
The default hit delay is 20 ticks (1000ms) but because of plugins this delay will be higher. What this plugin does is setting the hit delay of every player on 19 ticks (950ms) to get a better hit detection.

There are no ads/commands/configs in this plugin. Have fun!

http://www.mediafire.com/file/cq9q8k6x2pcgpzq/HitDetection.jar

There's no need for async hit detection or custom edited optimized versions :)

For all the skids or developers worried about the plugin quality, here's the code:
Code:
package me.rowin.hitdetection;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Core extends JavaPlugin implements Listener {

    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(this, this);
        for (Player player : Bukkit.getOnlinePlayers()) {
            player.setMaximumNoDamageTicks(19);
        }
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        event.getPlayer().setMaximumNoDamageTicks(19);
    }
}
Does this work for 1.8.8 paper?
 

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0
Any way I can modify hit detection?
Yes, there is, you need to get a java decompiler such as JD-GUI, decompile the plugin, go into Eclipse and edit it to your liking.
 

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0
I've always wondered this, but what do I download to configure/make plugins?
You use an application such as Eclipse or IntelliJ.
 

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0

RowinHere

Banned
Feedback score
10
Posts
276
Reactions
179
Resources
0
Any way I can modify hit detection?
If you want to make the hit delay even lower you can put it on 18 ticks which is 900ms. This is probably too fast.
 
Banned forever. Reason: Leaking user resources (https://prnt.sc/m91daf)

RowinHere

Banned
Feedback score
10
Posts
276
Reactions
179
Resources
0
Yes, there is, you need to get a java decompiler such as JD-GUI, decompile the plugin, go into Eclipse and edit it to your liking.
No need to decompile the plugin, the source is in my post :p[DOUBLEPOST=1481307628][/DOUBLEPOST]
can I do something like 18.5 ticks for example? would that work?
Nope. Sadly this is not possible, the value must be an int (no decimals).
 
Last edited:
Banned forever. Reason: Leaking user resources (https://prnt.sc/m91daf)

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0
No need to decompile the plugin, the source is in my post :p
Oh yes, I'm incredibly sorry, I didn't see that.

This is what happens when you're attempting to respond to individuals on MCM, watch YouTube and configure plugins at the same time. :p
 

RowinHere

Banned
Feedback score
10
Posts
276
Reactions
179
Resources
0
already decompiled it, but is there a way to just import all the files at once? or

also sorry if decompiling is disrespectful etc, im a complete noob and have 0 knowledge of anything relating to java
I'll send you the version with the hit delay on 18 ticks :)
 
Banned forever. Reason: Leaking user resources (https://prnt.sc/m91daf)

Gymnast

Feedback score
0
Posts
65
Reactions
48
Resources
0
already decompiled it, but is there a way to just import all the files at once? or
No there isn't, you would have to create a new package and then a new class, then you would copy the source code into the class and change the package name in the source code, you would also need to add CraftBukkit to the build path.
 
Status
This thread has been locked.
Top