CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Add reskinning of Wither Skeleton skulls #338

Closed riddle closed 9 years ago

riddle commented 9 years ago

Permission: mantle.perks.advskulls

Usage: /skull <Player> when holding a Wither Skeleton Skull

Replaces Wither Skeleton Skull with a specified player head (UUID-compatible, not sure how this is done in post-1.7.10 world).

This armor stand would have a golden name (&6)

Fake Nanobot template:

display:
  compound:
    Name: "&6<OriginalName>"
    Lore:
    - '&7Can be placed only by subscribers'
    - '&7in land they claimed by them.'
    - '&8Will disappear when unclaimed.'

Player heads cannot be turned back into Wither Skulls.

When a claim is removed, those custom skulls should be removed as well. This particular functionality could be added to Core, as it already handles unclaiming and resizing for liquids.

eliadil commented 9 years ago

Added, permission for command and placing/using skull as stated above.

Command is /perks skull <PlayerName> - mainly becuase just /skull <PlayerName> didnt want to work, and I was to lazy to think why, knowing that it takes 10 seconds to put in aliases. And there might be other perks commands.

Also, thanks to (and its a good thing) downloading the player skin being async, the skull name will have the exact same case as in command input.

eg. I type /perks skull GiNaW, it will create a skull with my skin, and it will be called GiNaW's head (gold, ofc)

Can this be done any better? Probably not, I dont think there is any way to hook into the async downloading of the skin.

EDIT : Aha, also it only works with 1 skull in hand - because I think it is safer than renaming a stack of grinded wither skulls at once, it is easier to code and player will for sure have place in inventory for it. Ofc there is a message saying whats up if used wrongly.

riddle commented 9 years ago

Command, makes sense.

I see about the name. I think it’s fine, if someone doesn’t like the name they can always run it again. :)

Re Edit: Good thinking!