How do I make an ArrayList, with object as the data type for the values in it? I would like to make an ArrayList for a list of my commands within my plugin. In this array list, I’d like to have the built command, and the command name. But, the built command data type (I think that’s what it’s called) is CommandSpec while the command name (like “/this-is-my-command-in-game”, that sort of thing) is a String. I do believe there is a way to tell ArrayList that its value types are going to be object (hence, it could have both data types).
Also, it’d be nice if someone could point out how you could put an ArrayList inside of an ArrayList, and be able to use everything in it.
Thank you very much!