Skip to content

Commit

Permalink
[UPDATE] Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuvlyy committed Feb 11, 2024
1 parent 2357fb8 commit af09518
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ public class Test extends JavaPlugin {
@Override
public void onEnable()
{
this.core = Tekore.getInstance();
try { // Important !
this.core = Tekore.getInstance();
} catch (NullPointerException exception) {
System.err.println("Tekore failed to load. Stopping.");
this.getServer().shutdown();
return;
}
}

public Tekore getCore()
Expand All @@ -36,6 +42,9 @@ public class Test extends JavaPlugin {
}
```

`⚠️` Initialisez toujours Tekore avec un bloc `try/catch` as cas-où Tekore ne se charge pas correctement
(mauvaise configuration par exemple).

## HashLogger

Afin de centraliser les logs (et peut-être dans le futur faire un historique
Expand Down

0 comments on commit af09518

Please sign in to comment.