Prepare for 1.20.3 dev
This commit is contained in:
parent
931781c220
commit
2a1ace0cf2
1514 changed files with 528 additions and 530 deletions
|
@ -0,0 +1,27 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Tue, 27 Jun 2023 16:32:39 -0700
|
||||
Subject: [PATCH] Improve command function perm level checks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 0112035219b21550ca14fa1755c43a5547ca4136..56ae02aab93b9a698e9d2f07a0448aa4767169d9 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -212,8 +212,14 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
|
||||
// CraftBukkit start
|
||||
public boolean hasPermission(int i, String bukkitPermission) {
|
||||
- // World is null when loading functions
|
||||
- return ((this.getLevel() == null || !this.getLevel().getCraftServer().ignoreVanillaPermissions) && this.permissionLevel >= i) || this.getBukkitSender().hasPermission(bukkitPermission);
|
||||
+ // Paper start
|
||||
+ boolean hasPermissionLevel = this.permissionLevel >= i;
|
||||
+ if (this.source == CommandSource.NULL) {
|
||||
+ return hasPermissionLevel;
|
||||
+ } else {
|
||||
+ return (!this.getLevel().getCraftServer().ignoreVanillaPermissions && hasPermissionLevel) || this.getBukkitSender().hasPermission(bukkitPermission);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue