diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/Animator.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/Animator.java index 2a3e72fcc..a6a3b7b39 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/Animator.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/Animator.java @@ -13,9 +13,9 @@ import org.bukkit.util.Vector; * 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 _points = new TreeSet<>((a, b) -> Integer.compare(a.getTick(), b.getTick())); @@ -147,12 +147,8 @@ public class Animator _repeat = repeat; } - protected void tick(Location loc) - { - } + protected abstract void tick(Location loc); + + protected abstract void finish(Location loc); - protected void finish(Location loc) - { - } - } diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/AnimatorEntity.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/AnimatorEntity.java index 663b822bb..99b216082 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/AnimatorEntity.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/animation/AnimatorEntity.java @@ -13,7 +13,7 @@ import org.bukkit.util.Vector; public class AnimatorEntity extends Animator { - private Entity _ent; + private final Entity _ent; public AnimatorEntity(Plugin plugin, Entity ent) { @@ -33,4 +33,9 @@ public class AnimatorEntity extends Animator _ent.teleport(loc); } + @Override + protected void finish(Location loc) + { + } + }