mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
New mob names
This commit is contained in:
parent
445e30e407
commit
c9d6e306f1
@ -1463,6 +1463,8 @@ public class NameTranslatorManager {
|
||||
c.get("EntityList.51.Name", "Skeleton");
|
||||
c.get("EntityList.51:1.MCName", "Skeleton");
|
||||
c.get("EntityList.51:1.Name", "WitherSkeleton");
|
||||
c.get("EntityList.51:2.MCName", "Skeleton");
|
||||
c.get("EntityList.51:2.Name", "Skeleton Stray");
|
||||
c.get("EntityList.52.MCName", "Spider");
|
||||
c.get("EntityList.52.Name", "Spider");
|
||||
c.get("EntityList.53.MCName", "Giant");
|
||||
@ -1471,6 +1473,8 @@ public class NameTranslatorManager {
|
||||
c.get("EntityList.54.Name", "Zombie");
|
||||
c.get("EntityList.54:1.MCName", "Zombie");
|
||||
c.get("EntityList.54:1.Name", "Zombie Villager");
|
||||
c.get("EntityList.54:2.MCName", "Zombie");
|
||||
c.get("EntityList.54:2.Name", "Zombie Husk");
|
||||
c.get("EntityList.55.MCName", "Slime");
|
||||
c.get("EntityList.55.Name", "Slime");
|
||||
c.get("EntityList.56.MCName", "Ghast");
|
||||
@ -1527,6 +1531,8 @@ public class NameTranslatorManager {
|
||||
c.get("EntityList.100.Name", "Horse");
|
||||
c.get("EntityList.101.MCName", "Rabbit");
|
||||
c.get("EntityList.101.Name", "Rabbit");
|
||||
c.get("EntityList.102.MCName", "PolarBear");
|
||||
c.get("EntityList.102.Name", "Polar Bear");
|
||||
c.get("EntityList.120.MCName", "Villager");
|
||||
c.get("EntityList.120.Name", "Villager");
|
||||
c.get("EntityList.200.MCName", "EnderCrystal");
|
||||
|
@ -33,7 +33,6 @@ import com.gamingmesh.jobs.dao.JobsDAO;
|
||||
import com.gamingmesh.jobs.dao.JobsDAOData;
|
||||
import com.gamingmesh.jobs.resources.jfep.Parser;
|
||||
import com.gamingmesh.jobs.stuff.ChatColor;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
import com.gamingmesh.jobs.stuff.Perm;
|
||||
|
||||
public class JobsPlayer {
|
||||
|
@ -531,10 +531,11 @@ public class JobsDAOMySQL extends JobsDAO {
|
||||
// dropping 2 columns
|
||||
PreparedStatement prestLogTemp = null;
|
||||
ResultSet rsLogTemp = null;
|
||||
boolean next = false;
|
||||
try {
|
||||
prestLogTemp = conn.prepareStatement("SELECT * FROM `" + getPrefix() + "log`;");
|
||||
rsLogTemp = prestLogTemp.executeQuery();
|
||||
while (rsLogTemp.next()) {
|
||||
while (next = rsLogTemp.next()) {
|
||||
rsLogTemp.getInt("userid");
|
||||
rsLogTemp.getLong("time");
|
||||
rsLogTemp.getString("action");
|
||||
@ -552,11 +553,6 @@ public class JobsDAOMySQL extends JobsDAO {
|
||||
prestLogTemp.close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "log` (`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `userid` int, `username` varchar(20), `time` bigint, `action` varchar(20), `itemname` varchar(60), `count` int, `money` double, `exp` double);");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (rsLogTemp != null)
|
||||
@ -567,6 +563,15 @@ public class JobsDAOMySQL extends JobsDAO {
|
||||
}
|
||||
}
|
||||
|
||||
if (!next) {
|
||||
dropDataBase("log");
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "log` (`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `userid` int, `username` varchar(20), `time` bigint, `action` varchar(20), `itemname` varchar(60), `count` int, `money` double, `exp` double);");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (rows == 0) {
|
||||
HashMap<String, String> tempMap = new HashMap<String, String>();
|
||||
PreparedStatement prestJobs = null;
|
||||
|
@ -29,6 +29,7 @@ import org.bukkit.Bukkit;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.container.PlayerInfo;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
import com.gamingmesh.jobs.stuff.UUIDUtil;
|
||||
|
||||
public class JobsDAOSQLite extends JobsDAO {
|
||||
@ -537,10 +538,13 @@ public class JobsDAOSQLite extends JobsDAO {
|
||||
// checking log table, recreating if old version present
|
||||
PreparedStatement prestLogTemp = null;
|
||||
ResultSet rsLogTemp = null;
|
||||
boolean next = false;
|
||||
try {
|
||||
Debug.D("trying table");
|
||||
prestLogTemp = conn.prepareStatement("SELECT * FROM `" + getPrefix() + "log`;");
|
||||
rsLogTemp = prestLogTemp.executeQuery();
|
||||
while (rsLogTemp.next()) {
|
||||
while (next = rsLogTemp.next()) {
|
||||
Debug.D("din table");
|
||||
rsLogTemp.getInt("userid");
|
||||
rsLogTemp.getLong("time");
|
||||
rsLogTemp.getString("action");
|
||||
@ -548,9 +552,14 @@ public class JobsDAOSQLite extends JobsDAO {
|
||||
rsLogTemp.getInt("count");
|
||||
rsLogTemp.getDouble("money");
|
||||
rsLogTemp.getDouble("exp");
|
||||
|
||||
Debug.D("din table");
|
||||
break;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
Debug.D("recreating table");
|
||||
|
||||
try {
|
||||
if (rsLogTemp != null)
|
||||
rsLogTemp.close();
|
||||
@ -558,13 +567,7 @@ public class JobsDAOSQLite extends JobsDAO {
|
||||
prestLogTemp.close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
executeSQL("DROP TABLE IF EXISTS `" + getPrefix() + "log`;");
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "log_temp` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `userid` int, `time` bigint, `action` varchar(20), `itemname` varchar(60), `count` int, `money` double, `exp` double);");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} finally {
|
||||
try {
|
||||
if (rsLogTemp != null)
|
||||
@ -574,6 +577,16 @@ public class JobsDAOSQLite extends JobsDAO {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!next){
|
||||
executeSQL("DROP TABLE IF EXISTS `" + getPrefix() + "log`;");
|
||||
try {
|
||||
executeSQL("CREATE TABLE `" + getPrefix()
|
||||
+ "log` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `userid` int, `time` bigint, `action` varchar(20), `itemname` varchar(60), `count` int, `money` double, `exp` double);");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (rows != 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user