Mineplex2018-withcommit/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/MagneticBlade.java

39 lines
770 B
Java
Raw Normal View History

package mineplex.game.clans.items.legendaries;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
public class MagneticBlade extends LegendaryItem
{
public MagneticBlade()
{
}
@Override
public void update(Player wielder)
{
if (isHoldingRightClick() && canPull())
{
pullPlayers(wielder);
}
}
@Override
public void onAttack(EntityDamageByEntityEvent event, Player wielder)
{
// TODO: Apply negative knockback with [???] velocity/power to victims of attacks
}
private void pullPlayers(Player player)
{
// TODO: Grab all players in line of sight and pull towards player with ??? velocity
}
private boolean canPull()
{
return true; // TODO: Implement cooldown? (Sounds OP without one)
}
}