Okay, so here is what I have so far, this is the class that gets the info from the server via mysql, it only gets basic info at the moment to test -
package Zombie_Mod;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class ZScon
{
public static void ZScon(String[] args) throws Exception
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/mcmmo","root","root");
PreparedStatement statement = con.prepareStatement("select * from mcmmo_users");
ResultSet result = statement.executeQuery();
while(result.next())
{
System.out.println(result.getString(1) + " " + result.getString(2));
}
}
}
Few questions, in the MySQL database.
There is mcmmo_users which contains id,user,lastlogin
mcmmo_skills which contains id,taming,mining,woodcutting,ect (The current level)
mcmmo_experience which contains id,taming,mining,woodcutting,ect (The current XP)
How do I - look at mcmmo_users, match a user name to an ID, use that ID in skills to get the skill level, then experience to get experience?
I then want to print it like so - Mining(20) 120/1060
So that is - SkillName(SkillLevel) CurrentXP/TotalXP
Could someone help me with this? Im pretty new to actually making mods with Forge, not sure where to start really.