mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-06-04 19:02:20 +00:00
- Correct command concurrency issues on Bukkit servers
- Removed dynamic class loading of libraries to fix antivirus flags of the plugin.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package dev.brighten.antivpn.utils;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class MiscUtils {
|
||||
@@ -41,6 +42,14 @@ public class MiscUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static ThreadFactory createThreadFactory(String threadName) {
|
||||
return r -> {
|
||||
Thread thread = new Thread(r);
|
||||
thread.setName(threadName);
|
||||
return thread;
|
||||
};
|
||||
}
|
||||
|
||||
public static boolean isIpv4(String ip)
|
||||
{
|
||||
return ipv4.matcher(ip).matches();
|
||||
|
||||
Reference in New Issue
Block a user