File tree Expand file tree Collapse file tree
main/java/fr/sandro642/github
test/java/fr/sandro642/github/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,11 +87,6 @@ public static YamlUtils YamlUtils() {
8787 * @return MCSupport ou null si ce n'est pas un projet Minecraft
8888 */
8989 public static MCSupport MCSupport () {
90- if (MCSupport ().isMCProject ()) {
91- return new MCSupport ();
92- } else {
93- logger .ERROR ("MCSupport ne peut être utilisé que dans un projet Minecraft." );
94- return null ;
95- }
90+ return new MCSupport ();
9691 }
9792}
Original file line number Diff line number Diff line change 1111
1212public class MCSupport {
1313
14+ /**
15+ * Création de l'instance unique de MCSupport.
16+ */
17+ private static MCSupport instance ;
18+
1419 /**
1520 * Instance unique du plugin Minecraft.
1621 * Utilisée pour stocker la variable du plugin Minecraft.
@@ -57,4 +62,14 @@ public String getPluginPath() {
5762 }
5863 }
5964
65+ /**
66+ * Méthode permettant d'obtenir l'instance unique de MCSupport.
67+ * @return L'instance unique de MCSupport.
68+ */
69+ public static MCSupport getInstance () {
70+ if (instance == null ) {
71+ instance = new MCSupport ();
72+ }
73+ return instance ;
74+ }
6075}
Original file line number Diff line number Diff line change @@ -62,12 +62,6 @@ public static void main(String[] args) {
6262 @ Test
6363 public void testHorsData () {
6464 ConnectorAPI .initialize (ResourceType .TEST_RESOURCES );
65-
66- ApiResponse <Void > response = ConnectorAPI .JobGetInfos ()
67- .getRoutes (VersionType .V1_BRANCH , MethodType .GET , "example1" )
68- .getResponse ();
69-
70- System .out .println (response .display ());
7165 }
7266
7367}
You can’t perform that action at this time.
0 commit comments