-
Notifications
You must be signed in to change notification settings - Fork 57
TerminatorPlus Bot GUI #38
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
base: master
Are you sure you want to change the base?
Conversation
…iven info in the GUI.
The last picture is supposed to be the command /bot info (name). I labeled it incorrectly. |
Rewrite bot UI to use menu framework
rewrote the gui to use a menu framework, I ported the framework from 1.8 so there may be a bug or two, but it works |
Is there a specific reason this PR is still open? Seems like a cool feature |
I can't believe I still get notifications 3 years after this. It would be cool to see this finally merged hahaha. I could totally hop back on this project and get the GUI up to spec for the current plugin. |
Sorry for the notification 😅 I saw the PR and thought it was quite cool |
No worries! I love staying updated on cool projects like this. |
I'll have another look at this pr when I have time. Currently busy for the next 2-ish weeks. |
The main change that this pull request makes is the bot viewing GUI that is implemented. The GUI offers features like removing individual bots and viewing their stats, the GUI offers a page system to scale with any number of bots as well.
Now for the technical jargon of this pull request, in the bot class I have added one public method (botLore()), for grabbing some stats from the bot in a list of strings, this is mainly for the lore of the heads displayed on the GUI. I have also added one private variable (skinName), this is so the bot's head appears as the correct skin, not the skin the bot's display name is linked to. I've added a ui package to the project, this is to keep everything organized and tidy (along with fitting the style of the rest of the project). This ui package is where most of the new code lies. I won't talk too much about it here since it would take a lot of time, but the GUI for a single bot and the GUI for all the bots are separate classes. There is also an event handler to make sure interactions in these inventories (GUIs) go smoothly, we don't want people pulling items out of that. The UIManager also holds some relevant information, like HashMaps linking players to the inventories they are currently in (useful for seeing what they are clicking on). Lastly, I added a public method to PlayerUtils (getPlayerHead()) that returns an itemstack that is a model of the player's head, with the name it was given as it's one parameter.
Finally, below are some screenshots of the new GUI system at work. If you would like to see more, just dm me on discord (I'm aclownsquad).
Using /bot info:

Clicking on a bot in /bot info:

Using /bot info :
