Skip to content

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

joeybalardeta
Copy link

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:
2021-09-02_22 48 49

2021-09-02_22 49 07

Clicking on a bot in /bot info:
2021-09-02_22 49 22

2021-09-02_22 49 35

Using /bot info :
2021-09-02_22 31 53

@joeybalardeta
Copy link
Author

joeybalardeta commented Sep 3, 2021

The last picture is supposed to be the command /bot info (name). I labeled it incorrectly.

@Badbird5907
Copy link
Collaborator

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

@TheMisterFish
Copy link
Contributor

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

@joeybalardeta
Copy link
Author

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.

@TheMisterFish
Copy link
Contributor

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

@joeybalardeta
Copy link
Author

No worries! I love staying updated on cool projects like this.

@Badbird5907
Copy link
Collaborator

I'll have another look at this pr when I have time. Currently busy for the next 2-ish weeks.

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.

3 participants