Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Cheese 2015-10-13 11:58:27 +11:00
commit f5b80c941c
4 changed files with 11 additions and 10 deletions

View File

@ -55,12 +55,12 @@ public class MotdManager implements Listener, Runnable
//String motdLine = "§f§l◄ §c§lMaintenance§f§l ►"; //String motdLine = "§f§l◄ §c§lMaintenance§f§l ►";
//String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►"; //String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►";
String motdLine = " §b§l◄§f§lNEW GAME§b§l► §f§l◄§b§lEVOLUTION§f§l► §b§l◄§f§lNEW GAME§b§l►"; String motdLine = " §4§l§n H A L L O W E E N H O R R O R §f";
//String motdLine = " §f§l◄ §a§lCarl the Creeper§f§l ▬ §c§l75% OFF SALE§f§l ►"; //String motdLine = " §f§l◄ §a§lCarl the Creeper§f§l ▬ §c§l75% OFF SALE§f§l ►";
//String motdLine = " §d§lRank Sale §a§l40% Off"); //String motdLine = " §d§lRank Sale §a§l40% Off");
//String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►"); //String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►");
updateMainMotd(" §b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r", motdLine); updateMainMotd(" §4§l§m §f§l§m §8§l§m[ §r §4§lMineplex§r §f§lGames§r §8§l§m ]§f§l§m §4§l§m §r", motdLine);
System.out.println("Updated Bungee MOTD"); System.out.println("Updated Bungee MOTD");
} }
} }

View File

@ -784,7 +784,7 @@ public enum Achievement
public static String getExperienceString(int level) public static String getExperienceString(int level)
{ {
if (level < 0) if (level < 0)
return C.cPurple + level; return C.cAqua + level;
if (level < 20) if (level < 20)
return C.cGray + level; return C.cGray + level;

View File

@ -53,7 +53,7 @@ public class TitanGiveawayManager extends MiniPlugin
@Override @Override
public void run() public void run()
{ {
final boolean pass = _repository.canGiveaway(); final boolean pass = _repository.canGiveaway(region);
if (pass && _repository.addTitan(accountId, region, serverName)) if (pass && _repository.addTitan(accountId, region, serverName))
{ {

View File

@ -41,17 +41,18 @@ public class TitanGiveawayRepository extends RepositoryBase
return 1 == executeUpdate(ADD_TITAN, new ColumnInt("accountId", accountId), new ColumnVarChar("region", 10, region.name()), new ColumnVarChar("serverName", 64, serverName)); return 1 == executeUpdate(ADD_TITAN, new ColumnInt("accountId", accountId), new ColumnVarChar("region", 10, region.name()), new ColumnVarChar("serverName", 64, serverName));
} }
public boolean canGiveaway() public boolean canGiveaway(Region region)
{ {
try (Connection connection = getConnection(); try (Connection connection = getConnection();
CallableStatement callableStatement = connection.prepareCall("{call check_titanGiveaway(?, ?)}")) CallableStatement callableStatement = connection.prepareCall("{call check_titanGiveaway(?, ?, ?)}"))
{ {
callableStatement.registerOutParameter(1, Types.BOOLEAN); callableStatement.setString(1, region.name());
callableStatement.registerOutParameter(2, Types.INTEGER); callableStatement.registerOutParameter(2, Types.BOOLEAN);
callableStatement.registerOutParameter(3, Types.INTEGER);
callableStatement.executeUpdate(); callableStatement.executeUpdate();
boolean pass = callableStatement.getBoolean(1); boolean pass = callableStatement.getBoolean(2);
int titanCount = callableStatement.getInt(2); int titanCount = callableStatement.getInt(3);
_titanCount = titanCount; _titanCount = titanCount;
return pass; return pass;