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

Purpur Changes:
PurpurMC/Purpur@998a4e6 [ci skip] add a good chunk of patch identifying comments
PurpurMC/Purpur@e440784 [ci skip] a couple more patch identifying comments
PurpurMC/Purpur@c33391b Updated Upstream (Paper)
PurpurMC/Purpur@8d7fab1 [ci skip] small patch comment cleanup
2024-12-16 20:56:44 +03:00

34 lines
2.2 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 b51b0b0f48b1da6187387d6ec025681e10ed584d..507b94fe816596e381434cf2e160bdee8023d337 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 {
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 27c45545e1e9ad6ea88e65c884c5a4955fc1c80c..882e08b1eef89dd01129c89aa5fa1094d35788c5 100644
--- a/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java
+++ b/src/main/java/space/bxteam/divinemc/configuration/DivineConfig.java
@@ -154,4 +154,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);
+ }
}