mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@6bb9dc6b Normalize and trim spaces in Player#performCommand (#12892) PaperMC/Paper@840dd9e1 Fix dialog preconditions (#12895) PaperMC/Paper@9ccc51df Fix legacy pearls forgetting owner on disconnect (#12884) PaperMC/Paper@57c13137 Allow to change despawnInPeaceful (#12880) PaperMC/Paper@a5763618 Add WorldDifficultyChangeEvent (#12471) PaperMC/Paper@dbc367ba Keep non-container slots synced when in container view (#12881)
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Tue, 22 Jul 2025 22:31:58 +0200
|
|
Subject: [PATCH] Op lock
|
|
|
|
|
|
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
|
index 7d1c836f55c16ad6afd135ce167f217bb5f56527..bf27a86a3764dbc8132a26ce4adafa9e9ed0f27f 100644
|
|
--- a/net/minecraft/server/players/PlayerList.java
|
|
+++ b/net/minecraft/server/players/PlayerList.java
|
|
@@ -1210,6 +1210,9 @@ public abstract class PlayerList {
|
|
}
|
|
|
|
public void op(GameProfile profile) {
|
|
+ if (org.dreeam.leaf.config.modules.misc.OpLock.preventOpChanges) {
|
|
+ return;
|
|
+ }
|
|
this.ops.add(new ServerOpListEntry(profile, this.server.getOperatorUserPermissionLevel(), this.ops.canBypassPlayerLimit(profile)));
|
|
ServerPlayer player = this.getPlayer(profile.getId());
|
|
if (player != null) {
|
|
@@ -1218,6 +1221,9 @@ public abstract class PlayerList {
|
|
}
|
|
|
|
public void deop(GameProfile profile) {
|
|
+ if (org.dreeam.leaf.config.modules.misc.OpLock.preventOpChanges) {
|
|
+ return;
|
|
+ }
|
|
this.ops.remove(profile);
|
|
ServerPlayer player = this.getPlayer(profile.getId());
|
|
if (player != null) {
|