mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fix potential NPE, remove uneeded imports, static access for static vars
This commit is contained in:
1 parent
30ac883120
commit
19af0045f9
2 files changed
+9
-11
No files matched your search
@@ -19,16 +19,12 @@
|
||||
package net.h31ix.anticheat;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarInputStream;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.h31ix.anticheat.event.*;
|
||||
@@ -387,10 +383,10 @@ public class Anticheat extends JavaPlugin
|
||||
}
|
||||
private void cleanup()
|
||||
{
|
||||
this.eventList = null;
|
||||
this.manager = null;
|
||||
this.config = null;
|
||||
this.metrics = null;
|
||||
this.logger = null;
|
||||
eventList = null;
|
||||
manager = null;
|
||||
config = null;
|
||||
metrics = null;
|
||||
logger = null;
|
||||
}
|
||||
}
|
||||
@@ -69,11 +69,13 @@ public class PlayerManager
|
||||
}
|
||||
else
|
||||
{
|
||||
final String name = player.getName();
|
||||
|
||||
// Why, Why, Whyyyyy!
|
||||
if (player == null)
|
||||
return false;
|
||||
|
||||
final String name = player.getName();
|
||||
|
||||
|
||||
|
||||
if (level.get(name) == null || level.get(name) == 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user