unable to give spawn_egg to player
smmmadden opened this issue ยท 6 comments
EssentialsX version (/essentials
): 2.0.1 b532
Server software (/version
): Spigot 1.12.2 latest
Windows 10 Pro x64
BungeeCord Server 1.12.2 Build 1273
I first was trying to execute an existing command_block in my "creative" world and it was just throwing an Error: null and nothing else.
give smmmadden spawn_egg 1 0 {EntityTag:{id:Villager,Profession:0,CustomName:Abby,CustomNameVisible:1,Attributes:[{Name:"generic.maxHealth",Base:1000}]}}
So I removed the command_block and tried direct call from chat window. Same results. Removed all plugins except for those shown below - same results.
Went to my Vanilla Server which only has:
and was able to execute the command and get the egg.
So it's giving the impression that essentials is not working right. I verified on a survival server with the same setup as my creative and unable to give a spawn_egg to any player either by chat command or by command_block.
To use the vanilla syntax for the command, you need to prefix the command with minecraft:
. To my knowledge EssentialsX does not parse the Mojang JSON format for items in /give
.
Thanks Kakifrucht - that did it and it worked without error both as a command in chat and in a command_block. I received the egg in both cases and see:
Given [Spawn Villager] 1 to smmmadden*
when using the command of: /minecraft:give smmmadden spawn_egg 1 0 {EntityTag:{id:Villager,Profession:0,CustomName:Abby,CustomNameVisible:1,Attributes:[{Name:"generic.maxHealth",Base:1000}]}}
So what's changed that we would have to put in /minecraft:give and not just /give for the spawn_egg? I can use /give for other blocks.
EssentialsX and Minecraft provide completely independent commands with different implementations. EssentialsX does not support Mojang's JSON format for item data, which is what you're using to specify the spawn egg's NBT data.
that is correct. I tried with minecraft: and without. both were returning the Error: null
message. Is there some debugging I can turn on to find out where the error is coming from and what it believes is missing from the command?
If the command prefixed with minecraft:
returned the same message it means it still gets passed to Essentials. Are you sure you tried /minecraft:give ...
?
Works on my end. However I can confirm that Essentials give displays said error.
okay, I thought it was working at one point as the command block was used to spawn villagers. Is there a different format that should be used to spawn the same or is it that I just need to put minecraft:give so that we use that implementation and not EssentialsX ?
Is this also the case for other EssentialsX commands when using the JSON format in chat or command_block?