Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface for Inventories #89

Closed
wants to merge 1 commit into from
Closed

Add interface for Inventories #89

wants to merge 1 commit into from

Conversation

RenegadeEagle
Copy link

I have not seen anything about inventories been added yet, so here is this. One notable difference here is we can set the title of the inventory hopefully, unlike you can in Bukkit. (Where you would have to create a new inventory object and change the name)

@viveleroi
Copy link
Contributor

Please see #9, some pretty good discussion

@RenegadeEagle
Copy link
Author

Seems that @botskonet has already beaten me too it.

@viveleroi
Copy link
Contributor

I don't think you should have the ability to change the name of any inventory, since this will often represent vanilla/mod inventories. For plugin-created inventories, then setting a name is fine.

@RenegadeEagle
Copy link
Author

@botskonet That is true, but I can think of some cool things you can do if you can change the name of an [custom] inventory while the player has it open.

@viveleroi
Copy link
Contributor

As long as the inventory has a better method of identification, I believe with Bukkit the only way you can tell it's a fake inv vs chest, etc is by checking the name.

@RenegadeEagle
Copy link
Author

@botskonet Inventory Type is one way.

@viveleroi
Copy link
Contributor

But that's an ENUM which doesn't allow for custom types, other than CUSTOM or something. If I've made a "slots" minigame inventory or a mailbox inventory I need to be able to differentiate between the two.

@RenegadeEagle
Copy link
Author

Oh, then yes. Maybe we should implement a UUID system? @botskonet

@ryantheleach
Copy link
Contributor

Then why should it be an Enum at all? You could create a class that extended a known inventory.

Titling inventories (or at least containers) already happens in vanilla.

I even made a plugin to control it in bukkit, http://dev.bukkit.org/bukkit-plugins/project-71213/

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.

None yet

3 participants