9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-23 16:59:24 +00:00
Files
DivineMC/patches/server/0037-Option-to-disable-non-editable-sign-warning.patch
NONPLAYT 5862dabc8c Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@4b57bed Updated Upstream (Paper)
2024-10-21 21:00:44 +03:00

34 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Mon, 17 Jun 2024 16:21:15 +0300
Subject: [PATCH] Option to disable non editable sign warning
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index c9a1c071780351b584ad8e071ddc26f9a27e5964..5806cff8edc49cad4679b450ae651564d62fbc52 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -189,7 +189,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
this.setAllowedPlayerEditor((UUID) null);
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
} else {
- SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
+ if (!space.bxteam.divinemc.configuration.DivineConfig.disableNonEditableSignWarning) SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString()); // DivineMC - Option to disable warning
if (player.distanceToSqr(this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ()) < 32 * 32) // Paper - Dont send far away sign update
((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
}
diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java
index 8251cf1e42f159e3be874e4cc34498e6dcdec539..109396069426c4ae290cf20b52589e3649ed4543 100644
--- a/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java
+++ b/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java
@@ -152,4 +152,9 @@ public class DivineConfig {
}
return builder.build();
}
+
+ public static boolean disableNonEditableSignWarning = true;
+ private static void miscSettings() {
+ disableNonEditableSignWarning = getBoolean("settings.misc.disable-non-editable-sign-warning", disableNonEditableSignWarning);
+ }
}