mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Add new permissions and register some existing ones (#1157)
This commit is contained in:
@@ -5,16 +5,15 @@ Subject: [PATCH] Totems work in inventory
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 500b702e2d2b6ba4df07d1fb3e85d632feece76c..7d76ccd2a73209565735a2b2efafe7fd60089e52 100644
|
||||
index 500b702e2d2b6ba4df07d1fb3e85d632feece76c..4eb8920a94304dd12ea94850deda96ff841e024a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1546,6 +1546,19 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1546,6 +1546,18 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ if (level.purpurConfig.totemOfUndyingWorksInInventory && this instanceof ServerPlayer && (itemstack == null || itemstack.getItem() != Items.TOTEM_OF_UNDYING)) {
|
||||
+ ServerPlayer player = (ServerPlayer) this;
|
||||
+ if (level.purpurConfig.totemOfUndyingWorksInInventory && this instanceof ServerPlayer player && (itemstack == null || itemstack.getItem() != Items.TOTEM_OF_UNDYING) && player.getBukkitEntity().hasPermission("purpur.inventory_totem")) {
|
||||
+ for (ItemStack item : player.getInventory().items) {
|
||||
+ if (item.getItem() == Items.TOTEM_OF_UNDYING) {
|
||||
+ itemstack1 = item;
|
||||
|
||||
Reference in New Issue
Block a user