mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Tue, 23 Mar 2021 15:01:03 -0500
|
|
Subject: [PATCH] Add enchantment target for bows and crossbows
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java
|
|
index 635e07a6b0e255c4fdad58ba9d281c807af4e229..93d5fad641c5afa679b59dc712f0d0faaddcfe2e 100644
|
|
--- a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java
|
|
+++ b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java
|
|
@@ -226,6 +226,18 @@ public enum EnchantmentTarget {
|
|
public boolean includes(@NotNull Material item) {
|
|
return BREAKABLE.includes(item) || (WEARABLE.includes(item) && !item.equals(Material.ELYTRA)) || item.equals(Material.COMPASS);
|
|
}
|
|
+ // Purpur start
|
|
+ },
|
|
+
|
|
+ /**
|
|
+ * Allow the Enchantment to be placed on bows and crossbows.
|
|
+ */
|
|
+ BOW_AND_CROSSBOW {
|
|
+ @Override
|
|
+ public boolean includes(@NotNull Material item) {
|
|
+ return item.equals(Material.BOW) || item.equals(Material.CROSSBOW);
|
|
+ }
|
|
+ // Purpur end
|
|
};
|
|
|
|
/**
|