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).
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](https://user-images.githubusercontent.com/29493390/131956827-46dbbc87-813e-482a-9d9c-fe1d6c8262b6.png)
Clicking on a bot in /bot info:![2021-09-02_22 49 22](https://user-images.githubusercontent.com/29493390/131956869-d6a17e97-69d3-4b96-9f00-4131fc279ee5.png)
Using /bot info:
![2021-09-02_22 31 53](https://user-images.githubusercontent.com/29493390/131956915-0a397c5b-cd02-4018-abaa-49b1cf67a538.png)