Fixed Glide false positives (again :S) and updated pastebinreport.java

This commit is contained in:
Rammelkast committed 2016-05-29 12:41:47 +02:00
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);
int currentBuffer = glideBuffer.get(name);
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());
player.teleport(player.getLocation().add(0, -fallDist, 0));
@@ -38,7 +38,7 @@ import java.util.List;
public class PastebinReport {
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 String url = "";
@@ -142,13 +142,12 @@ public class PastebinReport {
private void appendMagicDiff() {
// This is hacky, and I like it
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;
for (Field field : Magic.class.getFields()) {
Object defaultValue = file.get(field.getName());
try {
Field value = magic.getClass().getDeclaredField(field.getName());
boolean x = false;
String s1 = value.get(magic).toString();
String s2 = defaultValue.toString();
if (!s1.equals(s2) && !s1.equals(s2 + ".0")) {