Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Made splash options abide by PVP settings. Fixes BUKKIT-542
Dieser Commit ist enthalten in:
Ursprung
f52665348e
Commit
da1aead88a
@ -93,6 +93,13 @@ public class EntityPotion extends EntityProjectile {
|
|||||||
MobEffect mobeffect = (MobEffect) iterator1.next();
|
MobEffect mobeffect = (MobEffect) iterator1.next();
|
||||||
int i = mobeffect.getEffectId();
|
int i = mobeffect.getEffectId();
|
||||||
|
|
||||||
|
// CraftBukkit start - abide by PVP settings
|
||||||
|
if (!this.world.pvpMode && entity instanceof EntityPlayer && entity != this.shooter) {
|
||||||
|
// Block SLOWER_MOVEMENT, SLOWER_DIG, HARM, BLINDNESS, HUNGER, WEAKNESS and POISON potions
|
||||||
|
if (i == 2 || i == 4 || i == 7 || i == 15 || i == 17 || i == 18 || i == 19) continue;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
if (MobEffectList.byId[i].b()) {
|
if (MobEffectList.byId[i].b()) {
|
||||||
MobEffectList.byId[i].a(this.shooter, (EntityLiving) entity, mobeffect.getAmplifier(), d1, this); // CraftBukkit - added 'this'
|
MobEffectList.byId[i].a(this.shooter, (EntityLiving) entity, mobeffect.getAmplifier(), d1, this); // CraftBukkit - added 'this'
|
||||||
} else {
|
} else {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren