aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorchickeneer <[email protected]>2016-06-08 20:41:10 -0400
committerAikar <[email protected]>2016-06-08 20:41:10 -0400
commit171a079cd27da50d67ab4d5c68bbc672e7080e9d (patch)
tree4587aaffee9d8358689fd3457d3d23eb92181bee
parent3201cfe07a30f6202ec8f3f18a4ffeeb4debb7e5 (diff)
downloadPaper-171a079cd27da50d67ab4d5c68bbc672e7080e9d.tar.gz
Paper-171a079cd27da50d67ab4d5c68bbc672e7080e9d.zip
Fix Potion Equals Bug
Will be in Spigot 1.10, but getting it in for 1.9 users
-rw-r--r--Spigot-Server-Patches/0165-Fix-Potion-Equals-Bug.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0165-Fix-Potion-Equals-Bug.patch b/Spigot-Server-Patches/0165-Fix-Potion-Equals-Bug.patch
new file mode 100644
index 0000000000..280099d38d
--- /dev/null
+++ b/Spigot-Server-Patches/0165-Fix-Potion-Equals-Bug.patch
@@ -0,0 +1,35 @@
+From 8804e12da0dc696a8280f2116118f8bbb233374a Mon Sep 17 00:00:00 2001
+From: chickeneer <[email protected]>
+Date: Wed, 8 Jun 2016 20:39:19 -0400
+Subject: [PATCH] Fix Potion Equals Bug
+
+Will be in Spigot 1.10, but getting it in for 1.9 users
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
+index 5a8b77a..d7d3d92 100644
+--- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
++++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
+@@ -58,13 +58,15 @@ public class CraftPotionUtil {
+ .build();
+
+ public static String fromBukkit(PotionData data) {
++ String type;
+ if (data.isUpgraded()) {
+- return upgradeable.get(data.getType());
++ type = upgradeable.get(data.getType());
++ } else if (data.isExtended()) {
++ type = extendable.get(data.getType());
++ } else {
++ type = regular.get(data.getType());
+ }
+- if (data.isExtended()) {
+- return extendable.get(data.getType());
+- }
+- return regular.get(data.getType());
++ return "minecraft:" + type;
+ }
+
+ public static PotionData toBukkit(String type) {
+--
+2.8.4
+