diff --git a/src/main/java/com/b1n_ry/yigd/components/GraveComponent.java b/src/main/java/com/b1n_ry/yigd/components/GraveComponent.java index 401e009..1063aec 100644 --- a/src/main/java/com/b1n_ry/yigd/components/GraveComponent.java +++ b/src/main/java/com/b1n_ry/yigd/components/GraveComponent.java @@ -541,7 +541,11 @@ public void onDestroyed() { ServerPlayerEntity owner = playerManager.getPlayer(this.owner.getId()); if (owner == null) return; - owner.sendMessage(Text.translatable("text.yigd.message.grave_destroyed")); + YigdConfig config = YigdConfig.getConfig(); + + if (config.graveConfig.notifyOwnerIfDestroyed) { + owner.sendMessage(Text.translatable("text.yigd.message.grave_destroyed")); + } if (YigdConfig.getConfig().graveConfig.dropItemsIfDestroyed) { this.dropAll(); diff --git a/src/main/java/com/b1n_ry/yigd/config/YigdConfig.java b/src/main/java/com/b1n_ry/yigd/config/YigdConfig.java index 7f2fe84..2d3447c 100644 --- a/src/main/java/com/b1n_ry/yigd/config/YigdConfig.java +++ b/src/main/java/com/b1n_ry/yigd/config/YigdConfig.java @@ -183,6 +183,7 @@ public static class GraveConfig { // replace old block when claimed public boolean replaceOldWhenClaimed = true; public boolean dropItemsIfDestroyed = false; + public boolean notifyOwnerIfDestroyed = true; // Keep grave after it's looted @Comment("If true, graves will persist when claiming them, and right clicking on them after that will let you know when and how they died. Can also then be mined") @ConfigEntry.Gui.CollapsibleObject diff --git a/src/main/resources/assets/yigd/lang/en_us.json b/src/main/resources/assets/yigd/lang/en_us.json index bb256f4..d7e0ffd 100644 --- a/src/main/resources/assets/yigd/lang/en_us.json +++ b/src/main/resources/assets/yigd/lang/en_us.json @@ -150,6 +150,7 @@ "text.autoconfig.yigd.option.graveConfig.useStrictBlockBlacklist": "Use Replacement Blacklist (strict)", "text.autoconfig.yigd.option.graveConfig.replaceOldWhenClaimed": "Replace Previously Occupied Block When Claimed", "text.autoconfig.yigd.option.graveConfig.dropItemsIfDestroyed": "Drop Contents of Grave When Destroyed", + "text.autoconfig.yigd.option.graveConfig.notifyOwnerIfDestroyed": "Notify Owner If Destroyed", "text.autoconfig.yigd.option.graveConfig.persistentGraves": "Persistent Graves", "text.autoconfig.yigd.option.graveConfig.persistentGraves.enabled": "Persistent Graves", "text.autoconfig.yigd.option.graveConfig.persistentGraves.showDeathDay": "Show Death Day",