mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix Potion Equals Bug
Will be in Spigot 1.10, but getting it in for 1.9 users
This commit is contained in:
parent
c9bf3f3819
commit
f53bec077b
1 changed files with 33 additions and 0 deletions
33
Spigot-Server-Patches/Fix-Potion-Equals-Bug.patch
Normal file
33
Spigot-Server-Patches/Fix-Potion-Equals-Bug.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: chickeneer <emcchickeneer@gmail.com>
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
|
||||
@@ -0,0 +0,0 @@ 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) {
|
||||
--
|
Loading…
Reference in a new issue