mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2025-02-05 11:52:42 +00:00
Don't supress potion effect removal if diff amplifier
This commit is contained in:
parent
c2a0b0fd32
commit
be129516c7
1 changed files with 2 additions and 4 deletions
|
@ -84,12 +84,8 @@ public class GiveEffectsFlagHandler extends HandlerWrapper
|
|||
private void check(Player player, ApplicableRegionSet set)
|
||||
{
|
||||
Set<PotionEffect> potionEffects = WorldGuardUtils.queryValue(player, player.getWorld(), set.getRegions(), Flags.GIVE_EFFECTS);
|
||||
|
||||
|
||||
if (potionEffects != null && potionEffects.size() > 0)
|
||||
{
|
||||
this.supressRemovePotionPacket = true;
|
||||
|
||||
try
|
||||
{
|
||||
for (PotionEffect effect : potionEffects)
|
||||
|
@ -103,6 +99,8 @@ public class GiveEffectsFlagHandler extends HandlerWrapper
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.supressRemovePotionPacket = effect_ != null && effect_.getAmplifier() == effect.getAmplifier();
|
||||
|
||||
if (this.givenEffects.add(effect.getType()) && effect_ != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue