Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added API to set the name of an inventory#754

Closed
keir-nellyer wants to merge 1 commit into
Bukkit:masterfrom
keir-nellyer:master
Closed

Added API to set the name of an inventory#754
keir-nellyer wants to merge 1 commit into
Bukkit:masterfrom
keir-nellyer:master

Conversation

@keir-nellyer

Copy link
Copy Markdown

This does not work for all types of Inventories due to a minecraft limitation (Such as Furnaces). This commit will allow players to change the name (title) of inventories.

CraftBukkit PR: Bukkit/CraftBukkit#992
Jira: https://bukkit.atlassian.net/browse/BUKKIT-3432
Test Plugin (all chests titles will be renamed): http://www.box.net/s/azf35yocux0tog4liifh

@spaceemotion

Copy link
Copy Markdown

+1

@mbax

mbax commented Jan 16, 2013

Copy link
Copy Markdown
Member

I disagree on this PR, specifically putting the method in Inventory. I propose a NameableEntity interface.

Reasoning:
In 1.5 (Well, the prereleases currently) you can provide custom names for most things with inventories and all livingentities (Except players? I think?). With Villagers, this custom name is the same for both the name tag that can be toggled enabled overhead and the inventory menu for trading with that villager. For chests and other inventories it affects the inventory display as well.

@md-5

md-5 commented Jan 16, 2013

Copy link
Copy Markdown
Contributor

But Villagers themselves are an inventory and I think it should go there.

@keir-nellyer

Copy link
Copy Markdown
Author

Ok, I might try that. Could we use the Nameable class for items too since
they can be renamed now?

@mbax

mbax commented Jan 16, 2013

Copy link
Copy Markdown
Member

@md-5 villagers contain an inventory, but do Bats? Do Sheep?

@md-5

md-5 commented Jan 16, 2013

Copy link
Copy Markdown
Contributor

@mbax but we are talking about containers, not entities....

@mbax

mbax commented Jan 16, 2013

Copy link
Copy Markdown
Member

@md-5 Inventory names are about to come from their associated entities and tileentities. I argue it'd be better as a consistent Interface that could be applied to livingentities and blockstates. :)

@gmcferrin

Copy link
Copy Markdown
Contributor

@iKeirNez This needs to be updated to the latest version of Bukkit.

@Wolvereness

Copy link
Copy Markdown
Contributor

Abandoned.

@Wolvereness Wolvereness closed this Aug 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants