mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
save stuff here
This commit is contained in:
@@ -5,7 +5,7 @@ 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 637d90f2f5e9f8807516a757ef82d5b2014c752b..1d0d22c9d3b8c907502b8fb044ebf8c5c49f6885 100644
|
||||
index 20b3b2deae7b72cc16f5e47ad73fab4d9779d047..27df4e881e850a73947651ce7ad98df5159f4c1c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1592,6 +1592,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -13,7 +13,7 @@ index 637d90f2f5e9f8807516a757ef82d5b2014c752b..1d0d22c9d3b8c907502b8fb044ebf8c5
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ if (level.purpurConfig.totemOfUndyingWorksInInventory && this instanceof ServerPlayer player && (itemstack == null || itemstack.getItem() != Items.TOTEM_OF_UNDYING) && player.getBukkitEntity().hasPermission("purpur.inventory_totem")) {
|
||||
+ 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;
|
||||
@@ -28,7 +28,7 @@ index 637d90f2f5e9f8807516a757ef82d5b2014c752b..1d0d22c9d3b8c907502b8fb044ebf8c5
|
||||
EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
|
||||
event.setCancelled(itemstack == null);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index bb136d077690654a8fa62a2aad73134487d07bd9..37f72c2812c8041a36fd7ec117e9274a8f2817c0 100644
|
||||
index 1a880d0a1235fc223ca3a84e2695cd8c0dccfdee..e59f52a32f6300f5d2048a27bfa590f26432cdd0 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -247,6 +247,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user