Search code examples
javaminecraftbukkit

Is There a Way to Create Invisible Floating Armorstands That Can Move(Spigot API)?


Is there anyway to create an armorstand that is invisible to players and can float in air? I'm trying to make something like a boomerang that can be thrown but that requires an armorstand to show the boomerang itself. For example: Video. I use spigot-api-1.16.5-R0.1-20210220.225230-24 as my api.


Solution

  • Yes it is possible. You need to spawn in a armor stand, then disable the gravity for it using armorstand.setGravity(false), store it in a array, and then create a loop that runs every tick, and teleports it to the desired location.