Minecraft PC IP: play.cubecraft.net

caspar1500

Novice Member
Jun 24, 2017
45
18
58
20
Hello i am developing an anti-cheat and i found something out.
Most of the time with the hack step (makes you walk up a block like a slab) this value comes: 0.4200000000000017
So i made this:

@EventHandler
void StepCheck(PlayerMoveEvent e) {

Player p = e.getPlayer();

double y = e.getTo().getY() - e.getFrom().getY();

if(y == 0.4200000000000017) {
p.teleport(e.getFrom());
p.sendMessage("You got deteceted for step.");
}
}

It is working great.
You may implement this in the sentiel code or edit it a bit.
Hope this helps!
 
  • Like
Reactions: _AmazingWays_

Lezappen

Forum Expert
Jan 30, 2016
2,174
3,886
338
Toulouse (France)
Hello i am developing an anti-cheat and i found something out.
Most of the time with the hack step (makes you walk up a block like a slab) this value comes: 0.4200000000000017
So i made this:

@EventHandler
void StepCheck(PlayerMoveEvent e) {

Player p = e.getPlayer();

double y = e.getTo().getY() - e.getFrom().getY();

if(y == 0.4200000000000017) {
p.teleport(e.getFrom());
p.sendMessage("You got deteceted for step.");
}
}

It is working great.
You may implement this in the sentiel code or edit it a bit.
Hope this helps!
Checking for a specific value like this makes it really easy to be patched, all they have to do is change that value from: 0.4200000000000017 to 0.4200000000000016
This also probably only works against one specific client.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
20
you can try ik its easy to patch but it is already that value for like 2 updates. So i dont know if they will change that value.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
20
Checking for a specific value like this makes it really easy to be patched, all they have to do is change that value from: 0.4200000000000017 to 0.4200000000000016
This also probably only works against one specific client.
i tested it out on 2 clients and it didn't work at all so idk if all the clients have it. But it are atleast 2 clients steps away. So you can add and try it.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
20
and this is btw the way i got that value:

@EventHandler
void TellMove(PlayerMoveEvent e) {

Player p = e.getPlayer();

double x = e.getTo().getX() - e.getFrom().getX();
double y = e.getTo().getY() - e.getFrom().getY();
double z = e.getTo().getZ() - e.getFrom().getZ();

p.sendMessage("X: " + Double.toString(x));
p.sendMessage("Y: " + Double.toString(y));
p.sendMessage("Z: " + Double.toString(z));
Bukkit.getConsoleSender().sendMessage("X: " + Double.toString(x));
Bukkit.getConsoleSender().sendMessage("Y: " + Double.toString(y));
Bukkit.getConsoleSender().sendMessage("Z: " + Double.toString(z));
}

It just gets the last position and that the second one subtract the new with the old to get the deffrence and than send it to the play that did it. (this is only hand for debugging and you can turn off the Bukkit.getConsoleSender().sendMessage otherwise the server will get spammen if someone walks) this code is handy for debugging and getting value's
 
Members Online

Team online

Latest profile posts

you dont know how long ive been waiting to see this <3
IMG_8461.jpeg
Frontlane wrote on S4nne's profile.
Kazwa wrote on Frontlane's profile.
🐺
Top Bottom