mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2025-07-03 06:06:41 +00:00
Migrates the entire package nomenclature to be more direct and straightforward. (#17)
Signed-off-by: Paul Reilly <pawereus@gmail.com>
This commit is contained in:
30
Fossil/src/main/java/fns/fossil/items/ClownfishItem.java
Normal file
30
Fossil/src/main/java/fns/fossil/items/ClownfishItem.java
Normal file
@ -0,0 +1,30 @@
|
||||
package fns.fossil.items;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public final class ClownfishItem extends ShopItem
|
||||
{
|
||||
public ClownfishItem()
|
||||
{
|
||||
super(Material.TROPICAL_FISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runAction(final @NotNull Player user, final @Nullable Entity target)
|
||||
{
|
||||
if (target == null) return;
|
||||
|
||||
final Location location = user.getEyeLocation()
|
||||
.clone();
|
||||
final Vector vector = location.getDirection()
|
||||
.multiply(2);
|
||||
|
||||
target.setVelocity(vector);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user