-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: api not being accessible through TritonAPI
Due to #285, the TritonAPI class in the core module was no longer overshadowing the same class in the api module, effectively breaking the TritonAPI#getInstance method. This commit works around that by saving a reference to the Triton instance in the TritonAPI class ifself.
- Loading branch information
1 parent
aee7002
commit 0e0eea5
Showing
7 changed files
with
35 additions
and
16 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
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
core/src/main/java/com/rexcantor64/triton/api/TritonAPIUtils.java
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,12 @@ | ||
package com.rexcantor64.triton.api; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
// This class has to be in this package to have access to the methods in TritonAPI | ||
public class TritonAPIUtils { | ||
|
||
public static void register(@NotNull Triton instance) { | ||
TritonAPI.register(instance); | ||
} | ||
|
||
} |
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
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