mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed broken isWaterBottle() check
This commit is contained in:
parent
30085e1e34
commit
dedbdf890a
@ -7,6 +7,7 @@ import java.util.Map.Entry;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
import org.bukkit.potion.Potion;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
||||
public class AlchemyPotion {
|
||||
@ -50,6 +51,10 @@ public class AlchemyPotion {
|
||||
return potion;
|
||||
}
|
||||
|
||||
public Potion toPotion(int amount) {
|
||||
return Potion.fromItemStack(this.toItemStack(amount));
|
||||
}
|
||||
|
||||
public short getDataValue() {
|
||||
return dataValue;
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.gmail.nossr50.datatypes.skills.alchemy;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.Potion;
|
||||
|
||||
public enum PotionStage {
|
||||
@ -41,11 +39,11 @@ public enum PotionStage {
|
||||
}
|
||||
|
||||
private static boolean isWaterBottle(AlchemyPotion input) {
|
||||
return input.getEffects().isEmpty();
|
||||
return input.toPotion(1).getEffects().isEmpty();
|
||||
}
|
||||
|
||||
public static PotionStage getPotionStage(AlchemyPotion alchemyPotion) {
|
||||
Potion potion = Potion.fromItemStack(new ItemStack(Material.POTION, 1, alchemyPotion.getDataValue()));
|
||||
Potion potion = alchemyPotion.toPotion(1);
|
||||
|
||||
int stage = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user