Made Animator abstract and added final modifiers
This commit is contained in:
parent
22e54557d8
commit
aa36097729
@ -13,9 +13,9 @@ import org.bukkit.util.Vector;
|
|||||||
* Self sufficient animator to animate task with steps using local vector logic
|
* Self sufficient animator to animate task with steps using local vector logic
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Animator
|
public abstract class Animator
|
||||||
{
|
{
|
||||||
private Plugin _plugin;
|
private final Plugin _plugin;
|
||||||
|
|
||||||
private TreeSet<AnimationPoint> _points = new TreeSet<>((a, b) -> Integer.compare(a.getTick(), b.getTick()));
|
private TreeSet<AnimationPoint> _points = new TreeSet<>((a, b) -> Integer.compare(a.getTick(), b.getTick()));
|
||||||
|
|
||||||
@ -147,12 +147,8 @@ public class Animator
|
|||||||
_repeat = repeat;
|
_repeat = repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void tick(Location loc)
|
protected abstract void tick(Location loc);
|
||||||
{
|
|
||||||
}
|
protected abstract void finish(Location loc);
|
||||||
|
|
||||||
protected void finish(Location loc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.util.Vector;
|
|||||||
public class AnimatorEntity extends Animator
|
public class AnimatorEntity extends Animator
|
||||||
{
|
{
|
||||||
|
|
||||||
private Entity _ent;
|
private final Entity _ent;
|
||||||
|
|
||||||
public AnimatorEntity(Plugin plugin, Entity ent)
|
public AnimatorEntity(Plugin plugin, Entity ent)
|
||||||
{
|
{
|
||||||
@ -33,4 +33,9 @@ public class AnimatorEntity extends Animator
|
|||||||
_ent.teleport(loc);
|
_ent.teleport(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void finish(Location loc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user