Jump to content

Recommended Posts

Posted

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!

Posted

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!

Posted

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!

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.