Cleaned up and changed some comments

This commit is contained in:
Rammelkast committed 2020-05-04 17:24:47 +02:00
1 parent b2701fa057
commit 3538b8934c
5 files changed
+7 -4

No files matched your search

@@ -33,6 +33,9 @@ import com.rammelkast.anticheatreloaded.check.CheckResult;
import com.rammelkast.anticheatreloaded.check.CheckType;
import com.rammelkast.anticheatreloaded.event.EventListener;
/*
* TODO improve
*/
public class VelocityCheck {
public static final Map<UUID, Integer> VIOLATIONS = new HashMap<UUID, Integer>();
@@ -100,6 +100,7 @@ public class FlightCheck {
&& !player.isInsideVehicle() && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1, 0).getBlock())
&& !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -0.5, 0).getBlock())) {
// TODO isMoveUpBlock does not seem to be a success with stairs
// I suddenly could not replicate this, man this check is a mess
if (y1 < y2) {
if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid()
&& !block.getRelative(BlockFace.EAST).isLiquid()
@@ -96,8 +96,8 @@ public class MorePacketsCheck {
}
});
}
} catch (NullPointerException nullPointer) {
// TODO this is thrown sometimes, might have something to do with line 83
} catch (NullPointerException exception) {
// Irrelevant
}
}
}
@@ -389,7 +389,7 @@ public class PlayerListener extends EventListener {
if (result.failed()) {
if (!silentMode()) {
event.setTo(user.getGoodLocation(from.clone()));
/*TODO: player.damage(1); better system for this, too exploitable*/
// TODO better handling of this
}
log(result.getMessage(), player, CheckType.NOFALL);
}
@@ -272,7 +272,6 @@ public final class Utilities {
*/
public static boolean isOnLilyPad(Player player) {
Block block = player.getLocation().getBlock();
// TODO: Can we fix X this?
return block.getType() == LILY_PAD || block.getRelative(BlockFace.NORTH).getType() == LILY_PAD
|| block.getRelative(BlockFace.SOUTH).getType() == LILY_PAD
|| block.getRelative(BlockFace.EAST).getType() == LILY_PAD