Add region to titan, new MOTD

This commit is contained in:
Shaun Bennett 2015-10-12 01:30:31 -04:00
parent e6485a9009
commit 1aecc9505c
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◄ §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 = " §d§lRank Sale §a§l40% Off");
//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");
}
}

View File

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

View File

@ -53,7 +53,7 @@ public class TitanGiveawayManager extends MiniPlugin
@Override
public void run()
{
final boolean pass = _repository.canGiveaway();
final boolean pass = _repository.canGiveaway(region);
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));
}
public boolean canGiveaway()
public boolean canGiveaway(Region region)
{
try (Connection connection = getConnection();
CallableStatement callableStatement = connection.prepareCall("{call check_titanGiveaway(?, ?)}"))
CallableStatement callableStatement = connection.prepareCall("{call check_titanGiveaway(?, ?, ?)}"))
{
callableStatement.registerOutParameter(1, Types.BOOLEAN);
callableStatement.registerOutParameter(2, Types.INTEGER);
callableStatement.setString(1, region.name());
callableStatement.registerOutParameter(2, Types.BOOLEAN);
callableStatement.registerOutParameter(3, Types.INTEGER);
callableStatement.executeUpdate();
boolean pass = callableStatement.getBoolean(1);
int titanCount = callableStatement.getInt(2);
boolean pass = callableStatement.getBoolean(2);
int titanCount = callableStatement.getInt(3);
_titanCount = titanCount;
return pass;