Skip to content

Commit

Permalink
DHAPI null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
d0by1 committed Mar 17, 2023
1 parent 092bb0a commit b50e2c1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/eu/decentsoftware/holograms/api/DHAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public static void moveHologram(String name, Location location) throws IllegalAr
Validate.notNull(location);

Hologram hologram = getHologram(name);
moveHologram(hologram, location);
if (hologram != null) {
moveHologram(hologram, location);
}
}

/**
Expand Down Expand Up @@ -147,7 +149,9 @@ public static void updateHologram(String name) {
Validate.notNull(name);

Hologram hologram = getHologram(name);
hologram.updateAll();
if (hologram != null) {
hologram.updateAll();
}
}

/**
Expand All @@ -162,7 +166,9 @@ public static void removeHologram(String name) {
Validate.notNull(name);

Hologram hologram = getHologram(name);
hologram.delete();
if (hologram != null) {
hologram.delete();
}
}

/**
Expand Down

0 comments on commit b50e2c1

Please sign in to comment.