-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Reider745/NukkitMot
Merge
- Loading branch information
Showing
103 changed files
with
2,610 additions
and
1,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.reider745; | ||
|
||
import java.lang.instrument.Instrumentation; | ||
import java.util.UUID; | ||
|
||
public class InstrumentHook { | ||
public static void premain(String agentArgs, Instrumentation inst) { | ||
if (agentArgs != null) { | ||
System.getProperties().put(AGENT_ARGS_KEY, agentArgs); | ||
} | ||
System.getProperties().put(INSTRUMENTATION_KEY, inst); | ||
} | ||
|
||
public static Instrumentation getInstrumentation() { | ||
return (Instrumentation) System.getProperties().get(INSTRUMENTATION_KEY); | ||
} | ||
|
||
// Needn't be a UUID - can be a String or any other object that | ||
// implements equals(). | ||
private static final Object AGENT_ARGS_KEY = | ||
UUID.fromString("887b43f3-c742-4b87-978d-70d2db74e40e"); | ||
|
||
private static final Object INSTRUMENTATION_KEY = | ||
UUID.fromString("214ac54a-60a5-417e-b3b8-772e80a16667"); | ||
} |
Oops, something went wrong.