mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Update upstream
This commit is contained in:
parent
b8fb29dc77
commit
46e300045a
3 changed files with 4 additions and 25 deletions
|
@ -1,21 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 25 Jun 2017 19:38:09 -0400
|
||||
Subject: [PATCH] SPIGOT-3381: Alias SWEEPING to SWEEPING_EDGE
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index ac3a7f99..448fd8f8 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Enchantment {
|
||||
* @return Resulting Enchantment, or null if not found
|
||||
*/
|
||||
public static Enchantment getByName(String name) {
|
||||
+ if ("SWEEPING".equals(name)) {
|
||||
+ name = "SWEEPING_EDGE";
|
||||
+ }
|
||||
return byName.get(name);
|
||||
}
|
||||
|
||||
--
|
|
@ -144,7 +144,7 @@ index 3f11e4279..ebb3e04bc 100644
|
|||
|
||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 2bf7e9f35..523c14df0 100644
|
||||
index 724da6772..935cbe867 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -0,0 +0,0 @@ import java.lang.annotation.RetentionPolicy;
|
||||
|
@ -238,8 +238,8 @@ index 2bf7e9f35..523c14df0 100644
|
|||
- Map<Enchantment, Integer> enchantments = new HashMap<Enchantment, Integer>(ench.size());
|
||||
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
|
||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||
Enchantment enchantment = Enchantment.getByName(entry.getKey().toString());
|
||||
|
||||
// Doctor older enchants
|
||||
String enchantKey = entry.getKey().toString();
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d7cd7275f28ce2ace4dc2051e77a9c5ec80743f1
|
||||
Subproject commit 9de5cb59a07a5539caf2a30073e4c734ad58019d
|
Loading…
Reference in a new issue