Added pastebin reporting. This should make ticket reporting life so much easier, it's like a requirement.

This commit is contained in:
Super Spy committed 2012-06-17 11:24:28 -05:00
1 parent 137d968a70
commit e298173735
4 files changed
+273 -1

No files matched your search

@@ -19,6 +19,8 @@
package net.h31ix.anticheat.manage;
import java.io.File;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.*;
import net.h31ix.anticheat.Anticheat;
import net.h31ix.anticheat.util.Configuration;
@@ -40,6 +42,7 @@ public class AnticheatManager
private CheckManager checkManager = null;
private Backend backend = null;
private static Logger LOGGER, FILE_LOGGER;
private static List<String> logs = new CopyOnWriteArrayList<String>();
private static Handler fileHandler;
private static final int LOG_LEVEL_HIGH = 3;
@@ -82,6 +85,7 @@ public class AnticheatManager
{
fileLog(ChatColor.stripColor(message));
}
logs.add(ChatColor.stripColor(message));
}
public void fileLog(String message)
@@ -89,6 +93,18 @@ public class AnticheatManager
FILE_LOGGER.info(message);
}
public List<String> getLastLogs()
{
List<String> log = new CopyOnWriteArrayList<String>();
if (logs.size() < 30)
return logs;
for(int i = 1; i < 31; i++) {
log.add(logs.get(logs.size() - i));
}
logs.clear();
return log;
}
public Anticheat getPlugin()
{
return plugin;
@@ -25,6 +25,8 @@ import java.util.List;
import java.util.Map;
import net.h31ix.anticheat.event.EventListener;
import net.h31ix.anticheat.util.Utilities;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
@@ -162,6 +164,85 @@ public class Backend
micromanage = instance;
}
public void buildAdvancedInformation(StringBuilder r)
{
r.append("Dropped Items List:" + '\n');
for (String l : droppedItem)
{
r.append(l + '\n');
}
r.append("Moving Exempt List:" + '\n');
for (String l : movingExempt)
{
r.append(l + '\n');
}
r.append("Broken Block List:" + '\n');
for (String l : brokenBlock)
{
r.append(l + '\n');
}
r.append("Placed Block List:" + '\n');
for (String l : placedBlock)
{
r.append(l + '\n');
}
r.append("Bow Wind Up List:" + '\n');
for (String l : bowWindUp)
{
r.append(l + '\n');
}
r.append("Start Eating List:" + '\n');
for (String l : startEat)
{
r.append(l + '\n');
}
r.append("Healed List:" + '\n');
for (String l : healed)
{
r.append(l + '\n');
}
r.append("Sprinted List:" + '\n');
for (String l : sprinted)
{
r.append(l + '\n');
}
r.append("Is In Water List:" + '\n');
for (String l : isInWater)
{
r.append(l + '\n');
}
r.append("Is In Water (cached) List:" + '\n');
for (String l : isInWaterCache)
{
r.append(l + '\n');
}
r.append("Instant Break Exempt List:" + '\n');
for (String l : instantBreakExempt)
{
r.append(l + '\n');
}
r.append("Is Ascending List:" + '\n');
for (String l : isAscending)
{
r.append(l + '\n');
}
r.append("Tracking Projectiles List:" + '\n');
for (String l : trackingProjectiles)
{
r.append(l + '\n');
}
r.append("Velocitizing List:" + '\n');
for (String l : velocitizing)
{
r.append(l + '\n');
}
r.append("Interacting List:" + '\n');
for (String l : interacting)
{
r.append(l + '\n');
}
}
public boolean checkLongReachBlock(Player player, double x, double y, double z)
{
return !Utilities.isUsingMcMMOAbility(player) && (x >= BLOCK_MAX_DISTANCE || y > BLOCK_MAX_DISTANCE || z > BLOCK_MAX_DISTANCE);
@@ -283,7 +364,7 @@ public class Backend
{
return false;
}*/
if(!Utilities.isInteractable(targetBlock.getType()))
if (!Utilities.isInteractable(targetBlock.getType()))
{
return false;
}