mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Making HUD a bit more friendly
This commit is contained in:
parent
b46997bc1a
commit
bd7203dd9c
@ -5,7 +5,7 @@ import com.gmail.nossr50.datatypes.HUDType;
|
|||||||
|
|
||||||
public class Config extends ConfigLoader {
|
public class Config extends ConfigLoader {
|
||||||
public int xpGainMultiplier = 1;
|
public int xpGainMultiplier = 1;
|
||||||
private static volatile Config instance;
|
private static Config instance;
|
||||||
|
|
||||||
public static Config getInstance() {
|
public static Config getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
@ -351,7 +351,7 @@ public class Config extends ConfigLoader {
|
|||||||
String temp = config.getString("Spout.HUD.Default", "STANDARD");
|
String temp = config.getString("Spout.HUD.Default", "STANDARD");
|
||||||
|
|
||||||
for (HUDType x : HUDType.values()) {
|
for (HUDType x : HUDType.values()) {
|
||||||
if (x.toString().equalsIgnoreCase(temp)) {
|
if (x.toString().toLowerCase().equalsIgnoreCase(temp.toString().toLowerCase())) {
|
||||||
defaulthud = x;
|
defaulthud = x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,6 +298,7 @@ public class PlayerProfile {
|
|||||||
Long timestamp = System.currentTimeMillis() / 1000; //Convert to seconds
|
Long timestamp = System.currentTimeMillis() / 1000; //Convert to seconds
|
||||||
// if we are using mysql save to database
|
// if we are using mysql save to database
|
||||||
if (Config.getInstance().getUseMySQL()) {
|
if (Config.getInstance().getUseMySQL()) {
|
||||||
|
|
||||||
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"huds SET hudtype = '"+hud.toString()+"' WHERE user_id = "+this.userid);
|
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"huds SET hudtype = '"+hud.toString()+"' WHERE user_id = "+this.userid);
|
||||||
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"users SET lastlogin = " + timestamp.intValue() + " WHERE id = " + this.userid);
|
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"users SET lastlogin = " + timestamp.intValue() + " WHERE id = " + this.userid);
|
||||||
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"users SET party = '"+this.party+"' WHERE id = " +this.userid);
|
mcMMO.database.write("UPDATE "+Config.getInstance().getMySQLTablePrefix()+"users SET party = '"+this.party+"' WHERE id = " +this.userid);
|
||||||
|
@ -106,7 +106,7 @@ public class Users {
|
|||||||
*/
|
*/
|
||||||
public static PlayerProfile getProfileByName(String playerName) {
|
public static PlayerProfile getProfileByName(String playerName) {
|
||||||
if (mcMMO.p.getServer().getOfflinePlayer(playerName).isOnline() || players.containsKey(playerName.toLowerCase())) {
|
if (mcMMO.p.getServer().getOfflinePlayer(playerName).isOnline() || players.containsKey(playerName.toLowerCase())) {
|
||||||
if (players.get(playerName.toLowerCase()) != null) {
|
if (players.containsKey(playerName.toLowerCase())) {
|
||||||
return players.get(playerName.toLowerCase());
|
return players.get(playerName.toLowerCase());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user