From f5534a1f67e918a4ea78a8fa915ae4ec1a4bba04 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 20 Dec 2018 22:36:02 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B8=D0=BD=D1=81=D1=82=D1=80=D1=83=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=D1=86=D0=B8=D0=B8=20LaunchServer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launchserver/StarterAgent.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/StarterAgent.java b/LaunchServer/src/main/java/ru/gravit/launchserver/StarterAgent.java index 01dc36a0..84893450 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/StarterAgent.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/StarterAgent.java @@ -28,8 +28,16 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO return super.visitFile(file, attrs); } } + public static Instrumentation inst; + private static boolean isStarted = false; + public static boolean isAgentStarted() + { + return isStarted; + } public static void premain(String agentArgument, Instrumentation inst) { + StarterAgent.inst = inst; + isStarted = true; try { Files.walkFileTree(Paths.get("libraries"), Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor(inst)); } catch (IOException e) {