Merge branch 'clans/beta' of https://github.com/Mineplex-LLC/Minecraft-PC into clans/beta

This commit is contained in:
Ben 2016-04-05 12:37:23 +01:00
commit 876a7a8eb6
15 changed files with 49 additions and 41 deletions

View File

@ -56,12 +56,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 = " §2§l§n M O N S T E R M A Z E B E T A §f";
String motdLine = " §f❄ §2§lMerry Christmas §f❄ §2§lElf Presents §f❄";
String motdLine = " §f> §4§lCLANS BETA §f- §c§lOpen to Everyone §f<";
// String motdLine = " §f❄ §2§lServer Maintenance §f❄ §2§lBe Back Soon §f❄";
//String motdLine = " §d§lRank Sale §a§l40% Off");
//String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►");
updateMainMotd(" §c§m §f§m §c§m §f§m §2§l§m[ §r §c§lMineplex§r §f§lGames§r §2§l§m ]§f§m §c§m §f§m §c§m §r", motdLine);
updateMainMotd(" §f§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§f§m §r", motdLine);
System.out.println("Updated Bungee MOTD");
}
}

View File

@ -18,7 +18,7 @@ public class IncognitoRepository extends MinecraftRepository
public void setStatus(int accountId, boolean status)
{
if (executeUpdate(UPDATE_STATUS, new ColumnInt("accountId", accountId)) <= 0)
if (executeUpdate(UPDATE_STATUS, new ColumnInt("status", status ? 1 : 0), new ColumnInt("accountId", accountId)) <= 0)
executeInsert(INSERT_STATUS, null, new ColumnInt("accountId", accountId), new ColumnInt("status", status ? 1 : 0));
}

View File

@ -60,13 +60,11 @@ public class ResourcePackManager extends MiniPlugin implements CommandCallback
if (entry.getLeft() == version || entry.getLeft() == MinecraftVersion.ALL)
{
player.setResourcePack(entry.getRight());
player.sendMessage("A: " + entry.getRight());
return;
}
}
player.setResourcePack(_resourcePackUrls[0].getRight());
player.sendMessage("B: " + _resourcePackUrls[0].getRight());
}
@EventHandler

View File

@ -83,7 +83,7 @@ public class Outpost implements Listener
private Location _core;
private LinkedHashMap<String, OutpostBlock> _blocks;
private LinkedHashMap<String, OutpostBlock> _buildQueue;
private LinkedHashMap<String, OutpostBlock> _buildQueue = new LinkedHashMap<>();
protected OutpostType _type;
private OutpostState _state;

View File

@ -77,11 +77,11 @@ public class Cannon extends SiegeWeapon
return false;
}
if (!_ownerClan.isMember(player))
{
UtilPlayer.message(player, F.main("Clans", "This cannon is not owned by your Clan."));
return false;
}
// if (!_ownerClan.isMember(player))
// {
// UtilPlayer.message(player, F.main("Clans", "This cannon is not owned by your Clan."));
// return false;
// }
if(_clans.hasTimer(player))
{
@ -107,11 +107,11 @@ public class Cannon extends SiegeWeapon
enableInventory(UtilServer.getServer().createInventory(null, InventoryType.DISPENSER, C.cDAquaB + _name), new AccessRule(AccessType.RCLICK_BB, player -> player.equals(getRider())));
setRideable(new AccessRule(AccessType.RCLICK_BB, player -> {
if (!_ownerClan.isMember(player))
{
UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
return false;
}
// if (!_ownerClan.isMember(player))
// {
// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
// return false;
// }
if (getRider() != null && !getRider().equals(player))
{
@ -161,11 +161,11 @@ public class Cannon extends SiegeWeapon
return false;
}
if (!_ownerClan.isMember(player))
{
UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
return false;
}
// if (!_ownerClan.isMember(player))
// {
// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
// return false;
// }
if (_clans.hasTimer(player))
{
@ -191,11 +191,11 @@ public class Cannon extends SiegeWeapon
enableInventory(UtilServer.getServer().createInventory(null, InventoryType.DISPENSER, C.cDAquaB + _name), new AccessRule(AccessType.RCLICK_BB, player -> player.equals(getRider())));
setRideable(new AccessRule(AccessType.RCLICK_BB, player -> {
if (!_ownerClan.isMember(player))
{
UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
return false;
}
// if (!_ownerClan.isMember(player))
// {
// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan."));
// return false;
// }
if (getRider() != null && !getRider().equals(player))
{

View File

@ -12,7 +12,7 @@ import mineplex.game.clans.clans.ClansManager;
public class TntGeneratorManager extends MiniPlugin
{
public static final int SECONDS_PER_TNT = 30;//60 * 60 * 10; // 10 Hours
public static final int SECONDS_PER_TNT = 60 * 60 * 12; // 12 Hours
public static final int MAX_GENERATOR_STOCK = 3;
private ClansManager _clansManager;

View File

@ -364,6 +364,8 @@ public class GearManager extends MiniPlugin implements IPacketHandler, Runnable
attribute = sampleAttribute; // Select valid attribute to
// add
}
attempts++;
}
container.addAttribute(attribute);

View File

@ -46,7 +46,7 @@ public abstract class OrderedObjective<Plugin extends Tutorial> extends Objectiv
OrderedObjectiveData data = getData(player);
assert index == data.getIndex();
if (data.getIndex() + 1 >= _goals.size())
if (data == null || data.getIndex() + 1 >= _goals.size())
{
finish(player);
}

View File

@ -57,10 +57,5 @@ public class SellDiamondsGoal extends ObjectiveGoal<FieldsObjective>
finish(event.getPlayer());
}
}
else
{
if (event.getItem().getType() == Material.DIAMOND)
event.setCancelled(true);
}
}
}

View File

@ -918,7 +918,7 @@ public class ServerManager extends MiniDbClientPlugin<SimpleClanToken>
@Override
public String getQuery(int accountId, String uuid, String name)
{
return "SELECT clans.name, accountClan.clanRole, clanServer.serverName, clans.id FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId INNER JOIN clanServer ON clans.serverId = clanServer.id WHERE accountClan.accountId = " + accountId + "?;";
return "SELECT clans.name, accountClan.clanRole, clanServer.serverName, clans.id FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId INNER JOIN clanServer ON clans.serverId = clanServer.id WHERE accountClan.accountId = " + accountId + ";";
}
@Override

View File

@ -52,6 +52,14 @@ public class ServerSorter implements Comparator<ServerInfo>
}
}
if (a.Name.contains("Clans") && b.Name.contains("Clans"))
{
if (Integer.parseInt(a.Name.split("-")[1]) < Integer.parseInt(b.Name.split("-")[1]))
return -1;
else if (Integer.parseInt(a.Name.split("-")[1]) > Integer.parseInt(b.Name.split("-")[1]))
return 1;
}
if (a.MaxPlayers - a.CurrentPlayers < _requiredSlots && b.MaxPlayers - b.CurrentPlayers >= _requiredSlots)
return -1;

View File

@ -272,9 +272,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
C.Reset + "the games you want, when you want.",
}).setHideInfo(true).build(), new SelectPLAYERButton(this));
addButton(40, new ItemBuilder(Material.IRON_DOOR).setTitle(C.cYellowB + "Mineplex Clans " + C.cGray + "Champions Teams").addLore(new String[]
addButton(40, new ItemBuilder(Material.IRON_DOOR).setTitle(C.cYellowB + "Mineplex Clans " + C.cGray + "Factions PvP").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "ALPHA RELEASE",
(_extraValue ? C.cAquaB : C.cWhiteB) + "BETA RELEASE",
C.Reset + "",
C.Reset + "Equip custom skills and builds",
C.Reset + "and join your clan to destroy",

View File

@ -379,7 +379,7 @@ public class ConditionEffect implements Listener
Manager.getDamagerManager().NewDamageEvent(ent, condition.GetSource(), null,
DamageCause.CUSTOM, 0.1, false, true, false,
condition.GetSource().getName(), "Poison");
condition.GetSource() != null ? condition.GetSource().getName() : "The Mighty Defek7", "Poison");
}
}

View File

@ -24,6 +24,7 @@ public final class DBPool
BasicDataSource source = new BasicDataSource();
source.addConnectionProperty("autoReconnect", "true");
source.addConnectionProperty("allowMultiQueries", "true");
source.addConnectionProperty("zeroDateTimeBehavior", "convertToNull");
source.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
source.setDriverClassName("com.mysql.jdbc.Driver");
source.setUrl(url);

View File

@ -203,9 +203,12 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
caller.sendMessage(C.cBlue + "Valentines Gifts Received : " + C.cYellow + valentinesGiftsReceived);
caller.sendMessage(C.cBlue + "Monthly Bonus Log (Last 6 entries):");
for (String logEntry : _accountBonusLog.get(client.getAccountId()))
if (_accountBonusLog.containsKey(client.getAccountId()))
{
caller.sendMessage(C.cYellow + logEntry);
for (String logEntry : _accountBonusLog.get(client.getAccountId()))
{
caller.sendMessage(C.cYellow + logEntry);
}
}
caller.sendMessage(C.cDGreen + C.Strike + "=============================================");
@ -259,6 +262,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
log.add("Received " + resultSet.getInt(3) + " " + resultSet.getString(2) + " on " + resultSet.getDate(4));
}
_accountBonusLog.put(accountId, log);
if (accountId != 0)
_accountBonusLog.put(accountId, log);
}
}