[SPIGOT-1899] PotionData arguments flipped in Potion.toItemStack Created: 12/Mar/16 Updated: 11/Jul/16 Resolved: 12/Mar/16 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | zreed | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | bug, potion | ||
| Issue Links: |
|
||||||||
| Description |
|
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. |
| Comments |
| Comment by md_5 [ 12/Mar/16 ] |
|
Thanks for the fix. |