Posted February 5, 201510 yr So I want to get parameters from /summon. Example: "/summon MinionSkeletonMod.Minion ~ ~ ~ {owner:"AwesomePlayer"}" And I want to get the owner part in my entity class. So how does minecraft save that? And how would I get it? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author NBT. Once your entity is created, readFromNBT will be called with an NBTTagCompound that has the data. In this case owner: "AwesomePlayer". By the way: name changes are possible now, use UUIDs, not usernames. Yeah will do that. Just for the sake of an example I used a username. I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author Follow up question. Is there a way of doing getPlayerByUUID or something? If there isnt, is there a place where I can get all the online player UUIDs so I can loop through them? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author In 1.8: MinecraftServer().getServer().getConfigurationManager().getPlayerByUUID(<uuid>) In 1.7 you have to loop manually I think. Im using 1.7. So what holds all the UUIDs of the players online? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.