mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
Fixed Glide false positives (again :S) and updated pastebinreport.java
This commit is contained in:
1 parent
7fcf4cc7d4
commit
3990e73100
2 files changed
+3
-4
No files matched your search
@@ -42,7 +42,7 @@ public class GlideCheck {
|
|||||||
glideBuffer.put(name, 0);
|
glideBuffer.put(name, 0);
|
||||||
int currentBuffer = glideBuffer.get(name);
|
int currentBuffer = glideBuffer.get(name);
|
||||||
glideBuffer.put(name, currentBuffer + 1);
|
glideBuffer.put(name, currentBuffer + 1);
|
||||||
if((currentBuffer + 1) >= AntiCheat.getManager().getBackend().getMagic().GLIDE_LIMIT())
|
if(currentBuffer >= AntiCheat.getManager().getBackend().getMagic().GLIDE_LIMIT())
|
||||||
{
|
{
|
||||||
double fallDist = distanceToFall(player.getLocation());
|
double fallDist = distanceToFall(player.getLocation());
|
||||||
player.teleport(player.getLocation().add(0, -fallDist, 0));
|
player.teleport(player.getLocation().add(0, -fallDist, 0));
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class PastebinReport {
|
public class PastebinReport {
|
||||||
private static final String DATE = new SimpleDateFormat("yyyy-MM-dd kk:mm Z").format(new Date());
|
private static final String DATE = new SimpleDateFormat("yyyy-MM-dd kk:mm Z").format(new Date());
|
||||||
private static final String API_KEY = "6eeace09c2742f8463b9db9b0c467605";
|
private static final String API_KEY = "d5ac92da966edb97a97860e6a052784f";
|
||||||
|
|
||||||
private StringBuilder report = new StringBuilder();
|
private StringBuilder report = new StringBuilder();
|
||||||
private String url = "";
|
private String url = "";
|
||||||
@@ -142,13 +142,12 @@ public class PastebinReport {
|
|||||||
private void appendMagicDiff() {
|
private void appendMagicDiff() {
|
||||||
// This is hacky, and I like it
|
// This is hacky, and I like it
|
||||||
Magic magic = AntiCheat.getManager().getConfiguration().getMagic();
|
Magic magic = AntiCheat.getManager().getConfiguration().getMagic();
|
||||||
FileConfiguration file = YamlConfiguration.loadConfiguration(AntiCheat.getPlugin().getResource("magic.yml"));
|
FileConfiguration file = YamlConfiguration.loadConfiguration(new File(AntiCheat.getPlugin().getDataFolder(), "magic.yml"));
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
for (Field field : Magic.class.getFields()) {
|
for (Field field : Magic.class.getFields()) {
|
||||||
Object defaultValue = file.get(field.getName());
|
Object defaultValue = file.get(field.getName());
|
||||||
try {
|
try {
|
||||||
Field value = magic.getClass().getDeclaredField(field.getName());
|
Field value = magic.getClass().getDeclaredField(field.getName());
|
||||||
boolean x = false;
|
|
||||||
String s1 = value.get(magic).toString();
|
String s1 = value.get(magic).toString();
|
||||||
String s2 = defaultValue.toString();
|
String s2 = defaultValue.toString();
|
||||||
if (!s1.equals(s2) && !s1.equals(s2 + ".0")) {
|
if (!s1.equals(s2) && !s1.equals(s2 + ".0")) {
|
||||||
|
|||||||
Reference in new issue
Block a user