Acquized / ItemBuilder

Create ItemStacks with Displayname, Material, Lore, ItemFlags etc. with just one Line of Code
Apache License 2.0
12 stars 11 forks source link

1.9: Item Attributes #5

Open Acquized opened 8 years ago

Acquized commented 8 years ago

[Feature Requestment] I looked trough Spigot and saw that a User named Michel_0 created a Resource named Item attribute modifier API. That API allows to add special Item Attributes to ItemStacks. These Attributes allow for example adding extra attack damage to weapons, add special knockback or armor defense points to armor and more.

I PM'd him and he said that i'm allowed to put the source into ItemBuilder. He also said that he is going to release a PreRelease containing his API with ItemBuilder. We are looking forward to implement it. If he can implement it, i will add him as Contributor on both the Spigot Page and here on GitHub.

Evidence

Here is a list of Todos before pushing and releasing the Update sorted by priority and assignee at the end:

Kev575 commented 8 years ago

First of all, the API is cool, nearly awesome!

It could be done, but the size of the plugin is ~ 66 kilobytes and ItemBuilder is exactly 29.776 kilobytes. The size together might be a little bit too big, but the API is so cool, that it doesn't really matter. Maybe the API could be implemented as a lite version :D

Acquized commented 8 years ago

I need to say that the actual Plugin Size (code only) is around ~ 22 kb, the .jar File you can download contains Javadocs and raw .java Files & Junk Files. Also, i don't see why the ItemBuilder isn't allowed to be that big but okay. I'm pretty sure he will implement the full version. I will make it that you can access it using unsafe().

Kev575 commented 8 years ago

You're right! It was just a thought, but there is no real argument for it. the unsafe() way is the best access way. And how do you think about the Milestones?

Acquized commented 8 years ago

I think its a good idea with the Milestones, but i'm going to remove the above 1.9 and replace it with 1.9. All other quick fixes should be named 1.8.x. You are going to see.

Kev575 commented 8 years ago

Your's is better.

Acquized commented 8 years ago

Actually found out that you can't have 2 official assignees, leaving it just at me. Could you edit my main Comment and write in the todo list which things you want to do? You have don't to, if you don't want.

Kev575 commented 8 years ago

Yes, I know. You can have more labels, but only 1 assignee and 1 milestone. I'll add something when I have some more ideas.

Acquized commented 8 years ago

Added the v1.9 Branch as Developement Branch for the Attribute Update 1.9. If you have Ideas or implemented something, please push it to the v1.9 branch. The WrappedItemBuilder is a sub class that contains the WIP Code. I will implement anything in the original ItemBuilder Class when anything works and delete the file. I just maked it so i can see which changes i have done and don't need to see any other codes from v1.8 etc.

Kev575 commented 8 years ago

Just added some Validate methods for protection.

Acquized commented 8 years ago

Thanks, i also saw that a IndexOutOfBoundException occures when i use a Method, going to fix later tonight.

Acquized commented 8 years ago

Fixed the IndexOutOfBoundException. I sended a Message to Michel_0 that he should look over the code if i did anything wrong. I'm looking forward for his reply and i will post it then here.

Acquized commented 8 years ago

I added quickly has()... Methods, @Kev575 could you please create JavaDocs for it, i currently don't have much time.

Kev575 commented 8 years ago

I'll do tomorrow. Don't have much time neither.

Acquized commented 8 years ago

Still Waiting for Michel_0 to review the Code. As soon he did it, i will push the Stable Version of it to the master Branch.

Acquized commented 8 years ago

It is now possible to do multiple Assignees. Thanks GitHub.