[SPIGOT-7665] CraftThrownPotion getEffects() only returns customEffects Created: 09/May/24 Updated: 25/Dec/24 Resolved: 10/May/24 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Mersphydena | Assignee: | Doc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Version: | 4156-Spigot-e2c1eee-428aefe (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) |
| Guidelines Read: | Yes |
| Description |
|
should be for (MobEffectInstance effect : this.getHandle().getItem().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).getAllEffects()) {
@EventHandler public void onPotionSplash(PotionSplashEvent event) { ThrownPotion potion = event.getPotion(); Collection<PotionEffect> effects = event.getPotion().getEffects(); Bukkit.broadcastMessage("Potion effects: " + effects.size()); } |
| Comments |
| Comment by Doc [ 09/May/24 ] |
|
Thanks PR created https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1398/overview |