Skip to content

Commit

Permalink
Added null check in hologram manager getter
Browse files Browse the repository at this point in the history
  • Loading branch information
max1mde committed Aug 4, 2023
1 parent a3c0982 commit 46c3a5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.maximfiedler'
version = '1.1.2'
version = '1.1.3'

repositories {
mavenCentral()
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/com/maximfiedler/hologramapi/HologramAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@

public final class HologramAPI extends JavaPlugin {

private static @Getter(AccessLevel.PUBLIC) HologramManager hologramManager;
private static HologramManager hologramManager;

@Override
public void onEnable() {
hologramManager = new HologramManager(this);
new Metrics(this, 19375);
}

public HologramManager getHologramManager() {
if(hologramManager == null) {
hologramManager = new HologramManager(this);
}
return hologramManager;
}

}

0 comments on commit 46c3a5b

Please sign in to comment.