mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 02:31:43 +01:00
Expand LingeringPotion API
This commit is contained in:
parent
b7be7d6807
commit
e93201e90b
@ -272,7 +272,7 @@
|
||||
+ boolean noEffects = potioncontents.hasEffects(); // Paper - Fix potions splash events
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
|
||||
+ if (!(event.isCancelled() || entityareaeffectcloud.isRemoved() || (noEffects && !entityareaeffectcloud.potionContents.hasEffects()))) { // Paper - don't spawn area effect cloud if the effects were empty and not changed during the event handling
|
||||
+ if (!(event.isCancelled() || entityareaeffectcloud.isRemoved() || (!event.allowsEmptyCreation() && (noEffects && !entityareaeffectcloud.potionContents.hasEffects())))) { // Paper - don't spawn area effect cloud if the effects were empty and not changed during the event handling
|
||||
+ this.level().addFreshEntity(entityareaeffectcloud);
|
||||
+ } else {
|
||||
+ entityareaeffectcloud.discard(null); // CraftBukkit - add Bukkit remove cause
|
||||
|
Loading…
Reference in New Issue
Block a user