Skip to content

Commit

Permalink
Merge pull request #5 from BT-Pluginz/version-1.1
Browse files Browse the repository at this point in the history
Fixed trying to update the Armor stands which where non-existent
#4
  • Loading branch information
TubYoub authored Sep 1, 2024
2 parents c9f3968 + 44d4bbe commit 92f3d30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.pluginz</groupId>
<artifactId>GravePlugin</artifactId>
<version>1.0</version>
<version>1.1</version>
<packaging>jar</packaging>

<name>BT Graves</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/pluginz/graveplugin/GravePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.bukkit.plugin.java.JavaPlugin;

public class GravePlugin extends JavaPlugin {
private final String version = "1.0";
private final String version = "1.1";
private final String project = "WGgaXko0";
private final int pluginId = 22622;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ public void updateGraveName(UUID graveId, String coloredTime) {
World world = location.getWorld();
if (world != null) {
ArmorStand armorStand = (ArmorStand) Bukkit.getEntity(graveManager.getArmorStandIdFromGraveId(graveId));
String playerName = grave.getPlayerName();
armorStand.setCustomName(playerName + "'s Grave - " + coloredTime);
if (armorStand != null) {
String playerName = grave.getPlayerName();
armorStand.setCustomName(playerName + "'s Grave - " + coloredTime);
}
}
}
}
Expand Down

0 comments on commit 92f3d30

Please sign in to comment.