So, instead of trying to get the statictics from the player itself, i need to ask the server for them?
Update before posting: So first i need a packet handler, then I need to send the packet with the packet handler to obtain the stats from the server?
Second update: This is the entire packet handler I did:
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.network.NetworkRegistry;
import net.minecraftforge.network.simple.SimpleChannel;
public class utilitiesforthestreamPacketHandler {
private static final String PROTOCOL_VERSION = "1";
public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(
new ResourceLocation("utilitiesforthestream", "main"),
() -> PROTOCOL_VERSION,
PROTOCOL_VERSION::equals,
PROTOCOL_VERSION::equals);
}