Skip to content

Commit

Permalink
Added config to disable the new 'tell owner if grave is destroyed' fe…
Browse files Browse the repository at this point in the history
…ature
  • Loading branch information
B1n-ry committed Feb 18, 2024
1 parent 8d2632e commit eeeef6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/b1n_ry/yigd/components/GraveComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/b1n_ry/yigd/config/YigdConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/yigd/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit eeeef6a

Please sign in to comment.