Started by
Nasphy
on
Topic category: Help with Minecraft modding (Java Edition)
Ok... I'm coding a multiplayer shop for a Minecraft server. And I don't know now how to create an array list... I found an addon but it can't create a list stored on the global map, only on the global session. Do I have to go through custom elements ?
You can't create an ArrayList from the MCreator interface, so you will have to use custom elements.
An ArrayList is a list of something. What do you want your list to contain? e.g. is it a list of items, a list of itemstacks...?
If you want to create a list of item stacks:
Create an empty procedure, save it, select it in the menu, click "Lock/unlock", then double-click on the procedure.
Then, right after the line that says "public class WhateverProcedure {", add a line that says "public static ArrayList<ItemStack> shop = new ArrayList<>();".