Summoning an armor stand and rotating it?

Discussion in 'Plugin Development' started by 360_, Oct 15, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    360_

    So I'm trying to create a trackless ride system so I don't have to use Minecarts but I have no idea how to start but I managed to get this
    Code (open)
    Code:
    @Override
        public boolean onCommand(CommandSender sender, Command cmd, String lable, String[] args) {
            Player player = (Player) sender;
            if(sender instanceof Player){
                Bukkit.getWorld("World").spawnEntity(Location, Armor_Stand)
                player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cDEV test started"));
            }
            else {
                sender.sendMessage("HEY! Only players can run this");
            }
            return true;
        }
    All I want to know is how to rotate an armor stand and teleport it / move it. Hopefully, someone can link me to a wiki or something that explains how to do something similar to this
     
  2. Offline

    bennie3211

    Please first check if the sender is a player before casting it!! For the armor stand, what did you tried already?
     
  3. Offline

    360_

    Yeah ill fix that player thing, and i tried
    Bukkit.getWorld("World").spawnEntity(Location, Armor_Stand)
     
  4. Offline

    timtower Administrator Administrator Moderator

    @360_ Location needs to be a variable, not a class name.
    Armor_Stand probably needs to more like EntityType.ArmorStand (don't know the exact name)
     
Thread Status:
Not open for further replies.

Share This Page