-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Hi guys. I just discovered your work and it's really amazing. I was thinking about creating a menu creation library but you developed almost everything I need.
I'm now wondering about how to plug my item library into your framework.
As I am not familiar with your framework, I am creating this issue to exchange with you on this subject and to think about the best way to do what I need. I hope I am not disturbing you in doing so, and if I am, please excuse me and tell me how I should go about it (where to ask such questions).
To be precise it is based on 3 other libs I made (JsonLib, TranslationLib and event-wrapper-lib) but that does not change anything for your understanding.
ItemLib is currently private but it will be published with an open source license in the next months.
I would therefore like to slightly modify or extend your framework in order to meet several needs.
These are my needs:
1 - Show ItemStack according to the player's language.
- [In my lib] An ItemStack can be retrieved using:
- a String "technicalName" which is an unique identifier
- a Language (that can be retrieved from the player)
- [How ?] Could I extend GuiItem in order to do so. Is it possible to retrieve the player that will see the GUI when working with a GuiItem ?
2 - Translate every text according to the player's language
- [In my lib] A translated text can be retrieved using:
- a String "key" which is the translation key
- a Language (that can be retrieved from the player)
- [How ?] I don't even know every places where there can be a text message in your framework but since I saw you made adventure compatibility possible, maybe I could follow the same technical design to allow compatibility with my translation system. Or should I plug into adventure instead ?
3 - Be able to refresh/close a GUI according to an event (for example, if the GUI is related to a block and if another player destroy this block, the GUI should be closed)
- [How ?] Maybe you already have a similar feature but I could not find it in your documentation. I already imagined some ways to do so but I would prefer ask you first to avoid starting some bad implementation.
4 - Your library seems to be only working for Inventories but I would like to also modify the players shortcut bar. In order to do so I have to save the player's inventory (ItemLib does that well) and to replace it by a GUI until the player exit this menu. Do you think I could plug such a feature in your framework (and keep, for example, the pane feature) ?
If you wonder, my library (called, without more imagination, ItemLib) allows plugin developers to :
- Define all the plugin's items quickly and simply using JSON files.
- Let server owners modify those items in JSON files.
- Update those item data as a developer (and override the modifications done by server owners if required).
- Translate those item names and lore in multiple languages.
- Translate any other text (like messages).
- Define all the plugin's translations quickly and simply using JSON files.
- Let server owners modify those translations in JSON files.
- Update those translations as a developer (and override the modifications done by server owners if required).
- Set and modify the player lang.
- Listen to events related to each item and triggered according to the slot in which this object is located.
- This event system simplifies the detection of player clicks because it contains an ItemClickEvent that removes the complexities of the PlayerInterractEvent, EntityDamageByEntityEvent and PlayerAnimationEvent bukkit events.
- Save the player inventory and allow it to be restored automatically depending on event conditions (which can persist even after a server restart).
- Create/Modify ItemStacks using an ItemStackWrapper (and ItemStackUtils).
- Compare/Count/remove ItemStacks using ItemStackTrait (and ItemStackUtils).
- Create custom heads based on custom textures.
- Create items based on custom 3D models / textured according to a texture pack.
- 1.12-1.17 compatibility
Please advice