diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/MineplexLinkImpl.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/MineplexLinkImpl.java index 6195a3fd2..f2e450e7f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/MineplexLinkImpl.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/MineplexLinkImpl.java @@ -1,14 +1,18 @@ package mineplex.core.antihack; import net.minecraft.server.v1_8_R3.MinecraftServer; +import net.minecraft.server.v1_8_R3.MobEffect; import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; +import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffectType; import com.mineplex.anticheat.api.MineplexLink; import mineplex.core.Managers; +import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilPlayer; import mineplex.core.disguise.DisguiseManager; import mineplex.core.disguise.disguises.DisguiseBase; @@ -47,4 +51,29 @@ public class MineplexLinkImpl implements MineplexLink { return ((CraftPlayer) player).getHandle().bS(); // See Anticheat javadoc } + + @Override + public int allocateNewEntityID() + { + return UtilEnt.getNewEntityId(); + } + + @Override + public boolean isUsingElytra(Player player) + { + return ((CraftPlayer) player).getHandle().isGliding(); + } + + @Override + public int getLevitationAmplifier(Player player) + { + MobEffect effect = ((CraftPlayer) player).getHandle().effects.get(PotionEffectType.LEVITATION.getId()); + return effect == null ? -1 : effect.getAmplifier(); + } + + @Override + public boolean canDamage(Player attacker, Entity target) + { + return true; + } }