PotionData arguments flipped in Potion.toItemStack

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: None

      The PotionData constructor used in org.bukkit.potion.Potion.toItemStack is:

      PotionData(PotionType type, boolean extended, boolean upgraded)
      

      but the upgraded & extended arguments are flipped (Potion, line 324)

      meta.setBasePotionData(new PotionData(type, level == 2, extended));
      

      changing the above to

      meta.setBasePotionData(new PotionData(type, extended, level == 2));
      

      seems to fix the java.lang.IllegalArgumentException: Potion Type is not upgradable (and similar) errors I've been getting since the reworked potions API commits.

            Assignee:
            Unassigned
            Reporter:
            zreed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: