Add permission for F3+N debug

This commit is contained in:
William Blake Galbreath
2019-12-28 04:30:59 -06:00
parent 4671e9ae2d
commit 7cebbf6ce4
2 changed files with 28 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ need to be granted the permissions you want them to have using a permissions plu
Hold spacebar while not moving to charge the toggle. Instead of blowing up the powered
state will toggle on or off.
* **purpur.debug.f3n**
- **description**: Allows the use of the F3+N debug hotkey to swap gamemodes.
Player must have this perm _and_ the gamemode perm for it to work.
* **purpur.drop.spawners**
- **description**: Players with this permission can use a diamond pickaxe with silk
touch enchantment to mine up any spawner cage instead of disappearing.

View File

@@ -0,0 +1,24 @@
From 58c42c906efcb19a5f6f3bc28d589165f96c5f39 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 28 Dec 2019 04:21:54 -0600
Subject: [PATCH] Add permission for F3+N debug
---
src/main/java/net/minecraft/server/PlayerList.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6398c367f..c48933cd6 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -904,6 +904,7 @@ public abstract class PlayerList {
} else {
b0 = (byte) (24 + i);
}
+ if (b0 < 28 && entityplayer.getBukkitEntity().hasPermission("purpur.debug.f3n")) b0 = 28; // Purpur
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0));
}
--
2.24.0