mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 13:12:03 -07:00
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
--- a/net/minecraft/server/commands/EffectCommands.java
|
|
+++ b/net/minecraft/server/commands/EffectCommands.java
|
|
@@ -182,7 +_,7 @@
|
|
for (Entity entity : targets) {
|
|
if (entity instanceof LivingEntity) {
|
|
MobEffectInstance mobEffectInstance = new MobEffectInstance(effect, i1, amplifier, false, showParticles);
|
|
- if (((LivingEntity)entity).addEffect(mobEffectInstance, source.getEntity())) {
|
|
+ if (((LivingEntity)entity).addEffect(mobEffectInstance, source.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
i++;
|
|
}
|
|
}
|
|
@@ -212,7 +_,7 @@
|
|
int i = 0;
|
|
|
|
for (Entity entity : targets) {
|
|
- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeAllEffects()) {
|
|
+ if (entity instanceof LivingEntity && ((LivingEntity)entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
i++;
|
|
}
|
|
}
|
|
@@ -237,7 +_,7 @@
|
|
int i = 0;
|
|
|
|
for (Entity entity : targets) {
|
|
- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeEffect(effect)) {
|
|
+ if (entity instanceof LivingEntity && ((LivingEntity)entity).removeEffect(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
|
|
i++;
|
|
}
|
|
}
|