mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Add permission to right click sign editor
This commit is contained in:
@@ -41,3 +41,7 @@ need to be granted the permissions you want them to have using a permissions plu
|
|||||||
* **purpur.place.spawners**
|
* **purpur.place.spawners**
|
||||||
- **description**: Players with this permission can place down a spawner cage and
|
- **description**: Players with this permission can place down a spawner cage and
|
||||||
have the mob type restored to what it was when it was mined using silk touch.
|
have the mob type restored to what it was when it was mined using silk touch.
|
||||||
|
|
||||||
|
* **purpur.sign.click.opens.editor**
|
||||||
|
- **description**: Allows players to open the sign editor when right clicking a sign
|
||||||
|
while holding a sign.
|
||||||
|
|||||||
@@ -1,24 +1,25 @@
|
|||||||
From d3ac2ab0ac6e0054d8a0c2fbcf36128e89eb223c Mon Sep 17 00:00:00 2001
|
From 1408ae17dfcb8f7f9936aa8f5ff502fefd77eab1 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Fri, 24 May 2019 02:39:25 -0500
|
Date: Fri, 24 May 2019 02:39:25 -0500
|
||||||
Subject: [PATCH] Right click to open sign editor
|
Subject: [PATCH] Right click to open sign editor
|
||||||
|
|
||||||
---
|
---
|
||||||
src/main/java/net/minecraft/server/BlockSign.java | 10 ++++++++++
|
src/main/java/net/minecraft/server/BlockSign.java | 11 +++++++++++
|
||||||
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
||||||
2 files changed, 15 insertions(+)
|
2 files changed, 16 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
|
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
|
||||||
index e058a85ba6..b1e0e9435f 100644
|
index e058a85ba..8cf92d7a7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockSign.java
|
--- a/src/main/java/net/minecraft/server/BlockSign.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockSign.java
|
+++ b/src/main/java/net/minecraft/server/BlockSign.java
|
||||||
@@ -52,6 +52,16 @@ public abstract class BlockSign extends BlockTileEntity implements IBlockWaterlo
|
@@ -52,6 +52,17 @@ public abstract class BlockSign extends BlockTileEntity implements IBlockWaterlo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Purpur start - right click to open sign editor
|
+ // Purpur start - right click to open sign editor
|
||||||
+ if (world.purpurConfig.editableSigns && itemstack.getItem() instanceof ItemSign &&
|
+ if (world.purpurConfig.editableSigns && itemstack.getItem() instanceof ItemSign &&
|
||||||
+ !entityhuman.isSneaking() && entityhuman.abilities.mayBuild) {
|
+ !entityhuman.isSneaking() && entityhuman.abilities.mayBuild &&
|
||||||
|
+ entityhuman.getBukkitEntity().hasPermission("purpur.sign.click.opens.editor")) {
|
||||||
+ tileentitysign.isEditable = true;
|
+ tileentitysign.isEditable = true;
|
||||||
+ tileentitysign.a(entityhuman);
|
+ tileentitysign.a(entityhuman);
|
||||||
+ entityhuman.openSign(tileentitysign);
|
+ entityhuman.openSign(tileentitysign);
|
||||||
@@ -30,7 +31,7 @@ index e058a85ba6..b1e0e9435f 100644
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
index dc2da586e7..ee92fd26e6 100644
|
index 8d1f3feb8..383e7d5d5 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
@@ -61,6 +61,11 @@ public class PurpurWorldConfig {
|
@@ -61,6 +61,11 @@ public class PurpurWorldConfig {
|
||||||
@@ -46,5 +47,5 @@ index dc2da586e7..ee92fd26e6 100644
|
|||||||
private void campfireObeysGravity() {
|
private void campfireObeysGravity() {
|
||||||
campfireObeysGravity = getBoolean("campfire-obeys-gravity", campfireObeysGravity);
|
campfireObeysGravity = getBoolean("campfire-obeys-gravity", campfireObeysGravity);
|
||||||
--
|
--
|
||||||
2.20.1
|
2.23.0.rc1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user