How do I remove a summoned Ender Dragon with no AI?

So I used the command /summon EnderDragon ~ ~ ~ {NoAI:1}
so that I would have an Ender Dragon that would just sit there.
I then wanted to get rid of it, but doing /killall EnderDragon
didn't work, neither did /killallnpc
, and I can't seem to do any damage, even with a diamond sword and maximum strength using commands.
I'm not sure why I can't get rid of it; I think it's because the dragon has no AI, but I need to get rid of it somehow, any ideas?
Best Answer
Use /kill @e[type=EnderDragon,r=100]
while you are in the same dimension as the Ender Dragon you want to kill. This command doesn't require any command blocks, so you can just type it in the chat.
Pictures about "How do I remove a summoned Ender Dragon with no AI?"



How do you summon the Ender dragon with no AI?
The main way to not take damage is going inside the ender portal, placing a bed, putting a block next to that bed and then right-clicking. Doing this negates the damage to 0 as the explosion does not go down to hit your legs and the block you placed prevents your head from being hit.How to Respawn the Ender Dragon
More answers regarding how do I remove a summoned Ender Dragon with no AI?
Answer 2
Using mincraft 1.11, /kill @e[type=ender_dragon]
will kill all enderdragons in your surroundings
Answer 3
try /kill @e[type=EnderDragon]
It normally works, unless you are on a server and you are not admin.
Answer 4
There is a command called /kill
There are different targets you can select like @a=all players,@s=self,@p=closest players to where the command was executed,@r=random player,@e=all entities
you also can direct it at a name or mob with [type=(mob name)]
However you claimed to want it to stay still so as for that there is two ways.
- Follow the enderdragon to x and z coordinantes (0,0) where the enderdragon will fly in circles like the end stopping briefly on 0,0.
2.type in the chat /give @s command_block
place the command block on creative mode and type in it /tp @e[type=enderdragon] (x y z of dragon placement)
make the command block repeating and always active so all dragons will teleport to the x y z 20 times every second or every .05 seconds. If the dragon destroys blocks type the command in chat /gamerule mobgriefing false
NOTE: creepers, ghasts, withers,(maybe silverfish), endermen and enderdragon will not break blocks after the last command unless you type
/gamerule mobgriefing false
Answer 5
try /kill @e [type=enderdragon] it worked for me <3
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Jo Kassis, Brett Jordan, Brett Jordan, Marek Piwnicki